You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add -no-relative-path: flag to control indexing of generated files
Previously, the SemanticDB compiler plugin errored when indexing
auto-generated files outside of the configured `-sourceroot` directory
(which is automatically inferred for Bazel builds). This behavior was
undesirable because:
- There's no good workaround for the issue
- The error message was cryptic making it difficult to understand what
went wrong
For some cases, we were able to detect this situation for Bazel and
ignore the indexed file while printing an informative message, but this
behavior was also undesirable because we skipping these files means that
we can't render hover messages for symbols in those generated files.
This PR fixes the issue by adding a configurable `-no-relative-path:`
flag with the following valid options:
- `index_anyways` (default): indexes the file but with no guarantee that
it's possible to recover the location of the original generated file.
This allows us to display accurate hover tooltips for symbols in these
files even if "Go to definition" won't work.
- `skip`: silently ignored these files.
- `warning`: ignore these files and print a message explaining it was
skipped.
- `error`: fail the compilation process (old default).
0 commit comments