Skip to content
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 #118365

Merged
merged 49 commits into from
Nov 27, 2023
Merged

Subtree update of rust-analyzer #118365

merged 49 commits into from
Nov 27, 2023

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Nov 27, 2023

No description provided.

jprochazk and others added 30 commits October 28, 2023 16:34
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
internal: Remove debugging code in path resolution

Closes rust-lang#15924
Fix typo in highlight_related.rs

While reading the user manual, I noticed a random tick, so I went ahead and fixed it. The `await` keyword should be properly rendered as inline code.

![image](https://github.com/rust-lang/rust-analyzer/assets/20878432/f134a4c9-e539-4635-97ac-506790893869)
…=lnicola

fix: handle default constant values in `trait_impl_missing_assoc_item` diagnostic

A patch of rust-lang/rust-analyzer#15895, close rust-lang/rust-analyzer#15909

cc `@Veykril`
ensure renames happen after edit

This is a bugfix for an issue I fould while working on helix. Rust-analyzer currently always sends any filesystem edits (rename/file creation) before any other edits. When renaming a file that is also being edited that would mean that the edit would be discarded and therefore an incomplete/incorrect refactor (or even cause the creation of a new file in helix altough that  is probably a pub on our side).

Example:

* create a module: `mod foo` containing a `pub sturct Bar;`
* reexport the struct uneder a different name in the `foo` module using a *fully qualified path*: `pub use crate::foo::Bar as Bar2`.
* rename the `foo` module to `foo2` using rust-analyzer
* obsereve that the path is not correctly updated (rust-analyer first sends a rename `foo.rs` to `foo2.rs` and then edits `foo.rs` after)

This PR fixes that issue by simply executing all rename operations after all edit operations (while still executing file creation operations first). I also added a testcase similar to the example above.

Relevent excerpt from the LSP standard:

> Since version 3.13.0 a workspace edit can contain resource operations (create, delete or rename files and folders) as well. If resource operations are present clients need to execute the operations in the order in which they are provided. So a workspace edit for example can consist of the following two changes: (1) create file a.txt and (2) a text document edit which insert text into file a.txt. An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will cause failure of the operation. How the client recovers from the failure is described by the client capability: workspace.workspaceEdit.failureHandling
fix: better resolve assoc item with type bound

Closes rust-lang#15772
Update Arch Linux package URL in manual.adoc

The old URL returns 404 now.
chore: add use case for `PathSegment::qualifying_trait`

add use case for `PathSegment::qualifying_trait`, which introduced in rust-lang/rust-analyzer#15875
This commit provides additional initialization methods to Connection in
order to support CTRL + C sigterm handling.
…ion, r=Veykril

Cancelable Initialization

This commit provides additional initialization methods to Connection in order to support CTRL + C sigterm handling.

In the process of adding LSP to Nushell (see nushell/nushell#10941) this gap has been identified.
Partially fixes rust-lang#15656 . When a crate graph is extended which is the case when new workspaces are added to the project
the rules for deduplication were too strict. One problem that arises from this is that in certain conditions
when we see the same crate having different `CrateOrigin`s the first form would be maintained. This approach however
results in some unwanted results such as making renaming forbidden as this has been recently only made available for
local crates. The given example in rust-lang#15656 can still not be resolved with this PR as that involves taking inconsistencies
between dependencies into consideration. This will be addressed in a future PR.
Make data reflect a case where dev deps are existent.
base-db::CrateGraph::extend now adds dev dependencies for a crate
in case of its upgrading from a CrateOrigin::Lib kind of a crate to a
CrateOrigin::Local one.
@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2023

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 27, 2023
@lnicola
Copy link
Member Author

lnicola commented Nov 27, 2023

@bors r+ p=1 subtree sync

@bors
Copy link
Contributor

bors commented Nov 27, 2023

📌 Commit 0c96252 has been approved by lnicola

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 27, 2023
@lnicola
Copy link
Member Author

lnicola commented Nov 27, 2023

r? @ghost

@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2023

Failed to set assignee to ghost: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@rust-log-analyzer

This comment has been minimized.

@lnicola
Copy link
Member Author

lnicola commented Nov 27, 2023

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 27, 2023
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 27, 2023
@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2023

The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging.

cc @davidtwco, @wesleywiser

@lnicola
Copy link
Member Author

lnicola commented Nov 27, 2023

@bors r+ p=1 subtree sync

@bors
Copy link
Contributor

bors commented Nov 27, 2023

📌 Commit d036daa has been approved by lnicola

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 27, 2023
@bors
Copy link
Contributor

bors commented Nov 27, 2023

⌛ Testing commit d036daa with merge aa33051...

@bors
Copy link
Contributor

bors commented Nov 27, 2023

☀️ Test successful - checks-actions
Approved by: lnicola
Pushing aa33051 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 27, 2023
@bors bors merged commit aa33051 into rust-lang:master Nov 27, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 27, 2023
@lnicola lnicola deleted the sync-from-ra branch November 27, 2023 14:59
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (aa33051): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-2.0%, -1.4%] 2
All ❌✅ (primary) - - 0

Cycles

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 675.168s -> 675.406s (0.04%)
Artifact size: 313.39 MiB -> 313.35 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.