Parts of RA re-execute itself, making it unsuitable for use as a library #10516
Labels
C-Architecture
Big architectural things which we need to figure up-front (or suggestions for rewrites :0) )
C-bug
Category: bug
Specifically https://github.com/rust-analyzer/rust-analyzer/blob/ed4b312fa777ebb39ba1348fe3df574c441a485e/crates/rust-analyzer/src/cli/load_cargo.rs#L44-L63
I was surprised, because the comment says "this function is used by external tools that use rust-analyzer as a library" - but it then promptly re-executes RA.
I was able to work around via environment variables in my binary code, but I couldn't find this gotcha documented anywhere (in particular, in ARCHITECTURE.md).
The text was updated successfully, but these errors were encountered: