Aleksey Kladov
3c72fc0573
Anchor file-system operations to the file, and not to the source root.
...
Anchoring to the SourceRoot wont' work if the path is absolute:
#[path = "/tmp/foo.rs"]
mod foo;
Anchoring to a file will.
However, we *should* anchor, instead of just producing an abs path.
I can imagine a situation where, for example, rust-analyzer processes
crates from different machines (or, for example, from in-memory git
branch), where the same absolute path in different crates might refer
to different files in the end!
2020-06-16 18:45:58 +02:00
Thiébaud Weksteen
44f28f65af
Accept relative paths in rust-project.json
...
If a relative path is found as part of Crate.root_module or Root.path,
interpret it as relative to the location of the rust-project.json file.
2020-06-15 13:11:53 +02:00
bors[bot]
246c66a7f7
Merge #4867
...
4867: Cleanup URL handling r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-13 12:35:44 +00:00
Aleksey Kladov
50bbf7233d
Cleanup URL handling
2020-06-13 14:15:38 +02:00
Gabriel Valfridsson
66291d19f9
Revert "Hide squiggly for unused and unnecessary"
...
This reverts commit 599c105e6fabb2b81c2d0a11b86c0c96f6ab1b88.
2020-06-12 18:39:50 +02:00
Aleksey Kladov
663ce0e99d
Remove dead code
2020-06-11 13:34:09 +02:00
Aleksey Kladov
27ebe5d33e
Reduce OUT_DIR special casing
2020-06-10 12:08:35 +02:00
Clemens Wasser
fe21fc2d25
checkOnSafe.features and checkOnSafe.allFeatures now work identically.
2020-06-10 09:37:26 +02:00
Clemens Wasser
33b9058838
Most of the checkOnSafe options now default to the cargo equivalent.
2020-06-10 09:27:25 +02:00
Clemens Wasser
47ef544fa5
Added the rust-analyzer.checkOnSave.features option.
2020-06-10 08:51:11 +02:00
Clemens Wasser
684b6fa1b8
flycheck now uses the configured features
2020-06-09 21:47:54 +02:00
bors[bot]
38ac331f7d
Merge #4784
...
4784: Change management of test cfg to better support json projects r=Nashenas88 a=Nashenas88
This helps support json projects where they can decide whether to add the `test` cfg or not. One alternative is to add support for marking json project crates as a sysroot crate, and adding logic to remove the `test` cfg in those cases. In my opinion, that option gives less flexibility to json projects and leads to more functionality that needs to be maintained.
Fixes #4508
cc @woody77
Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
Co-authored-by: Paul Daniel Faria <nashenas88@users.noreply.github.com>
2020-06-08 16:20:45 +00:00
Paul Daniel Faria
dbceaf522b
Use Option<&str> for target instead of Option<&String>
2020-06-08 12:10:23 -04:00
Paul Daniel Faria
9c35f135b9
Remove default_cfg_options, pass target instead so it can be used for building cargo workspaces
2020-06-08 10:23:29 -04:00
vsrs
b7db9f058a
Apply suggestions from code review
2020-06-08 14:19:40 +03:00
Paul Daniel Faria
3937b225e7
Change management of test cfg to better support json projects
2020-06-07 10:29:03 -04:00
vsrs
9b4256dc4d
Add lib target filtering.
2020-06-06 22:11:17 +03:00
vsrs
3434f1dd2c
Add Run|Debug hover actions
2020-06-06 18:17:52 +03:00
vsrs
de74c0dcab
Preliminary runnables refactoring
2020-06-06 18:17:52 +03:00
vsrs
78c9223b7b
Remove hover contents marking as trusted.
...
Hover contents might be extracted from raw
doc comments and need some validation.
2020-06-05 15:25:01 +03:00
vsrs
0fe43a124b
Add capabilities tests.
2020-06-05 15:00:31 +03:00
vsrs
e35418ceb9
Apply suggestions from @kjeremy review
2020-06-05 15:00:31 +03:00
vsrs
5d0c1aa162
Rebase on the latest master.
2020-06-05 15:00:30 +03:00
vsrs
b147e6eb95
Code formatting
2020-06-05 15:00:30 +03:00
vsrs
7d0dd17b09
Add hover actions as LSP extension
2020-06-05 14:59:26 +03:00
Mikhail Rakhmanov
6cd2e04bd2
Fix more comments
2020-06-03 19:33:57 +02:00
Mikhail Rakhmanov
6a0083a519
Merge branch 'master' into compute-lazy-assits
...
# Conflicts:
# crates/rust-analyzer/src/main_loop/handlers.rs
# crates/rust-analyzer/src/to_proto.rs
2020-06-03 19:26:01 +02:00
Mikhail Rakhmanov
bacd0428fa
Fix review comments
2020-06-03 18:39:01 +02:00
bors[bot]
a33cfcb55d
Merge #4502
...
4502: Mark fixes from diagnostics as quick fixes r=kjeremy a=kjeremy
Populates the diagnostic UI with fixes:
Before:
![quickfix-before](https://user-images.githubusercontent.com/4325700/82165183-0e38df00-9882-11ea-96cf-7dab5faec4d4.PNG )
After:
![image](https://user-images.githubusercontent.com/4325700/82165193-1a24a100-9882-11ea-97d7-be1b64b135e0.png )
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-06-03 13:39:30 +00:00
Jeremy Kolb
9e71fc0314
Mark fixes from diagnostics as quick fixes
2020-06-03 09:31:32 -04:00
Aleksey Kladov
fa019c8f56
Document rust-project.json
2020-06-03 15:17:26 +02:00
Aleksey Kladov
8baa4c5d07
Groundwork for specifying the set of projects via config
2020-06-03 12:22:01 +02:00
Aleksey Kladov
03a76191a1
Rename ProjectRoot -> ProjectManifest
2020-06-03 12:05:50 +02:00
Aleksey Kladov
0a88de809f
Move project discovery
2020-06-03 12:04:27 +02:00
Aleksey Kladov
a87cd8ecc6
Rename WorldState -> GlobalState
2020-06-03 11:20:01 +02:00
Aleksey Kladov
d4b21476a8
Derive local roots from Workspaces
2020-06-03 10:52:35 +02:00
Gabriel Valfridsson
599c105e6f
Hide squiggly for unused and unnecessary
2020-06-03 01:57:28 +02:00
Mikhail Rakhmanov
cb482e6351
Merge remote-tracking branch 'upstream/master' into compute-lazy-assits
...
# Conflicts:
# crates/rust-analyzer/src/to_proto.rs
2020-06-02 23:22:45 +02:00
Mikhail Rakhmanov
57cd936c52
Preliminary implementation of lazy CodeAssits
2020-06-02 23:10:53 +02:00
bors[bot]
2f6ab77708
Merge #4710
...
4710: New runnables r=matklad a=matklad
bors d=@vsrs
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-06-02 20:44:56 +00:00
bors[bot]
0035dafbfa
Merge #4711
...
4711: Disable rust-analyzer.{cargo,checkOnSave}.allFeatures by default r=matklad a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-06-02 16:16:38 +00:00
Laurențiu Nicola
7a66d99897
Disable rust-analyzer.{cargo,checkOnSave}.allFeatures by default
2020-06-02 19:14:34 +03:00
Aleksey Kladov
bc3db7c1de
Fix tests
2020-06-02 18:09:12 +02:00
Aleksey Kladov
a83ab820a4
Spec better runnables
2020-06-02 17:34:18 +02:00
Aleksey Kladov
0303982119
New runnables API
2020-06-02 17:22:42 +02:00
Aleksey Kladov
31f282636b
Minor
2020-06-02 16:30:47 +02:00
veetaha
d605ec9c32
Change Runnable.bin -> Runnable.kind
...
As per matklad, we now pass the responsibility for finding the binary to the frontend.
Also, added caching for finding the binary path to reduce
the amount of filesystem interactions.
2020-05-31 05:21:45 +03:00
veetaha
a419cedb1c
Fix tests, apply code review proposals
2020-05-31 03:10:23 +03:00
veetaha
030d78345f
Fix invoking cargo without consulting CARGO or standard installation paths
2020-05-31 03:10:23 +03:00
Roland Ruckerbauer
18aa4bcb03
Add semantic highlight to QUESTION token
...
Made it an operator with controlFlow modifier.
2020-05-29 21:17:14 +02:00