-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Subtree update of rust-analyzer
#124202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subtree update of rust-analyzer
#124202
Conversation
…l-targets` to cargo invocations
minor: sync from downstream
update: add editor/extension information to bug report template When attempting to reproduce issues, I encounter difficulties due to differences in versions of LSP clients and editors (such as rust-lang#16985, rust-lang#16867, and more) This sometimes consumes a lot of efforts from contributors to communicate the details about LSP client information. Therefore, I believe adding editor/extension information to the issue template would be helpful for problem reproduction.
Fix tasks in tasks.json rust-lang#16839 refactored the representation of tasks inside the VS Code extension. However, this data type is exposed to users, who can define their own tasks in the same format in `tasks.json` or `.code-workspace`. Revert the data type to have a `command` field rather than a `program` field, and document the different fields. This code is also a little complex, so split out a `cargoToExecution` to handle the Task to Execution conversion logic. After this change, any tasks.json with a `command` field works again. For example, the following tasks.json works as expected: ``` { "version": "2.0.0", "tasks": [ { "type": "cargo", "command": "build", "problemMatcher": [ "$rustc" ], "group": "build", "label": "my example cargo build task" } ] } ``` Fixes rust-lang#16943 rust-lang#16949
…Veykril feat: Add `rust-analyzer.cargo.allTargets` to configure passing `--all-targets` to cargo invocations Closes rust-lang#16859 ## Unresolved question: Should this be a setting for build scripts only ? All the other `--all-targets` I found where already covered by `checkOnSave.allTargets`
Fix crate IDs when multiple workspaces are loaded Previously, we assumed that the crate numbers in a `rust-project.json` always matched the `CrateId` values in the crate graph. This isn't true when there are multiple workspaces, because the crate graphs are merged and the `CrateId` values in the merged graph are different. This broke flycheck (see first commit), because we were unable to find the workspace when a file changed, so we every single flycheck, producing duplicate compilation errors. Instead, use the crate root module path to look up the relevant flycheck. This makes `ProjectWorkspace::Json` consistenet with `ProjectWorkspace::Cargo`. Also, define a separate JSON crate number type, to prevent bugs like this happening again.
pattern analysis: Use contiguous indices for enum variants The main blocker to using the in-tree version of the `pattern_analysis` crate is that rustc requires enum indices to be contiguous because it uses `IndexVec`/`BitSet` for performance. Currently we swap these out for `FxHashMap`/`FxHashSet` when the `rustc` feature is off, but we can't do that if we use the in-tree crate. This PR solves the problem by using contiguous indices on the r-a side too.
fix: Fix `allFeatures` config docs
internal: Fix new nightly clippy lints
fix: silence mismatches involving unresolved projections fix rust-lang#16801
fix: handle escaped chars in doc comments fix rust-lang#16980. For `ast::LiteralKind::String`, store the original string value.
internal: Cleanup cfg and env handling in project-model Fixes rust-lang/rust-analyzer#16122 (comment) `miri` and `debug_assertions` are now enabled via the `cargo.cfgs` config by default, allowing them to be disabled by overwriting the config.
…rsion-of-node-in-metrics-yml, r=lnicola fix: usage of `deprecated` version of `Node.js` fixes rust-lang#17103.
Cargo script mvp Based on rust-lang/rust-analyzer#15456, As the original PR stated, detached files are still horrendous to work with.
minor: Add in-rust-tree feature to hir-expand CC rust-lang#124199 (comment)
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
@bors r+ p=1 subtree sync |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
Finished benchmarking commit (54692c3): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 672.886s -> 671.454s (-0.21%) |
r? @ghost