-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
#121581
Subtree update of rust-analyzer
#121581
Conversation
Now that we have both `delayed_bug` and `span_delayed_bug`, it makes sense to use the generic term "delayed bug" more.
This mostly works well, and eliminates a couple of delayed bugs. One annoying thing is that we should really also add an `ErrorGuaranteed` to `proc_macro::bridge::LitKind::Err`. But that's difficult because `proc_macro` doesn't have access to `ErrorGuaranteed`, so we have to fake it.
Uses the native VSCode support for `SnippetTextEdit`s, but in a semi-hacky way as it's not fully supported yet.
We can't tell vscode to not add in the extra indentation, so we instead opt to remove it from the edits themselves, and then let vscode add it back in.
internal: Sync from downstream
internal: Downgrade actions/checkout in release workflow
internal: Also downgrade actions/setup-node
internal: Also downgrade node to 16 :roll_eyes:
fix: checkout repo before run typos I see some typos at lastest master :(
…t-edit, r=Veykril feat: Support multiple tab stops for completions in VSCode Uses the native VSCode support for `SnippetTextEdit`s. Fixes rust-lang#13229 and fixes rust-lang#8531. https://github.com/rust-lang/rust-analyzer/assets/13354275/a2d2c033-bb30-4f34-92ca-bf3f4f744cdc This is done in a slightly hacky way, as `vscode-languageclient` can't convert RA's `SnippetTextEdit`s into vscode `SnippetTextEdit`s and will appear to use a [different format](https://github.com/microsoft/vscode-languageserver-node/blob/295aaa393fda8ecce110c38880a00466b9320e63/types/src/main.ts#L1501-L1516) in the future. --- ~~Marked as draft since as-is, this will cause completions to double-indent any multi-line code generated.~~ **Update:** This also fixes up edits so that any multi-line code won't be double-indented.
Commit 6a06f6f (Deduplicate reference search results, 2022-11-07) deduplicates references within each definition. There is an edge case when requesting references of a macro argument. Apparently, our descend_into_macros() stanza in references.rs produces a cartesian product of - references inside the macro times - times references outside the macro. Since the above deduplication only applies to the references within a single definition, we return them all, leading to many redundant references. Work around this by deduplicating definitions as well. Perhaps there is a better fix to not produce this cartesian product in the first place; but I think at least for definitions the problem would remain; a macro can contain multiple definitions of the same name, but since the navigation target will be the unresolved location, it's the same for all of them. We can't use unique() because we don't want to drop references that don't have a declaration (though I dont' have an example for this case). I discovered this working with the "bitflags" macro from the crate of the same name. Fixes rust-lang#16357
test: include `rename_path_inside_use_tree`. Keeps tracks the progress of the changes. 3 other tests broke with the changes of this. feat: rename all other usages within the current file. feat: fix most of the implementation problems. test: `rename_path_inside_use_tree` tests a more complicated scenario.
…h-macros, r=Veykril Deduplicate references when some of them are in macro expansions EDIT: I wonder if this is a regression, I'll try to investigate. Commit 6a06f6f (Deduplicate reference search results, 2022-11-07) deduplicates references within each definition. Apparently our descend_into_macros() stanza returns one definition for each time a name is used in a macro. Each of those definitions has the same set of references. We return them all, leading to many redundant references. Work around this by deduplicating definitions as well. Perhaps there is a better fix to not produce duplicate definitions in the first place. I discovered this working with the "bitflags" macro from the crate of the same name. Fixes rust-lang#16357
…643, r=Veykril internal: fix deadlock introduced by rust-lang#16643 This fixes a deadlock introduced by rust-lang#16643 ([backtrace](https://gist.github.com/davidbarsky/00f17598f5496a9c41aff31fec1c42d6)). `maybe_changed_after` calls back into other queries, so the cloning here is unfortunately inevitable. (Zulip conversation: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Fixing.20proc-macro.20dirtying.20with.20unindexed.20projects)
…, r=lnicola Add short flag -V for consistency with other rust tooling Minor change to add the `-V` short flag to `rust-analyzer` to bring it in-line with other rust tooling such as: > rustc -V ```bash rustc 1.76.0 (07dca48 2024-02-04) ``` > rustup -V ```bash rustup 1.26.0 (5af9b9484 2023-04-05) info: This is the version for the rustup toolchain manager, not the rustc compiler. info: The currently active `rustc` version is `rustc 1.76.0 (07dca48 2024-02-04)` ``` > cargo -V ```bash cargo 1.76.0 (c84b36747 2024-01-18) ```
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 |
This comment has been minimized.
This comment has been minimized.
@bors r+ |
@bors r- |
@bors r+ p=1 subtree sync |
☀️ Test successful - checks-actions |
Finished benchmarking commit (43fdd49): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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: 648.977s -> 649.797s (0.13%) |
This is all noise - regressions revert in the next run. @rustbot label: +perf-regression-triaged |
r? @ghost