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

Handle version output correctly when clippy-driver used #3893

Merged
merged 1 commit into from
Sep 1, 2024

Conversation

nathaniel-bennett
Copy link
Contributor

Checks to see if the output of $RUSTC --version is actually a clippy-driver version. If so, reruns with the appropriate flags to correctly output the rust version from clippy-driver.

Resolves #1544.

@rustbot
Copy link
Collaborator

rustbot commented Aug 31, 2024

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@nathaniel-bennett nathaniel-bennett changed the title Handle version output from clippy-driver when used for RUSTC_WRAPPER Handle version output correctly when clippy-driver used Aug 31, 2024
@tgross35
Copy link
Contributor

tgross35 commented Sep 1, 2024

Thanks for the fix!

Further context: #3842 added RUSTC_WRAPPER support. #3845 is the backport, it was reported on that thread that using RUSTC_WRAPPER=clippy-driver got broken from the change. This should fix it.

@tgross35 tgross35 added this pull request to the merge queue Sep 1, 2024
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Sep 1, 2024
Merged via the queue into rust-lang:main with commit 237f3e7 Sep 1, 2024
41 checks passed
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 6, 2024
Change `if let` to a `match` because it is about equal complexity. This
should allow backporting [1] easier.

Additionally, add some new documentation comments.

[1]: rust-lang#3893
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Sep 6, 2024
This is a combined cherry-pick of the following two commits:

- 18b8da9 ("Handle rustc version output correctly...")
- d61f6f6 ("Update `rustc_version_cmd`")

These two commits are squashed for the backport to slightly reduce the
amount of conflict resolution needed going forward (some small tweaks
were still needed).

This backports the following:

- <rust-lang#3893>
- <rust-lang#3903>

Handle rustc version output correctly when `clippy-driver` used

Update `rustc_version_cmd`

Change `if let` to a `match` because it is about equal complexity. This
should allow backporting [1] easier.

Additionally, add some new documentation comments.

[1]: rust-lang#3893
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 6, 2024
Change `if let` to a `match` because it is about the same complexity but
also works with our MSRV for 0.2. This should allow backporting [1]
easier, as well as future backports that touch this code.

Additionally, add some new documentation comments.

[1]: rust-lang#3893
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Sep 6, 2024
This is a combined cherry-pick of the following two commits:

- 18b8da9 ("Handle rustc version output correctly...")
- cdf12d2 ("Update `rustc_version_cmd`")

These two commits are squashed for the backport to slightly reduce the
amount of conflict resolution needed going forward (some small tweaks
were still needed).

This backports the following:

- <rust-lang#3893>
- <rust-lang#3903>

Commit 1 original message:

    Handle rustc version output correctly when `clippy-driver` used

Commit 2 original message:

    Update `rustc_version_cmd`

    Change `if let` to a `match` because it is about the same complexity but
    also works with our MSRV for 0.2. This should allow backporting [1]
    easier, as well as future backports that touch this code.

    Additionally, add some new documentation comments.

    [1]: rust-lang#3893
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 6, 2024
This is a combined cherry-pick of the following two commits:

- 18b8da9 ("Handle rustc version output correctly...")
- cdf12d2 ("Update `rustc_version_cmd`")

These two commits are squashed for the backport to slightly reduce the
amount of conflict resolution needed going forward (some small tweaks
were still needed).

This backports the following:

- <rust-lang#3893>
- <rust-lang#3903>

Commit 1 original message:

    Handle rustc version output correctly when `clippy-driver` used

Commit 2 original message:

    Update `rustc_version_cmd`

    Change `if let` to a `match` because it is about the same complexity but
    also works with our MSRV for 0.2. This should allow backporting [1]
    easier, as well as future backports that touch this code.

    Additionally, add some new documentation comments.

    [1]: rust-lang#3893

Co-authored-by: Nathaniel Bennett <me@nathanielbennett.com>
Co-authored-by: Trevor Gross <tmgross@umich.edu>
tgross35 added a commit to tgross35/rust-libc that referenced this pull request Sep 10, 2024
This is a combined cherry-pick of the following two commits:

- 18b8da9 ("Handle rustc version output correctly...")
- cdf12d2 ("Update `rustc_version_cmd`")

These two commits are squashed for the backport to slightly reduce the
amount of conflict resolution needed going forward (some small tweaks
were still needed).

This backports the following:

- <rust-lang#3893>
- <rust-lang#3903>

Commit 1 original message:

    Handle rustc version output correctly when `clippy-driver` used

Commit 2 original message:

    Update `rustc_version_cmd`

    Change `if let` to a `match` because it is about the same complexity but
    also works with our MSRV for 0.2. This should allow backporting [1]
    easier, as well as future backports that touch this code.

    Additionally, add some new documentation comments.

    [1]: rust-lang#3893

Co-authored-by: Nathaniel Bennett <me@nathanielbennett.com>
Co-authored-by: Trevor Gross <tmgross@umich.edu>
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow clippy-driver maybe?
3 participants