Lukas Wirth
8f3209ba27
internal: tool discovery prefers sysroot tools
2024-02-12 12:08:18 +01:00
Tetsuharu Ohzeki
5d1f2835af
project-model: Fix warnings about clippy str_to_string
rule
2024-02-10 01:00:40 +09:00
Johann Hemmann
fad4fa163c
cargo clippy --fix
2024-01-18 13:59:49 +01:00
Lukas Wirth
c7eb52dd7b
internal: Add unstable config for loading the sysroot sources via cargo metadata
2024-01-15 09:59:32 +01:00
Lukas Wirth
9cb13b6efb
Allow navigation targets to be duplicated when the focus range lies in the macro definition site
2023-12-06 12:38:19 +01:00
Ali Bektas
736994f026
Make test cases simpler
2023-11-23 11:52:22 +01:00
Ali Bektas
74d8fdc8fe
Update test data for crate deduping
...
Make data reflect a case where dev deps are existent.
base-db::CrateGraph::extend now adds dev dependencies for a crate
in case of its upgrading from a CrateOrigin::Lib kind of a crate to a
CrateOrigin::Local one.
2023-11-23 02:15:47 +01:00
Ali Bektas
7e4aad5ba5
v2
2023-11-23 02:15:47 +01:00
Lukas Wirth
cea84427e0
Allow setting cfgs
2023-05-28 13:43:21 +02:00
Bruno Ortiz
c372fb3495
fixing tests for windows
2023-05-02 10:59:31 -03:00
Bruno Ortiz
a3081a6774
Adding crate_root_path to crate_graph
2023-05-02 10:59:31 -03:00
Lukas Wirth
968850d7bf
Deduplicate crates when extending crate graphs
2023-04-26 11:44:11 +02:00
Lukas Wirth
10d7d7304b
Revert "Handle dev-dependency cycles"
2023-04-25 14:29:26 +02:00
Lukas Wirth
980c75bc91
Add more complex project-model test
2023-04-25 10:49:48 +02:00
Lukas Wirth
7f0fbf7f9d
Switch crate graph to use an Arena instead of a hashmap
2023-04-05 10:32:02 +02:00
Lukas Wirth
b3919ea80d
Cleanup crate_graph construction
2023-03-31 14:14:04 +02:00
Lukas Wirth
31db1fc75f
internal: Refine CrateOrigin variants
2023-03-31 10:36:13 +02:00
Lukas Wirth
607375dc20
Load proc-macros asynchronously
2023-03-25 18:06:06 +01:00
Lukas Wirth
d154ea88f9
Split out proc-macros from the CrateGraph
2023-03-25 16:46:44 +01:00
Lukas Wirth
d9c7d28e0d
Report sysroot and rustc crate loading errors
2023-03-15 11:35:34 +01:00
Lukas Wirth
d8c80e7d95
Add core lib to proc_macro dependencies
2023-03-09 12:58:07 +01:00
Maybe Waffle
249ea9502d
Set "current" edition to 2021
2023-01-31 10:51:43 +00:00
Lukas Wirth
b2598f4801
Don't fail workspace loading if sysroot can't be found
2023-01-27 13:49:28 +01:00
Lukas Wirth
384fa4b84a
fix: Fix target-data-layout fetching incorrectly passing 'rustc' to rustc
2023-01-19 21:31:08 +01:00
Yuri Astrakhan
e16c76e3c3
Inline all format arguments where possible
...
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.
The change was automatically created with, so there are far less change
of an accidental typo.
```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Lukas Wirth
a694c342fa
Fix tests not using appropriate target data
2022-12-21 20:23:43 +01:00
Lukas Wirth
33591cd3f4
Calculate the TargetDataLayout correctly for the selected target
2022-12-21 15:11:24 +01:00
Lukas Wirth
8ad4a1d118
Update sysroot crates
2022-11-07 12:01:12 +01:00
Noah Santschi-Cooney
60b432b7e9
fix model tests
2022-09-26 18:18:12 +01:00
Lukas Wirth
a6c067c06d
Simplify
2022-09-19 17:31:08 +02:00
Daniel Paoliello
c407cc554e
Add cargo.extraEnv setting
2022-09-13 11:29:14 -07:00
Lukas Wirth
5b6aefe565
Update test fixtures
2022-08-25 21:07:24 +02:00
Lukas Wirth
950de7c3c3
Use --keep-going
cargo flag when building build scripts
2022-08-09 14:31:17 +02:00
Amos Wenger
dadb83282d
Remember the difference between 'sysroot root' and 'sysroot src root', start looking in there for a rust-analyzer-proc-macro-srv binary
2022-07-25 16:07:41 +02:00
Florian Diebold
8b3ec12aac
fix: Report proc macro errors in expressions correctly as well
...
They didn't have a krate before, resulting in the generic "proc macro
not found" error.
Also improve error messages a bit more.
2022-06-28 10:43:22 +02:00
Florian Diebold
c80c34867f
Improve proc macro errors a bit
...
Distinguish between
- there is no build data (for some reason?)
- there is build data, but the cargo package didn't build a proc macro dylib
- there is a proc macro dylib, but it didn't contain the proc macro we expected
- the name did not resolve to any macro (this is now an
unresolved_macro_call even for attributes)
I changed the handling of disabled attribute macro expansion to
immediately ignore the macro and report an unresolved_proc_macro,
because otherwise they would now result in loud unresolved_macro_call
errors. I hope this doesn't break anything.
Also try to improve error ranges for unresolved_macro_call / macro_error
by reusing the code for unresolved_proc_macro. It's not perfect but
probably better than before.
2022-06-24 13:45:19 +02:00
Florian Diebold
07d78b67cb
Fix test
2022-06-20 20:34:08 +02:00
Lukas Wirth
1dd2c50298
Update test outputs
2022-06-15 18:07:37 +02:00
Lukas Wirth
7d51fc4640
Show proc-macro loading errors in unresolved-proc-macro diagnostics
2022-06-15 17:34:01 +02:00
Jonas Schievink
b2779111b4
simplify
2022-05-19 15:29:35 +02:00
Peh
1f011fa4a3
style: rename crates to kebab case
2022-05-01 10:48:58 +00:00