-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
#124199
Closed
Closed
Subtree update of rust-analyzer
#124199
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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
internal: Remove rustc core test cfg hacks cc rust-lang/rust-analyzer#16538
…to be overwritten
…=Veykril feat: Add convert From to TryFrom assist Adds a new code assist to convert a `From` impl into a `TryFrom` impl. This is useful in situations where it turns out after or halfway through writing a `From` implementation that the conversion is actually fallible. ## Example https://github.com/rust-lang/rust-analyzer/assets/26360861/872ec7c4-c9ff-451c-9453-4baaaad47326
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.
rustbot
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Apr 20, 2024
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 |
CC @RalfJung |
This comment has been minimized.
This comment has been minimized.
I'm a bit worried about the extra commit causing issues, I'll wait for rust-lang/rust-analyzer#17114. |
bors
added a commit
to rust-lang/rust-analyzer
that referenced
this pull request
Apr 20, 2024
minor: Add in-rust-tree feature to hir-expand CC rust-lang/rust#124199 (comment)
With josh I have had extra commits like that several times without problems. It's just yet another commit that needs to be synced into the subrepo later.
With git subtree I can't tell.^^
|
Never had issues with these and git-subtree (it's indeed just an extra commit), but it feels safer this way. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
r? @ghost