Stream: t-compiler/rust-analyzer

Topic: "vendor" all references?

Joe Ardent (Sep 14 2019 at 22:48, on Zulip):

I apologize if this is the wrong stream! But I'm looking for something to help me with an idea, which is to inline the transitive closure of all external functions and types' source code into a local directory, similar to what cargo vendor does, but including only the "minimal" source code to support the usages in the client code you're writing. I see notes in here talking about how, eg, full-project symbol resolution is still not really there, but it still seems like RA would have the functionality within it to produce what I'm looking for.

matklad (Sep 14 2019 at 22:50, on Zulip):

The biggest problem is that rust-anlzyer analysis is not precise at the moment (there are a lot of bugs, as we share relatively little code with rustc at the moment, and we outright don't support proc macros), but I think doing some concervative approximation should be possible

matklad (Sep 14 2019 at 22:51, on Zulip):

what might work is considering a symbol unused if the name of the symbol is not used anywhere

Joe Ardent (Sep 14 2019 at 22:56, on Zulip):

yeah, if it were too aggressive about what it brought in, that wouldn't be the end of the world. In the limit worst case, it would be equivalent to a full compile, basically

Last update: Jul 26 2021 at 14:15UTC