-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include vendored crates in StaticIndex #17809
Conversation
Why aren't we picking them up right now? Is it because of the |
No this is unrelated to exclusions. |
StaticIndex::compute filters out modules from libraries. This makes an exceptions for vendored libraries, ie libraries actually defined inside the workspace being indexed. This aims to solve https://bugzilla.mozilla.org/show_bug.cgi?id=1846041 In general StaticIndex is meant for code browsers, which likely want to index all visible source files.
ef466d7
to
6dcc4e3
Compare
Hmm, now I wonder is it somehow possible for us to detect (and mark) vendored dependencies? The approach in this PR works but feels a bit odd |
I see, vendoring really is just overwriting the source to a directory. So we could figure this out by using cargo config actually to check if a source is a directory source to tell whether something is vendored |
☀️ Test successful - checks-actions |
…rsky Add scip/lsif flag to exclude vendored libaries #17809 changed StaticIndex to include vendored libraries. This PR adds a flag to disable that behavior. At work, our monorepo has too many rust targets to index all at once, so we split them up into several shards. Since all of our libraries are vendored, if rust-analyzer includes them, sharding no longer has much benefit, because every shard will have to index the entire transitive dependency graphs of all of its targets. We get around the issue presented in #17809 because some other shard will index the libraries directly.
StaticIndex::compute
filters out modules from libraries. This makes an exceptions for vendored libraries, ie libraries actually defined inside the workspace being indexed.This aims to solve https://bugzilla.mozilla.org/show_bug.cgi?id=1846041 In general StaticIndex is meant for code browsers, which likely want to index all visible source files.