ddccaecb79
6524: Add support for loading rustc private crates r=matklad a=xldenis This PR presents a solution to the problem of making`rustc_private` crates visible to `rust-analyzer`. Currently developers add dependencies to those crates behind a `cfg(NOT_A_TARGET)` target to prevent `cargo` from building them. This solution is unsatisfactory since it requires modifying `Cargo.toml` and causes problems for collaboration or CI. The proposed solution suggested by @matklad is to allow users to give RA a path where the `rustc` sources could be found and then load that like a normal workspace. This PR implements this solution by adding a `rustcSource` configuration item and adding the cargo metadata to the crate graph if it is provided. ------ I have no idea how this should be tested, or if this code is generally tested at all. I've locally run the extension with these changes and it correctly loads the relevant crates on a `rustc_private` project of mine. Co-authored-by: Xavier Denis <xldenis@gmail.com> |
||
---|---|---|
.. | ||
arena | ||
assists | ||
base_db | ||
cfg | ||
completion | ||
flycheck | ||
hir | ||
hir_def | ||
hir_expand | ||
hir_ty | ||
ide | ||
ide_db | ||
mbe | ||
parser | ||
paths | ||
proc_macro_api | ||
proc_macro_srv | ||
proc_macro_test | ||
profile | ||
project_model | ||
rust-analyzer | ||
ssr | ||
stdx | ||
syntax | ||
test_utils | ||
text_edit | ||
toolchain | ||
tt | ||
vfs | ||
vfs-notify |