3186 Commits

Author SHA1 Message Date
Lukas Wirth
aae7da261e
Merge pull request #19809 from flodiebold/push-txyotwlvvkln
internal: Catch panics in inference in analysis-stats
2025-05-19 10:12:31 +00:00
Lukas Wirth
575d43e1ce Debounce workspace fetching for workspace structure changes 2025-05-19 08:55:38 +02:00
Lukas Wirth
3866336d41
Merge pull request #19757 from Veykril/push-zzxwtzuzqvzx
perf: Request cancellation while processing changed files
2025-05-19 06:20:31 +00:00
Florian Diebold
dde53614ed Catch panics in inference in analysis-stats 2025-05-17 15:25:20 +02:00
Lukas Wirth
0843d06ad2
Merge pull request #19807 from Veykril/lw-qyynkqysuyuy
fix: Don't overwrite `RUSTUP_TOOLCHAIN` if it is already set
2025-05-16 13:21:15 +00:00
Lukas Wirth
09ecc4cbf6 fix: Don't overwrite RUSTUP_TOOLCHAIN if it is already set 2025-05-16 14:52:28 +02:00
Lukas Wirth
8d9b318a85 perf: Request cancellation while processing changed files 2025-05-08 10:18:17 +02:00
Chayim Refael Friedman
1c7a94f37d Add a --num-threads to the prime-caches CLI command
And make it parallel by default (and remove the `--parallel` flag) to mirror the IDE cache priming.
2025-05-05 23:55:11 +03:00
Lukas Wirth
235d88bf42 Render more lifetimes 2025-05-02 14:36:18 +02:00
Matthias Krüger
573c47c9ba remove a couple of clones 2025-05-01 11:41:42 +02:00
Lukas Wirth
9fa647c129 Update salsa 2025-04-29 19:26:19 +02:00
Lukas Wirth
d11dbf648f Cleanup cfg check handling in expression store lowering 2025-04-29 11:44:11 +02:00
Lukas Wirth
7d9b839f9c refactor: Clean up cache priming cancellation handling 2025-04-29 10:40:31 +02:00
Lukas Wirth
0fee71065b
Merge pull request #19704 from Veykril/push-wrvznvvpvtvp
Add expression fill mode variant for filling with underscore expressions
2025-04-28 09:45:04 +00:00
Lukas Wirth
7e526b6be7 Add expression fill mode variant for filling with underscore expressions 2025-04-28 10:39:36 +02:00
David Richey
0a3e0032e6 Always error when failed to parse DiscoverProjectMessage 2025-04-24 22:59:39 -05:00
Chayim Refael Friedman
57c019a3c5 Adapt for new cycle handling changing in Salsa 2025-04-22 15:20:05 +03:00
Lukas Wirth
34e7d60e30
Merge pull request #19644 from ChayimFriedman2/const-syms
internal: Make predefined symbols `const` instead of `static`
2025-04-21 12:34:59 +00:00
Lukas Wirth
00887db152
Merge pull request #19629 from jyn514/unset-env
allow using `null` to unset an environment variable
2025-04-21 12:22:26 +00:00
Lukas Wirth
5680911972 fix: Fix completion_snippets_custom config always erroring 2025-04-21 08:18:11 +02:00
Lukas Wirth
af301a88ec Back out "When changing the config, do not emit an error if a field is missing"
This backs out commit 8497fc321cad420b923e15f600106f8e22324930.
2025-04-21 08:10:00 +02:00
Chayim Refael Friedman
0f325c7ff8 Remove unnecessary predefined symbol clones
Now that they're const it's no longer needed.

Nothing manual was performed: only a regexp search of `sym::([\w][\w\d]*)\.clone\(\)` and replace by `sym::$1`.
2025-04-21 03:10:13 +03:00
Chayim Refael Friedman
8497fc321c When changing the config, do not emit an error if a field is missing 2025-04-20 22:45:25 +03:00
Chayim Refael Friedman
ff62cf63e6 Remove unused macro arm 2025-04-20 22:37:02 +03:00
bbb651
c7cf6bf7c3 doc: Fix dead manual links 2025-04-20 20:28:52 +03:00
bbb651
2ffcb99683 doc: Rework generated configuration to have anchors
Also first line of default code blocks being used as the language instead of json
and fixes a missing `json` language in a doc comment code block.
2025-04-20 19:29:54 +03:00
Chayim Refael Friedman
150bb4a00f
Merge pull request #19617 from ChayimFriedman2/more-actual
internal: Make `HirFileId`, `EditionedFileId` and macro files Salsa struct
2025-04-19 19:21:53 +00:00
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
jyn
3b964a7105 allow using null to unset an environment variable
this makes three changes:
- all callsites of `toolchain::command` are changed to use
  `command(path, extra_env)`, instead of manually adding the env after
  the fact.
- all `map<str, str>` are changed to `map<str, option<str>>`.
- `command` checks for None and calls `env_remove` if so.

this caught several places where environment variables weren't being
propagated:
- when running `rustc --print=target-libdir`
- when running `cargo rustc -- --print=target-spec-json`
- when running the custom DiscoverLinkedProjects config. I *think* this
  is for use with non-cargo build systems, so I didn't change it.
2025-04-19 12:15:22 -04:00
jyn
46ce4746e6 don't ignore config values that fail to parse
previously, these would just silently be ignored. now they give a
warning such as:
```
invalid config values: /completion/snippets/custom: invalid type: null, expected a map; /cargo/extraEnv: invalid type: null, expected a string;
```
2025-04-19 10:08:05 -04:00
yukang
5abe9e66b0 Ignore errors from rustfmt which may trigger error notification 2025-04-14 09:33:38 +08:00
duncan
06770e0c9a fix clippy::useless-conversion 2025-04-11 16:23:47 +01:00
duncan
d51ecf8a41 exclude build script targets from testing 2025-04-11 16:16:20 +01:00
duncan
6d50737732 test only packages that are workspace members 2025-04-11 15:03:38 +01:00
duncan
604d78568c use underscores in the target name for test update notifications 2025-04-11 14:15:13 +01:00
David Barsky
71c4a0d4af internal: cleanup CLI flag documentation 2025-04-10 11:30:59 -04:00
David Barsky
2888069a87 internal: add prime-caches subcommand 2025-04-10 11:18:33 -04: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
David Barsky
99a2b676bc internal: rename children_modules to child_modules 2025-04-09 12:43:49 -04:00
Lukas Wirth
f4747f2617
Merge pull request #19255 from geetanshjuneja/master
Add children modules feature
2025-04-09 09:53:25 +00:00
Lukas Wirth
1fd9520c92 refactor: Lower type-refs before type inference
This refactors how we deal with items in hir-def lowering.

- It now lowers all of them through an "ExpressionStore" (kind of a misnomer as this point) as their so called *Signatures.
- We now uniformly lower type AST into TypeRefs before type inference.
- Likewise, this moves macro expansion out of type inference, resulting in a single place where we do non-defmap macro expansion.
- Finally, this PR removes a lot of information from ItemTree, making the DefMap a lot less likely to be recomputed and have it only depend on actual early name resolution related information (not 100% true, we still have ADT fields in there but thats a follow up removal).
2025-04-09 10:43:23 +02:00
geetanshjuneja
1f7c3e8b92 added children modules 2025-04-07 21:14:01 +05:30
Lukas Wirth
55c8cdeafb
Merge pull request #19519 from snprajwal/project-control-no-deps
feat(project-model): provide flag for no deps
2025-04-04 16:50:27 +00:00
David Barsky
9aa99eec60 internal: fix salsa-ified crate graph working with lazy project discovery 2025-04-04 12:14:55 -04:00
BenjaminBrienen
2462624a7d prefer default over new 2025-04-04 15:49:50 +02:00
Prajwal S N
865681d779
feat(project-model): provide flag for no deps
A Cargo project can now be built without any dependency metadata being fetched.

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-04 18:57:10 +05:30
Prajwal S N
e02d76aa61
fix(ide-assists): remove AssistKind::None
This was being used by a single assist, which qualifies under the "refactor"
kind. The variant has been removed, and all usages updated accordingly.

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-03 14:38:31 +05:30
Ross Delinger
1b49b41248 fix: Fix panic in progress due to splitting unicode incorrectly 2025-03-31 17:32:02 -07:00
Lukas Wirth
1e1571e1c8 fix: Fix new nightly lints 2025-03-31 13:27:54 +02:00
David Barsky
19b62b2778 analysis-stats: redesign printing of item tree stats 2025-03-24 14:04:07 -07:00