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

⬆️ rust-analyzer #115048

Merged
merged 118 commits into from
Aug 21, 2023
Merged

⬆️ rust-analyzer #115048

merged 118 commits into from
Aug 21, 2023

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Aug 21, 2023

No description provided.

lowr and others added 30 commits July 10, 2023 21:55
fix: Fix float parser hack creating empty NameRef tokens

Fixes rust-lang/rust-analyzer#15403
Handle `#[cfg]`s on generic parameters

Records attributes on generic parameters in the item tree and filters out generic parameters disabled by `#[cfg]`s in `generic_params_query`.

Closes rust-lang#11756
internal: convert unwrap to except and add a debug log

Remove an unsafe unwrap that can cause crashes if the value is a `SendError`.

This is my first PR on this repo, please let me know if there is anything I can improve or details I can provide.
…ith-tail-expr, r=Veykril

fix: don't use control flow when extracted fn contains tail expr of original fn

Fixes rust-lang#10113
Fixes rust-lang#15061
bors and others added 13 commits August 18, 2023 09:47
…=lnicola

minor : Deunwrap generate_derive

rust-lang#15398 subtask 1. Since the editing closure has arms, I did something *experimental* ( in this case just a clever term for bad code ) to bypass creating an `Option` but I am ready to change this.
serde 1.0.172 and up rely on opaque non-reproducible binary blobs to
function, explicitly not providing a library-level opt-out.

This is problematic for two reasons:

- directly, unauditable binary blobs are a security issue.
- indirectly, it becomes much harder to predict future behaviors of the
  crate.

As such, I am willing to go on a limb here and forbid building
rust-analyzer with those versions of serde. Normally, my philosophy is
to defer the choice to the end user, but it's also a design constraint
of rust-analyzer that we don't run random binaries downloaded from the
internet without explicit user's concent.

Concretely, this upper-bounds serde for both rust-analyzer workspace, as
well as the lsp-server lib.

See serde-rs/serde#2538 for wider context.
fix: avoid problematic serde release

serde 1.0.172 and up rely on opaque non-reproducible binary blobs to function, explicitly not providing a library-level opt-out.

This is problematic for two reasons:

- directly, unauditable binary blobs are a security issue.
- indirectly, it becomes much harder to predict future behaviors of the crate.

As such, I am willing to go on a limb here and forbid building rust-analyzer with those versions of serde. Normally, my philosophy is to defer the choice to the end user, but it's also a design constraint of rust-analyzer that we don't run random binaries downloaded from the internet without explicit user's concent.

Concretely, this upper-bounds serde for both rust-analyzer workspace, as well as the lsp-server lib.

See serde-rs/serde#2538 for wider context.
…eykril

internal: post-bump lsp-server version
feat: Implement extern crate completion

Hi, this is a draft PR for rust-lang#13002.

I have basic completion working as well as a filter for existing extern crate imports in the same file. This is based on the tests, I have not actually tried this in an editor. Before going further I think this is a good point to stop and get feedback on the
structure and approach I have taken so far. Let me know what you think :)

I will make sure to add more tests, rebase commits and align with the code style guidelines before submitting a final version.

A few specific questions :
1. Is there a better way to check for matching suggestions? right now I just test if an extern crate name starts with the current
user input.
2. Am I creating the `CompletionItem` correctly? I noticed that `use_.rs` invokes a builder where as I do not.
3. When checking for existing extern crate imports the current implementation only looks at the current source file, is that sufficient?
…kril

fix help text for rust-analyzer.check.invocation{Strategy,Location}

I highly doubt that `check.invocationLocation` only has an effect if `cargo.buildScripts.overrideCommand` is set -- looks like a copy-paste mistake from `buildScripts.invocationLocation` to me.
@rustbot
Copy link
Collaborator

rustbot commented Aug 21, 2023

r? @Mark-Simulacrum

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 21, 2023
@rustbot
Copy link
Collaborator

rustbot commented Aug 21, 2023

Some changes occurred in src/tools/rust-analyzer

cc @rust-lang/rust-analyzer

@lnicola
Copy link
Member Author

lnicola commented Aug 21, 2023

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Aug 21, 2023

📌 Commit e7ef5d8 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 Aug 21, 2023
@lnicola
Copy link
Member Author

lnicola commented Aug 21, 2023

r? @ghost

@rustbot
Copy link
Collaborator

rustbot commented Aug 21, 2023

Failed to set assignee to ghost: invalid assignee

Note: Only org members, users with write permissions, or people who have commented on the PR may be assigned.

@bors
Copy link
Contributor

bors commented Aug 21, 2023

⌛ Testing commit e7ef5d8 with merge b131feb...

@bors
Copy link
Contributor

bors commented Aug 21, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 21, 2023
@bors bors merged commit b131feb into rust-lang:master Aug 21, 2023
11 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Aug 21, 2023
@lnicola lnicola deleted the sync-from-ra branch August 21, 2023 13:13
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b131feb): 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)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 635.148s -> 636.268s (0.18%)
Artifact size: 347.01 MiB -> 346.98 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.