rust/crates
bors[bot] d63bb8565e
Merge #3781
3781: Add crate versions when running cargo -p commands. r=matklad a=o0Ignition0o

If someone (unfortunately) creates a project that happens to have the same name as one of its (future) dependencies, there is [a way for them to change the dependency's alias in the Cargo.toml file](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml), to mitigate the name conflict. Unfortunately cargo -p commands don't seem to pick it up, which seems to put rust-analyzer run commands in a tough situation: 

```
> Executing task: cargo test --package config --example default -- tests --nocapture <

error: There are multiple `config` packages in your project, and the specification `config` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
  config:0.1.0
  config:0.9.3
The terminal process terminated with exit code: 101
```

cargo suggests us to be more specific and refer to a package by its name and version, which this PR achieves.

I passed the version as a String because I don't really understand how the ra_db types work, but I would love to switch it to [a fully fledged Version type](https://steveklabnik.github.io/semver/semver/index.html) if you guide me towards that :)



Co-authored-by: o0Ignition0o <jeremy.lempereur@gmail.com>
2020-03-31 12:45:39 +00:00
..
ra_arena Simplify Arena to use a generic index 2020-03-19 18:46:30 +01:00
ra_assists Use IntoIter 2020-03-30 12:28:22 +02:00
ra_cargo_watch Fix the endless progress bar issue 2020-03-30 14:38:01 +03:00
ra_cfg Update versions 2020-02-18 16:12:40 +02:00
ra_db Merge #3727 2020-03-26 17:09:32 +00:00
ra_fmt update itertools version to 0.9.0 2020-03-23 16:22:46 -07:00
ra_hir Cleanup memory usage stats 2020-03-25 19:35:46 +01:00
ra_hir_def Nice string formatting 2020-03-28 12:27:54 +01:00
ra_hir_expand Merge #3727 2020-03-26 17:09:32 +00:00
ra_hir_ty Simplify 2020-03-28 23:48:37 +02:00
ra_ide Reload only the properties that do not affect vfs 2020-03-30 13:39:14 +03:00
ra_ide_db Reload only the properties that do not affect vfs 2020-03-30 13:39:14 +03:00
ra_mbe Remove deps on tt_mbe 2020-03-27 00:46:40 +08:00
ra_parser Fix parsing lambdas with return type 2020-03-25 17:01:28 +01:00
ra_proc_macro Remove deps on tt_mbe 2020-03-27 00:46:40 +08:00
ra_prof Fix race in the tests 2020-03-30 11:33:01 +02:00
ra_project_model Add crate versions when running cargo -p commands. 2020-03-31 14:43:39 +02:00
ra_syntax Attach doc-comment to declaration if there are newlines in between 2020-03-31 14:27:23 +02:00
ra_text_edit Remove some TextUnit->usize escapees 2020-03-12 22:33:27 -04:00
ra_tt Remove deps on tt_mbe 2020-03-27 00:46:40 +08:00
rust-analyzer Add crate versions when running cargo -p commands. 2020-03-31 14:43:39 +02:00
stdx Fix typo 2020-03-30 18:51:30 +02:00
test_utils Move verbose tests out of line 2020-03-13 12:20:42 +01:00