Chayim Refael Friedman
4ea09dd9f6
Provide an config option to not set cfg(test)
2024-09-30 00:12:45 +03:00
Lukas Wirth
8905f86d8a
Remove crate graph deduplication logic
2024-09-11 11:38:42 +02:00
Laurențiu Nicola
5f7bda743f
Fix cwd used for proc macro expansion
2024-08-28 13:20:21 +03:00
bors
06a40a61b0
Auto merge of #17973 - Veykril:proc-macro-curr-dir, r=Veykril
...
Expand proc-macros in workspace root, not package root
Should fix https://github.com/rust-lang/rust-analyzer/issues/17748 . The approach is generally not perfect though as rust-project.json projects don't benefit from this (still, nothing changes in that regard)
2024-08-27 11:53:04 +00:00
Lukas Wirth
9a47e6f2c8
Expand proc-macros in workspace root, not package root
2024-08-27 13:40:24 +02:00
bors
f4dbbac7ca
Auto merge of #17956 - Veykril:metadata-err, r=Veykril
...
fix: Fix metadata retrying eating original errors
2024-08-25 07:30:09 +00:00
Lukas Wirth
191949eabe
fix: Fix metadata retrying eating original errors
2024-08-25 09:28:47 +02:00
Chayim Refael Friedman
2607c09fdd
Allow declaring cfg groups in rust-project.json, to help sharing common cfgs
2024-08-12 22:03:16 +03:00
Lukas Wirth
f053b1aa6a
feat: Load sysroot library via cargo metadata
2024-08-05 12:18:19 +02:00
Lukas Wirth
5264f86242
Encode edition within FileId in the hir layer
2024-07-18 08:49:10 +02:00
Lukas Wirth
c30bdfcc84
Use symbol in cfg
2024-07-16 10:41:42 +02:00
Hamir Mahal
7c34eb3880
style: simplify string interpolation
2024-05-30 16:18:49 -07:00
Lukas Wirth
bd37e2790b
Allow sysroots to only consist of the source root dir
2024-05-23 20:12:31 +02:00
Lukas Wirth
18ca22a98e
Show workspace info in the status bar
2024-04-26 11:28:33 +02:00
Lukas Wirth
ff56cb6e49
Extract common fields out of ProjectWorkspace variants
2024-04-21 17:03:02 +02:00
Lukas Wirth
a2ed6837bc
Allow rust files to be used linkedProjects
2024-04-21 16:26:55 +02:00
Lukas Wirth
cdb8c3a327
Fix tests being non-deterministic
2024-04-19 13:22:00 +02:00
Lukas Wirth
8989dcffd6
Support cfg overrides in all workspace kind
2024-04-19 10:59:32 +02:00
Lukas Wirth
399dbc074b
internal: Enforce utf8 paths
2024-03-19 15:39:00 +01:00
Lukas Wirth
0ccb3b8731
Move dedup-dev-deps tests into rust-analyzer crate
2024-02-16 15:47:40 +01:00
Lukas Wirth
b1404d387a
fix: Split toolchain and datalayout out of CrateData
2024-02-16 14:48:25 +01:00
Lukas Wirth
a981db53fa
fix: Pass .cargo/config.toml env vars to proc-macro server
2024-02-13 19:42:03 +01:00
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