aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model/src/cargo_workspace.rs
Commit message (Collapse)AuthorAgeFilesLines
* Disable rust-analyzer.{cargo,checkOnSave}.allFeatures by defaultLaurențiu Nicola2020-06-021-1/+1
|
* Merge #4406 #4410 #4411 #4417bors[bot]2020-05-101-9/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4406: Update cargo-metadata r=matklad a=edwin0cheng This PR update `cargo-metadata` to 0.10.0 and it also relax the` serde-derive` deps to 1.0 for tests in `proc-macro-srv`. cc @robojumper r= @matklad , I think you would have something to say related to https://github.com/serde-rs/json/issues/647#issue-593788429 ? 4410: Improve wording in comment r=matklad a=edwin0cheng 4411: do not remove then block when you unwrap else block #4361 r=matklad a=bnjjj close #4361 4417: Omit default types in HirDisplay SourceCode mode r=matklad a=TimoFreiberg Closes #4390 Co-authored-by: Edwin Cheng <[email protected]> Co-authored-by: Benjamin Coenen <[email protected]> Co-authored-by: Timo Freiberg <[email protected]>
| * Update cargo-metadataEdwin Cheng2020-05-091-9/+5
| |
* | CleanupAleksey Kladov2020-05-081-3/+2
| |
* | Rename ra_env -> ra_toolchainAleksey Kladov2020-05-081-1/+1
|/
* Merge #4329bors[bot]2020-05-081-11/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4329: Look for `cargo`, `rustc`, and `rustup` in standard installation path r=matklad a=cdisselkoen Discussed in #3118. This is approximately a 90% fix for the issue described there. This PR creates a new crate `ra_env` with a function `get_path_for_executable()`; see docs there. `get_path_for_executable()` improves and generalizes the function `cargo_binary()` which was previously duplicated in the `ra_project_model` and `ra_flycheck` crates. (Both of those crates now depend on the new `ra_env` crate.) The new function checks (e.g.) `$CARGO` and `$PATH`, but also falls back on `~/.cargo/bin` manually before erroring out. This should allow most users to not have to worry about setting the `$CARGO` or `$PATH` variables for VSCode, which can be difficult e.g. on macOS as discussed in #3118. I've attempted to replace all calls to `cargo`, `rustc`, and `rustup` in rust-analyzer with appropriate invocations of `get_path_for_executable()`; I don't think I've missed any in Rust code, but there is at least one invocation in TypeScript code which I haven't fixed. (I'm not sure whether it's affected by the same problem or not.) https://github.com/rust-analyzer/rust-analyzer/blob/a4778ddb7a00f552a8e653bbf56ae9fd69cfe1d3/editors/code/src/cargo.ts#L79 I'm sure this PR could be improved a bunch, so I'm happy to take feedback/suggestions on how to solve this problem better, or just bikeshedding variable/function/crate names etc. cc @Veetaha Fixes #3118. Co-authored-by: Craig Disselkoen <[email protected]> Co-authored-by: veetaha <[email protected]>
| * pull function out into new crate ra_env; use in ra_flycheck as wellCraig Disselkoen2020-05-061-1/+1
| |
| * more generic, find rustc as wellCraig Disselkoen2020-05-061-53/+4
| |
| * ra_project_model: look for Cargo in more placesCraig Disselkoen2020-05-061-9/+50
| | | | | | | | See #3118
* | Merge #4296bors[bot]2020-05-071-2/+13
|\ \ | |/ |/| | | | | | | | | | | 4296: Support cargo:rustc-cfg in build.rs r=matklad a=robojumper Fixes #4238. Co-authored-by: robojumper <[email protected]>
| * Assume cargo_metadata uses String for cfgs soonrobojumper2020-05-051-3/+8
| |
| * Support build.rs cargo:rustc-cfgrobojumper2020-05-041-2/+8
| |
* | Rename `defaultTarget` to targetChristophe MASSOLIN2020-05-051-3/+3
| |
* | [config] remove RustcConfigChristophe MASSOLIN2020-04-271-5/+0
| |
* | [config] rename cargo.defaultTargetChristophe MASSOLIN2020-04-271-4/+4
| |
* | Started rust-analyzer.cargo.defaultTarget implementationChristophe MASSOLIN2020-04-261-0/+12
|/
* Don't print cargo version to stdout, breaking everythingAleksey Kladov2020-04-241-1/+1
|
* More helpful error message if toolchain is not in PATHAleksey Kladov2020-04-241-0/+5
|
* Some clippy fixesJeremy Kolb2020-04-191-2/+1
|
* Unique package by name and version.o0Ignition0o2020-04-021-4/+5
| | | | | This commit is a fixup of a bug I introduced by using a PackageId to refer to a crate when its name conflicts with a dependency. It turns out the package id currently is `name version path` while cargo expects `name:version` as argument.
* Reduce scope of deserializationAleksey Kladov2020-04-011-12/+8
|
* Move all config to configAleksey Kladov2020-04-011-0/+1
|
* Reduce depsAleksey Kladov2020-03-311-36/+39
|
* Rename cargo_watch -> flycheckAleksey Kladov2020-03-311-1/+1
|
* Use matches in is_dylibEdwin Cheng2020-03-311-11/+3
|
* Implement ra_proc_macro client logicEdwin Cheng2020-03-311-1/+21
|
* Add crate versions when running cargo -p commands.o0Ignition0o2020-03-311-0/+14
| | | | | | | Until now cargo commands with the -p flag would pass the package name only. It doesn't play super well with the toml Renaming dependencies feature. This commit specifies the package name and version when a cargo command is run with the -p flag, to avoid ambiguities.
* Add ProcMacroClientEdwin Cheng2020-03-251-8/+23
|
* ra_cargo_watch: return Result<> from run_cargo(), and don't read stderr for nowveetaha2020-03-211-14/+13
| | | | | | | | | | | | | | As stated by matklad, reading the stderr should be done alngside with stdout via select() (or I guess poll()), there is no such implementation in stdlib, since it is quite low level and platform-dependent and it also requires quite a bit of unrelated code we don't use it for now. As referenced by bjorn3, there is an implementation of the needed read2() function in rustc compiletest. The better solution will be to extract this function to a separate crate in future: https://github.com/rust-analyzer/rust-analyzer/pull/3632#discussion_r395605298
* Simplify Arena to use a generic indexAleksey Kladov2020-03-191-9/+5
|
* More direct CargoWorkspaceAleksey Kladov2020-03-191-64/+41
|
* Use dyn-ref instead of impl to impact compile times the leastEmil Lauridsen2020-03-171-1/+1
|
* Slight readablity improvementEmil Lauridsen2020-03-171-1/+1
|
* Remove outDirOverridesEmil Lauridsen2020-03-171-8/+0
|
* Change existing OUT_DIR override config to make use of new infrastructureEmil Lauridsen2020-03-171-0/+8
|
* Support loading OUT_DIR from cargo check at launchEmil Lauridsen2020-03-171-2/+65
|
* More manual clippy fixesKirill Bulatov2020-02-181-1/+1
|
* Run cargo +nightly fix --clippy -Z unstable-optionsKirill Bulatov2020-02-181-1/+1
|
* Add error context to failures in `ra_project_model` using `anyhow` crate (#3119)Adam Bratschi-Kaye2020-02-131-4/+7
| | | Add error context to failures in ra_project_model using anyhow crate
* Add a FIXME noteAleksey Kladov2020-01-301-0/+3
|
* Ignore illform node id from metadataEdwin Cheng2020-01-281-2/+18
|
* Address nitEmil Lauridsen2020-01-101-1/+5
|
* Slightly more robust cargo watcher root searchEmil Lauridsen2020-01-101-1/+1
|
* Only add features flags if non-emptyEdwin Cheng2019-12-231-1/+1
|
* Use all-features by defaultAleksey Kladov2019-12-141-1/+7
|
* Support setting cargo featuresoxalica2019-12-131-2/+29
|
* add proc-macro crate type handlingJasperDeSutter2019-11-241-0/+8
|
* Cleanup errorsAleksey Kladov2019-11-221-3/+1
|
* return Error instead of panicking in from_cargo_metadataMetabaron2019-11-121-7/+8
|
* Implement FromStr for enum EditionMetabaron2019-11-121-2/+5
|