Chayim Refael Friedman
c58ddafe90
Make HirFileId
, EditionedFileId
and macro files Salsa struct
...
And make more queries non-interned.
Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
2025-04-19 22:10:52 +03:00
Chayim Refael Friedman
8a9a1e3345
Remove all upcasts!
...
It turns out there were a lot redundant too.
2025-04-10 11:08:38 +03:00
Lukas Wirth
e7ce86ddea
fix: Fix format_args
lowering for >=1.87
2025-04-06 10:05:56 +02:00
BenjaminBrienen
2462624a7d
prefer default over new
2025-04-04 15:49:50 +02:00
Lukas Wirth
1c7f253ec9
chore: Remove unnecessary Arc
clones
2025-04-01 13:18:37 +02:00
Lukas Wirth
faf1b49a9a
fix: Fix, clarify and require a value for proc_macro_cwd
of CrateData
2025-03-29 08:08:48 +01:00
Lukas Wirth
454e4be40d
refactor: Use MEDIUM durability for crate-graph changes, high for library source files
...
The idea here is that the crate graph may change over time, but library source file contents *never* will (or really never should). Disconnecting the two means that queries that depend on library sources will not need to re-validatewhen the crate graph changes (unless they depend on the crate graph in some capacity).
2025-03-26 06:46:49 +01:00
Lukas Wirth
d4122434dd
chore: Remove unused dependencies
2025-03-23 08:08:17 +01:00
Lukas Wirth
b5eedad8e3
refactor: Remove unnecessary Arc
2025-03-16 10:27:48 +01:00
Lukas Wirth
7edfeb9674
refactor: Remove CrateGraphBuilder::iter_mut
2025-03-16 10:24:15 +01:00
BenjaminBrienen
7535bb4661
cargo fmt
2025-03-15 21:32:01 +01:00
Lukas Wirth
db4ba3a991
Merge pull request #19364 from Veykril/push-uonyorwwzpzx
...
fix: Fix missing `with_durability` calls
2025-03-15 15:09:18 +00:00
Lukas Wirth
f19c416d45
fix: Fix missing with_durability
calls
2025-03-15 15:53:23 +01:00
Florian Diebold
c1102ac703
Avoid recursively debug printing crates
2025-03-14 19:02:06 +01:00
David Barsky
788232b355
internal: don't panic when the crate graph isn't ready #19351
2025-03-13 15:14:08 -04:00
Chayim Refael Friedman
c94e9efbef
Salsify the crate graph
...
I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
2025-03-12 21:02:30 +02:00
David Barsky
74620e64ec
internal: port rust-analyzer to new Salsa
2025-03-10 13:30:51 -04:00
BenjaminBrienen
bd7375a58f
enable doctest
2025-02-27 14:58:46 +01:00
Mehul Arora
3a31741627
Use correct working directory for non-workspace proc-macro execution
2025-02-17 10:36:32 -05:00
Lukas Wirth
ab5e821d97
Expose symbol of CrateName
2025-02-04 14:38:58 +01:00
Wilfred Hughes
7f6b8745c8
minor: Fix grammar in doc comments
...
"too" should be "to" here.
2025-01-10 17:38:14 -08:00
lucasholten
cdc972499e
Automatically sort crate graph
2025-01-02 15:50:51 +01:00
lucasholten
947dfdce0c
Add back optimizations
2024-12-31 15:48:58 +01:00
lucasholten
6043412342
Add back crate graph deduplication
2024-12-31 15:47:29 +01:00
Lukas Wirth
7085328185
Remove patch sysroot cfg-if hack
2024-12-09 11:42:51 +01:00
David Barsky
ccee36e8dd
chore: rename salsa to ra_salsa
2024-10-14 10:09:22 -04:00
Lukas Wirth
f7ca085690
Remove ImportSource::ExternCrate as the fixed point loop can't affect it
2024-10-05 15:02:47 +02:00
Lukas Wirth
db04f514f2
Lift out workspace related data into a separate query to preserve crategraph deduplication
2024-09-11 12:16:41 +02:00
Lukas Wirth
8905f86d8a
Remove crate graph deduplication logic
2024-09-11 11:38:42 +02:00
Lukas Wirth
2e2f798a74
minor: Downgrade cyclic deps error to warning
2024-09-01 10:02:41 +02:00
Lukas Wirth
fa48bc216c
Revert "feat: Implement module_path
macro"
2024-08-27 08:19:09 +02:00
Lukas Wirth
d44a3ab30c
internal: Implement module_path
macro
2024-08-21 13:50:05 +02:00
Lukas Wirth
d2fe906a62
Remove unnecessary CfgFlag definition in project-model
2024-08-07 14:27:59 +02:00
Vincent Esche
7dec7e92ea
Replace [package.repository] = "…"
of published crates with [package.repository.workspace] = true
2024-08-06 00:26:42 +02:00
Vincent Esche
624f2ead7b
Unify package descriptions by adding references to "rust-analyzer"
...
With the lack of a README on the individually published library crates and the somewhat cryptic `ra_ap_` prefix it is hard to figure out where those crates belong to, so mentioning "rust-analyzer" feels like auseful hint there.
2024-08-06 00:25:02 +02:00
Vincent Esche
e9ee0d4166
Replace "ra_ap_ide
" with "ide
(aka ra_ap_ide
)"
2024-08-06 00:25:02 +02:00
Vincent Esche
6f329e6d5b
Add repository URL for published crates' missing [package.repository]
fields
2024-08-06 00:25:02 +02:00
Vincent Esche
b5b0f4bc5a
Replace "TBD"
with more helpful desciptions in published crates' [package.description]
fields
2024-08-06 00:25:02 +02:00
Lukas Wirth
188c577855
Newtype ErasedFileAstId
2024-08-05 13:46:47 +02:00
Lukas Wirth
fcb88832de
Simplify FileDelegate
2024-08-05 13:03:03 +02:00
Lukas Wirth
7beac14cba
Internal: Cleanup proc-macro error handling
2024-07-26 14:38:19 +02:00
Lukas Wirth
6d4989b3c7
Make LRU opt-in
2024-07-19 18:38:08 +02:00
Lukas Wirth
8e3133f118
Reduce maximum LRU size to 2^16 entries, reducing memory footprint of LRU entries
2024-07-19 17:48:12 +02:00
Lukas Wirth
5264f86242
Encode edition within FileId in the hir layer
2024-07-18 08:49:10 +02:00
Lukas Wirth
df5f1777b8
More symbol usage
2024-07-16 12:05:16 +02:00
Lukas Wirth
21a3d01875
Remove inline rust_2018_idioms, unused_lifetimes
lint warn, Cargo.toml already enforces this
2024-06-30 15:23:54 +02:00
Wilfred Hughes
27182bb96b
chore: Prefer tracing span shorthand macros
2024-06-06 16:52:25 -07:00
Lukas Wirth
56552f4839
Push macro-parsing error calculation out of fundamental queries
2024-05-13 16:56:26 +02:00
Lukas Wirth
a268eaf053
fix: Correctly handle no_core
/no_std
for preludes
2024-05-02 10:50:28 +02:00
Wilfred Hughes
c981ff0944
fix: Tracing span names should match function names
...
When viewing traces, it's slightly confusing when the span name doesn't
match the function name. Ensure the names are consistent.
(It might be worth moving most of these to use #[tracing::instrument]
so the name can never go stale. @davidbarsky suggested that is marginally
slower, so I've just done the simple change here.)
2024-04-30 11:22:47 -07:00