lucasholten
cdc972499e
Automatically sort crate graph
2025-01-02 15:50:51 +01:00
lucasholten
86441c5bb9
Fix tests
2025-01-01 16:42:29 +01:00
lucasholten
e12fe30351
Remove load_cargo_with_fake_sysroot
2025-01-01 16:24:21 +01:00
lucasholten
e15df1f414
Add back tests removed in #18080
2024-12-31 15:48:58 +01:00
Lukas Wirth
fd4635c99c
fix: Populate cargo config env vars for crates
2024-12-31 14:32:35 +01:00
Lukas Wirth
029261f9cc
Cleanup target fetching for cargo metadata
2024-12-24 17:49:07 +01:00
David Richey
3c98b98ca7
Re-add rust-analyzer.cargo.sysrootQueryMetadata
2024-11-18 16:29:33 -06:00
Lukas Wirth
e5af3ae427
fix: Fix CI running analysis-stats incorrectly against the standard libraries
2024-10-18 12:34:55 +02:00
Chayim Refael Friedman
4a06675e9c
Gate #[test] expansion under cfg(test).
...
This will mean users opting to not activate `cfg(test)` will lose IDE experience on them, which is quite unfortunate, but this is unavoidable if we want to avoid false positives on e.g. diagnostics. The real fix is to provide IDE experience even for cfg'ed out code, but this is out of scope for this PR.
2024-09-30 00:12:45 +03:00
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