Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Require opt in to rustc_private | Daniel McNab | 2021-03-07 | 1 | -1/+1 |
| | | | | | | This gives the advantage that A future extension would be to check for `feature(rustc_private)` instead | ||||
* | Implement opt-in (and opt-out) rustc_private | Daniel McNab | 2021-03-06 | 1 | -2/+21 |
| | |||||
* | Bump cargo_metadata | Laurențiu Nicola | 2021-03-02 | 1 | -3/+6 |
| | |||||
* | Allow automatically detect the rustc-src directory (fixes #3517). | Benjamin Bouvier | 2021-02-13 | 1 | -1/+10 |
| | | | | | If the configured rustcSource is set to "discover", try to automatically detect a source from the sysroot rustc directory. | ||||
* | Async Loading outdir and proc-macro | Edwin Cheng | 2021-01-28 | 1 | -24/+23 |
| | |||||
* | Refactor build script data | Edwin Cheng | 2021-01-22 | 1 | -185/+12 |
| | |||||
* | Added defined_features in PackageData | Edwin Cheng | 2021-01-21 | 1 | -4/+7 |
| | |||||
* | prepare to publish el libro de arena | Aleksey Kladov | 2021-01-14 | 1 | -1/+1 |
| | |||||
* | Use --workspace when loading extern resources | Chinedu Francis Nwafili | 2021-01-14 | 1 | -1/+1 |
| | | | https://github.com/rust-analyzer/rust-analyzer/issues/5040#issuecomment-759853153 | ||||
* | Report progress for cargo metadata and output-dir | Edwin Cheng | 2021-01-07 | 1 | -6/+20 |
| | |||||
* | Document `project_model::TargetData` | Arnaud | 2021-01-06 | 1 | -0/+6 |
| | | | | This adds a description for `TargetData` and all its fields. | ||||
* | Document `project_model::PackageData` | Arnaud | 2021-01-06 | 1 | -0/+16 |
| | | | | This adds a description for `PackageData` and all its fields. | ||||
* | Merge #7071 | bors[bot] | 2020-12-31 | 1 | -0/+5 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7071: Pass --all-targets to "cargo check" when discovering external resources r=matklad a=WasabiFan There is a repro case and background in the linked issue. In short, the goal of this MR is to allow rust-analyzer to discover proc-macros which come from your tests (including, most importantly, dev-dependencies). By default, `cargo check` implies the equivalent of `--lib --bins`, meaning it'll check your libraries and binaries -- but not tests! This means proc-macros (or, I guess, build scripts as well) weren't discovered by rust-analyzer if they came from tests. One solution would be to manually add `--lib --bins --tests` (i.e., just augment the effective options to include tests). However, in this MR, I threw in `--all-targets`, which [according to the docs](https://doc.rust-lang.org/cargo/commands/cargo-check.html#target-selection) implies `--benches --examples` too. I have absolutely no idea what repercussions that will have on rust-analyzer for other projects, nor do I know if it's a problem that build scripts will now be discovered for tests/examples/benches. But I am not aware of a reason you _wouldn't_ want to discover these things in your examples too. I think the main drawback of this change is that it will likely slow down the `cargo check`. At a minimum, it'll now be checking your tests _and_ their dependencies. The `cargo check` docs also say that including `--tests` as I have here may cause your lib crate to be built _twice_, once for the normal target and again for unit tests. My reading of that caveat suggests that "building twice" means it's built once for the tests _inside_ your lib, with a test profile, and again for any consumers of your lib, now using a normal release profile or similar. This doesn't seem surprising. Very minor caveat: `--tests` will not include tests within a binary if it has `test = false` set in `Cargo.toml`. (I discovered this manually by trial-and-error, but hey, it actually says that in the docs!) This is likely not an issue, but _does_ mean that if you are -- for whatever reason -- disabling tests like that and then manually specifying `cargo test --package <...> --bin <...>` to run them, rust-analyzer will remain unaware of proc-macros in your tests. I have confirmed this fixes the original issue in my sandbox example linked in #7034 and in my own project in which I originally discovered this. I've left it configured as my default RA language server and will report back if I notice any unexpected side-effects. Fixes #7034 Co-authored-by: Kaelin Laundry <[email protected]> | ||||
| * | Pass --all-targets to "cargo check" | Kaelin Laundry | 2020-12-29 | 1 | -0/+5 |
| | | |||||
* | | add working dir to cargo metadata fail messages | lf- | 2020-12-31 | 1 | -1/+17 |
|/ | |||||
* | Fun times with rustfmt | Jon Gjengset | 2020-12-17 | 1 | -2/+1 |
| | |||||
* | Update crates/project_model/src/cargo_workspace.rs | Jon Gjengset | 2020-12-17 | 1 | -1/+1 |
| | | | Co-authored-by: Aleksey Kladov <[email protected]> | ||||
* | Default to host platform for cargo metadata | Jon Gjengset | 2020-12-17 | 1 | -2/+30 |
| | | | | | | | | | This modifies the logic for calling cargo metadata so that it will use the host platform if no explicit target platform is given. This is needed since cargo metadata defaults to outputting information for _all_ targets. Fixes #6908. | ||||
* | Use itertools | Jonas Schievink | 2020-12-10 | 1 | -3/+3 |
| | |||||
* | Replicate Cargo environment variables | Jonas Schievink | 2020-12-10 | 1 | -0/+39 |
| | |||||
* | Apply environment set by build scripts | Jonas Schievink | 2020-12-07 | 1 | -2/+15 |
| | |||||
* | Pass `--target` when loading out dirs from check | Jonas Schievink | 2020-12-07 | 1 | -0/+5 |
| | |||||
* | Cleanup workspace loading a tiny bit | Aleksey Kladov | 2020-11-13 | 1 | -8/+12 |
| | |||||
* | Add support for loading rustc private crates | Xavier Denis | 2020-11-11 | 1 | -0/+3 |
| | |||||
* | Remove more unreachable pubs | Aleksey Kladov | 2020-11-02 | 1 | -2/+2 |
| | |||||
* | Rename ra_db -> base_db | Aleksey Kladov | 2020-08-13 | 1 | -1/+1 |
| | |||||
* | Rename ra_project_model -> project_model | Pavan Kumar Sunkara | 2020-08-13 | 1 | -0/+362 |