Retrieving compile flags might invalidate the environment of an update
request (e.g. generating build artifacts that wasn't captured at the time of
AddDocument notification). This enables clients with such behavior to optimize
away these intermediate AST builds.
Details
Details
- Reviewers
ilya-biryukov
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Could you please add a test with a compilation database that models the blocking behavior, attempts cancellation and ensures no diagnostics are produced?
I also suggest adding a callback similar to Callbacks.onFailedAST, which could be used for testing this behavior.
The test should also check that subsequent updates and reads get resolved properly.
We don't have an actual implementation for the client code that relies on this in-tree, but the unit test will help to ensure we don't break this contract.
clang-tools-extra/clangd/TUScheduler.cpp | ||
---|---|---|
898 | I'd add something like "due to cancellation". I know you can tell that from the line number, but at first glance someone might think it's due to lack of changes or something like that. |
I'd add something like "due to cancellation". I know you can tell that from the line number, but at first glance someone might think it's due to lack of changes or something like that.