Craig Disselkoen
ffaef1b7ae
ra_project_model: look for Cargo in more places
...
See #3118
2020-05-05 16:12:56 -07:00
Christophe MASSOLIN
0ab4340cdb
Rename defaultTarget
to target
2020-05-05 18:01:54 +02:00
Christophe MASSOLIN
e7523511ce
[config] remove RustcConfig
2020-04-28 00:17:23 +02:00
Christophe MASSOLIN
ed5af989f4
[config] rename cargo.defaultTarget
2020-04-28 00:15:54 +02:00
Christophe MASSOLIN
b7edffe244
Started rust-analyzer.cargo.defaultTarget implementation
2020-04-27 00:11:04 +02:00
Aleksey Kladov
aa669c5ba5
Don't print cargo version to stdout, breaking everything
2020-04-24 23:02:10 +02:00
Aleksey Kladov
6c400b3e33
More helpful error message if toolchain is not in PATH
2020-04-24 22:01:32 +02:00
Jeremy Kolb
d7f3d858ad
Some clippy fixes
2020-04-19 15:15:49 -04:00
o0Ignition0o
f643b4b5f5
Unique package by name and version.
...
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.
2020-04-02 09:00:44 +02:00
Aleksey Kladov
4936abdd49
Reduce scope of deserialization
2020-04-01 18:51:16 +02:00
Aleksey Kladov
1e012eb991
Move all config to config
2020-04-01 17:22:56 +02:00
Aleksey Kladov
8d27829781
Reduce deps
2020-03-31 19:29:11 +02:00
Aleksey Kladov
70730d7655
Rename cargo_watch -> flycheck
2020-03-31 17:29:40 +02:00
Edwin Cheng
1b8a26653f
Use matches in is_dylib
2020-03-31 22:20:18 +08:00
Edwin Cheng
503cbd3f4b
Implement ra_proc_macro client logic
2020-03-31 22:20:18 +08:00
o0Ignition0o
331d1db317
Add crate versions when running cargo -p commands.
...
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.
2020-03-31 14:43:39 +02:00
Edwin Cheng
d0b6ed4441
Add ProcMacroClient
2020-03-26 03:29:45 +08:00
veetaha
ce73c43848
ra_cargo_watch: return Result<> from run_cargo(), and don't read stderr for now
...
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
2020-03-21 23:37:15 +02:00
Aleksey Kladov
f840fcb2f5
Simplify Arena to use a generic index
2020-03-19 18:46:30 +01:00
Aleksey Kladov
516fe293a8
More direct CargoWorkspace
2020-03-19 17:53:31 +01:00
Emil Lauridsen
2dd887de47
Use dyn-ref instead of impl to impact compile times the least
2020-03-17 14:56:53 +01:00
Emil Lauridsen
5af81b8456
Slight readablity improvement
2020-03-17 14:56:14 +01:00
Emil Lauridsen
e154132c91
Remove outDirOverrides
2020-03-17 14:55:44 +01:00
Emil Lauridsen
f5a2fcf8f5
Change existing OUT_DIR override config to make use of new infrastructure
2020-03-17 14:47:05 +01:00
Emil Lauridsen
33c6c7abc6
Support loading OUT_DIR from cargo check at launch
2020-03-17 14:47:05 +01:00
Kirill Bulatov
eceaf94f19
More manual clippy fixes
2020-02-18 16:12:37 +02:00
Kirill Bulatov
b8ddcb0652
Run cargo +nightly fix --clippy -Z unstable-options
2020-02-18 16:03:08 +02:00
Adam Bratschi-Kaye
6f2cab1368
Add error context to failures in ra_project_model
using anyhow
crate ( #3119 )
...
Add error context to failures in ra_project_model using anyhow crate
2020-02-13 11:10:50 +01:00
Aleksey Kladov
c2e3dba8cb
Add a FIXME note
2020-01-30 18:01:38 +01:00
Edwin Cheng
c32be4bfe8
Ignore illform node id from metadata
2020-01-28 17:08:17 +08:00
Emil Lauridsen
d6da18e99d
Address nit
2020-01-10 22:41:52 +01:00
Emil Lauridsen
1d1eea217d
Slightly more robust cargo watcher root search
2020-01-10 22:10:26 +01:00
Edwin Cheng
4ee3c5202e
Only add features flags if non-empty
2019-12-24 00:27:48 +08:00
Aleksey Kladov
f720855e1e
Use all-features by default
2019-12-14 17:05:12 +01:00
oxalica
af4eb26645
Support setting cargo features
2019-12-13 18:16:34 +08:00
JasperDeSutter
6a8b4f873a
add proc-macro crate type handling
2019-11-24 16:55:56 +01:00
Aleksey Kladov
0861ac061e
Cleanup errors
2019-11-22 14:08:18 +03:00
Metabaron
53b9c1c8d8
return Error instead of panicking in from_cargo_metadata
2019-11-12 12:01:13 +01:00
Metabaron
b69738590c
Implement FromStr for enum Edition
2019-11-12 12:01:13 +01:00
uHOOCCOOHu
1067a1c5f6
Read default cfgs from rustc
2019-10-03 02:28:03 +08:00
Alexander Andreev
fdbd6bb11a
Added test for check doc strings in crates.
...
#1856
2019-09-30 11:58:53 +03:00
Aleksey Kladov
d751bd08bf
cleanup
2019-08-06 10:57:16 +02:00
Aleksey Kladov
1834bae5b8
allow rustfmt to reorder imports
...
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
2019-07-04 23:09:09 +03:00
Muhammad Mominul Huque
9709bd39ca
Get rid of failure: ra_lsp_server & ra_project_model
2019-06-15 02:42:56 +06:00
Alan Du
40424d4222
Fix clippy::identity_conversion
2019-06-04 18:05:07 -04:00
Roberto Vidal
7c7cfc5f04
Sends cwd info for runnables and code lenses
2019-04-14 10:04:38 +02:00
Florian Diebold
70839b7ef8
Make edition handling a bit nicer and allow specifying edition in crate_graph macro
2019-02-13 20:31:47 +01:00
Florian Diebold
3a9934e2c3
Keep track of crate edition
2019-02-13 20:10:46 +01:00
Pascal Hertleif
4fd3613434
Fix some typos
2019-02-12 15:02:57 +01:00
Florian Diebold
12c70871cc
Remove SmolStr from project model
2019-02-09 11:15:25 +01:00