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

[DO NOT MERGE] [BETA] rustfmt: gate assigning style-edition on nightly as well #135197

Closed
wants to merge 4 commits into from

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Jan 7, 2025

r? @ghost

pietroalbini and others added 3 commits January 6, 2025 20:28
When `-Cstrip` was changed to use the bundled rust-objcopy instead of
/usr/bin/strip on OSX, strip-like arguments were preserved.

But strip and objcopy are, while being the same binary, different, they
have different defaults depending on which binary they are.
Notably, strip strips everything by default, and objcopy doesn't strip
anything by default.

Additionally, `-S` actually means `--strip-all`, so debuginfo stripped
everything and symbols didn't strip anything.

We now correctly pass `--strip-debug` and `--strip-all`.
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 7, 2025
@jieyouxu jieyouxu changed the base branch from master to beta January 7, 2025 12:11
@jieyouxu jieyouxu changed the title [DO NOT MERGE] rustfmt: gate assigning style-edition on nightly as well [DO NOT MERGE] [BETA] rustfmt: gate assigning style-edition on nightly as well Jan 7, 2025
@rust-log-analyzer

This comment was marked as off-topic.

@jieyouxu jieyouxu closed this Jan 7, 2025
@jieyouxu jieyouxu reopened this Jan 7, 2025
@jieyouxu
Copy link
Member Author

jieyouxu commented Jan 7, 2025

Yippee

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 7, 2025
…r=ytmimi,compiler-errors

rustfmt: drop nightly-gating of the `--style-edition` flag registration

Follow-up to [Stabilize `style_edition = "2024"` in-tree rust-lang#134929](rust-lang#134929).

rust-lang#134929 un-nightly-gated the *read* of `--style-edition`, but didn't also un-nightly-gate the *registration*/*declaration* of the `--style-edition` flag itself. Reading `--style-edition` on a non-nightly channel (e.g. beta) will thus panic because `--style-edition` is never declared.

This PR also un-nightly-gates the registration. Not sure how to write a regression test for this, because this *requires* the non-nightly / beta channel. Though existing tests do fail (albeit indirectly).

Checking if this fixes the panic against beta in rust-lang#135197.

r? rustfmt
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 7, 2025
…r=ytmimi,compiler-errors

rustfmt: drop nightly-gating of the `--style-edition` flag registration

Follow-up to [Stabilize `style_edition = "2024"` in-tree rust-lang#134929](rust-lang#134929).

rust-lang#134929 un-nightly-gated the *read* of `--style-edition`, but didn't also un-nightly-gate the *registration*/*declaration* of the `--style-edition` flag itself. Reading `--style-edition` on a non-nightly channel (e.g. beta) will thus panic because `--style-edition` is never declared.

This PR also un-nightly-gates the registration. Not sure how to write a regression test for this, because this *requires* the non-nightly / beta channel. Though existing tests do fail (albeit indirectly).

Checking if this fixes the panic against beta in rust-lang#135197.

r? rustfmt
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 8, 2025
Rollup merge of rust-lang#135200 - jieyouxu:stabilize-style-edition, r=ytmimi,compiler-errors

rustfmt: drop nightly-gating of the `--style-edition` flag registration

Follow-up to [Stabilize `style_edition = "2024"` in-tree rust-lang#134929](rust-lang#134929).

rust-lang#134929 un-nightly-gated the *read* of `--style-edition`, but didn't also un-nightly-gate the *registration*/*declaration* of the `--style-edition` flag itself. Reading `--style-edition` on a non-nightly channel (e.g. beta) will thus panic because `--style-edition` is never declared.

This PR also un-nightly-gates the registration. Not sure how to write a regression test for this, because this *requires* the non-nightly / beta channel. Though existing tests do fail (albeit indirectly).

Checking if this fixes the panic against beta in rust-lang#135197.

r? rustfmt
@jieyouxu jieyouxu closed this Jan 8, 2025
@jieyouxu jieyouxu deleted the exp-beta-release branch January 8, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants