rust/crates
bors[bot] ddccaecb79
Merge #6524
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>
2020-11-12 17:55:32 +00:00
..
arena Add TBD description to arena 2020-08-24 13:29:10 +02:00
assists Merge #6514 2020-11-12 17:48:25 +00:00
base_db Feedback. 2020-11-02 10:57:31 -07:00
cfg cfg: move tests to separate file 2020-10-23 12:14:58 +02:00
completion Add some postfix snippet 2020-11-08 20:10:40 +01:00
flycheck Update crates 2020-10-20 17:36:02 -04:00
hir Add static semantic token modifier for associated functions with no &self 2020-11-09 13:09:20 -08:00
hir_def Cleanup API 2020-11-06 22:52:42 +01:00
hir_expand Simplify 2020-11-06 22:30:58 +01:00
hir_ty Replace RacyFlag with OnceCell 2020-11-11 03:11:40 +01:00
ide Merge #6472 2020-11-09 21:13:51 +00:00
ide_db Merge #6331 #6342 2020-10-24 19:08:12 +00:00
mbe Remove more unreachable pubs 2020-11-02 16:58:33 +01:00
parser Kill RAW_ literals 2020-11-06 22:23:14 +01:00
paths Add description for crates that will be published 2020-08-24 13:07:22 +02:00
proc_macro_api Deny unreachable-pub 2020-11-02 14:07:08 +01:00
proc_macro_srv Deny unreachable-pub 2020-11-02 14:07:08 +01:00
proc_macro_test Add description for crates that will be published 2020-08-24 13:07:22 +02:00
profile Deny unreachable-pub 2020-11-02 14:07:08 +01:00
project_model Address review comments 2020-11-12 18:49:22 +01:00
rust-analyzer Merge #6524 2020-11-12 17:55:32 +00:00
ssr Remove more unreachable pubs 2020-11-02 16:58:33 +01:00
stdx Replace RacyFlag with OnceCell 2020-11-11 03:11:40 +01:00
syntax Fix attachment of inner doc comments 2020-11-12 12:09:12 +01:00
test_utils Feedback. 2020-11-02 10:57:31 -07:00
text_edit Actually assert disjointness 2020-09-03 13:37:36 +02:00
toolchain Add description for crates that will be published 2020-08-24 13:07:22 +02:00
tt Add description for crates that will be published 2020-08-24 13:07:22 +02:00
vfs Remove more unreachable pubs 2020-11-02 16:58:33 +01:00
vfs-notify Follow symlinks when walking project trees 2020-10-15 14:22:36 -04:00