aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* Use Option<&str> for target instead of Option<&String>Paul Daniel Faria2020-06-081-3/+3
|
* Remove default_cfg_options, pass target instead so it can be used for ↵Paul Daniel Faria2020-06-081-13/+13
| | | | building cargo workspaces
* Change management of test cfg to better support json projectsPaul Daniel Faria2020-06-071-6/+7
|
* Document rust-project.jsonAleksey Kladov2020-06-031-2/+8
|
* Rename ProjectRoot -> ProjectManifestAleksey Kladov2020-06-031-15/+15
|
* Move project discoveryAleksey Kladov2020-06-031-2/+14
|
* Merge pull request #4382 from woody77/json_cfgsAleksey Kladov2020-06-031-0/+10
|\ | | | | Begin transition to new fields for JsonProject crate cfgs
| * Begin transition to new fields for JsonProject crate cfgsAaron Wood2020-05-091-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | This starts the transition to a new method of documenting the cfgs that are enabled for a given crate in the json file. This is changing from a list of atoms and a dict of key:value pairs, to a list of strings that is equivalent to that returned by `rustc --print cfg ..`, and parsed in the same manner by rust-analyzer. This is the first of two changes, which adds the new field that contains the list of strings. Next change will complete the transition and remove the previous fields.
* | Make some stuff public so that they can be reused by other toolsPavan Kumar Sunkara2020-05-141-1/+1
| |
* | Simpify project discoveryveetaha2020-05-091-36/+15
| |
* | Add stderr to error messageAleksey Kladov2020-05-081-1/+6
| |
* | CleanupAleksey Kladov2020-05-081-16/+16
| |
* | Rename ra_env -> ra_toolchainAleksey Kladov2020-05-081-1/+1
| |
* | Merge #4329bors[bot]2020-05-081-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | |
| * | more generic, find rustc as wellCraig Disselkoen2020-05-061-0/+1
| | |
* | | Move feature desugaring to the right abstraction layerAleksey Kladov2020-05-081-2/+12
| | |
* | | Merge #4296bors[bot]2020-05-071-0/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 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-7/+1
| | |
| * | Support build.rs cargo:rustc-cfgrobojumper2020-05-041-0/+7
| |/
* | Remove code duplicatesChristophe MASSOLIN2020-05-051-12/+6
| |
* | Pass cargo.target to rustcChristophe MASSOLIN2020-05-051-5/+13
|/
* Avoid lossy OsString conversionsLaurențiu Nicola2020-04-251-4/+8
|
* Unmix error handling when discovering workspacesAleksey Kladov2020-04-161-55/+23
| | | | | Hitting an io::Error is a legit problem. Finding more than one Cargo.toml is not.
* Decouple project loading from project discovery a bitAleksey Kladov2020-04-161-100/+121
|
* Migrate to privacy as per review commetsveetaha2020-04-021-2/+8
|
* Less mutabilityveetaha2020-04-021-19/+23
|
* Migrate to iters some moreveetaha2020-04-021-18/+11
|
* Migrate to iteratorsveetaha2020-04-021-15/+3
|
* Simpify workspace handlingveetaha2020-04-021-29/+17
|
* Reduce scope of deserializationAleksey Kladov2020-04-011-3/+3
|
* Add ProcMacroClientEdwin Cheng2020-03-251-1/+40
|
* Use target-name for crate-nameEdwin Cheng2020-03-211-3/+3
|
* Simplify SysrootAleksey Kladov2020-03-191-5/+5
|
* More direct CargoWorkspaceAleksey Kladov2020-03-191-20/+20
|
* Support specifying OUT_DIR in json projectEmil Lauridsen2020-03-171-3/+21
|
* Change existing OUT_DIR override config to make use of new infrastructureEmil Lauridsen2020-03-171-22/+6
|
* Support loading OUT_DIR from cargo check at launchEmil Lauridsen2020-03-171-7/+36
|
* Fix crate display name dashesKirill Bulatov2020-03-161-2/+5
|
* Add extern sourceEdwin Cheng2020-03-111-3/+10
|
* Setup Env in worldEdwin Cheng2020-03-101-3/+15
|
* Consider crate declaration namesKirill Bulatov2020-03-081-6/+7
|
* keep one CargoTomlNotFoundErrornmio2020-02-291-28/+31
|
* remove code used for testingnmio2020-02-271-1/+1
|
* fix unneeded bodynmio2020-02-271-6/+2
|
* fixes and improvementsnmio2020-02-271-23/+49
|
* clean upnmio2020-02-251-7/+2
|
* Initial debugging codenmio2020-02-241-5/+42
|
* Add suggestion for failed path resolutionYoshua Wuyts2020-02-231-1/+1
| | | | This adds https://github.com/rust-analyzer/rust-analyzer/issues/3245 as an inline help text for when path resolution fails.
* More manual clippy fixesKirill Bulatov2020-02-181-29/+38
|