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

Rename debugging_opts to unstable_opts #98975

Merged
merged 1 commit into from
Jul 14, 2022
Merged

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jul 6, 2022

This is no longer used only for debugging options (e.g. -Zoutput-width, -Zallow-features).
Rename it to be more clear.

cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Codegen.20options.20.2F.20debugging.20options

r? @Amanieu cc @nikic @joshtriplett

@jyn514 jyn514 added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 6, 2022
@rustbot
Copy link
Collaborator

rustbot commented Jul 6, 2022

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 6, 2022
Copy link
Member Author

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left comments on the changes which aren't a blanket "debugging_opts" => "unstable_opts" change

@@ -366,7 +366,7 @@ fn opts() -> Vec<RustcOptGroup> {
)
}),
unstable("Z", |o| {
o.optmulti("Z", "", "internal and debugging options (only on nightly build)", "FLAG")
o.optmulti("Z", "", "unstable / perma-unstable options (only on nightly build)", "FLAG")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably have a rustdoc reviewer - @camelid does this new description look good?

@@ -1652,12 +1652,12 @@ pub fn parse_crate_edition(matches: &getopts::Matches) -> Edition {
edition
}

fn check_debug_option_stability(
debugging_opts: &DebuggingOptions,
fn check_error_format_stability(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change wasn't automatic

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing these out!

@@ -1186,12 +1186,13 @@ options! {
}

options! {
DebuggingOptions, DB_OPTIONS, dbopts, "Z", "debugging",
UnstableOptions, Z_OPTIONS, dbopts, "Z", "unstable",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change wasn't automatic - I think "unstable" is a good new description, and Z_OPTIONS isn't super descriptive, but neither was DB_OPTIONS.


// This list is in alphabetical order.
//
// If you add a new option, please update:
// - compiler/rustc_interface/src/tests.rs
// - src/doc/unstable-book/src/compiler-flags
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this PR, but seems like a good change. happy to split it into a separate PR.

Comment on lines +1579 to 1586
/// This name is kind of confusing: Most unstable options enable something themselves, while
/// this just allows "normal" options to be feature-gated.
unstable_options: bool = (false, parse_bool, [UNTRACKED],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note the new way to use this is unstable_opts.unstable_options

@jyn514 jyn514 force-pushed the unstable_opts branch 2 times, most recently from 0567674 to 06b3235 Compare July 6, 2022 13:40
@jyn514
Copy link
Member Author

jyn514 commented Jul 6, 2022

This description doesn't seem to be used anywhere? IMO we should probably just remove all these if they're not used.
https://github.com/rust-lang/rust/blob/06b32351046d062a063628d759f7ce1611561c24/compiler/rustc_session/src/config.rs#L1413

Oh never mind, it seems to be used in our man pages. (I didn't know we had man pages?) nope, the man pages are manually edited, not autogenerated. We should probably find a way to autogenerate them if we want them to be accurate ...

@wesleywiser
Copy link
Member

This description doesn't seem to be used anywhere? IMO we should probably just remove all these if they're not used.

https://github.com/rust-lang/rust/blob/06b32351046d062a063628d759f7ce1611561c24/compiler/rustc_session/src/config.rs#L1413

Oh never mind, it seems to be used in our man pages. (I didn't know we had man pages?) nope, the man pages are manually edited, not autogenerated. We should probably find a way to autogenerate them if we want them to be accurate ...

Can we go ahead and update that just for consistency?

Copy link
Member

@wesleywiser wesleywiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this @jyn514! I reviewed all of the changes and overall this looks great to me. I'm going to hold off on the r+ for a few days so others can weigh in.

compiler/rustc_span/src/lib.rs Show resolved Hide resolved
src/librustdoc/config.rs Outdated Show resolved Hide resolved
@@ -1652,12 +1652,12 @@ pub fn parse_crate_edition(matches: &getopts::Matches) -> Edition {
edition
}

fn check_debug_option_stability(
debugging_opts: &DebuggingOptions,
fn check_error_format_stability(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing these out!

compiler/rustc_session/src/config.rs Outdated Show resolved Hide resolved
@bors
Copy link
Contributor

bors commented Jul 7, 2022

☔ The latest upstream changes (presumably #99014) made this pull request unmergeable. Please resolve the merge conflicts.

@jyn514
Copy link
Member Author

jyn514 commented Jul 10, 2022

@wesleywiser it's been a few days, including weekdays and a weekend - do you think it's ok to merge now? This bitrots quite quickly.

@jyn514 jyn514 assigned wesleywiser and unassigned Amanieu Jul 10, 2022
@wesleywiser
Copy link
Member

Yes, please r=me after a rebase. Thanks for doing this!

@jyn514
Copy link
Member Author

jyn514 commented Jul 11, 2022

@bors r=wesleywiser rollup=never

@bors
Copy link
Contributor

bors commented Jul 11, 2022

📌 Commit dde82482724c206cbdb2dd7ccd604182912e2921 has been approved by wesleywiser

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 Jul 11, 2022
@bors
Copy link
Contributor

bors commented Jul 12, 2022

☔ The latest upstream changes (presumably #99165) made this pull request unmergeable. Please resolve the merge conflicts.

@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 Jul 12, 2022
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`).
Rename it to be more clear.
@jyn514
Copy link
Member Author

jyn514 commented Jul 13, 2022

@bors r=wesleywiser rollup=never

@bors
Copy link
Contributor

bors commented Jul 13, 2022

📌 Commit 3c9765c has been approved by wesleywiser

It is now in the queue for this repository.

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

bors commented Jul 14, 2022

⌛ Testing commit 3c9765c with merge 0ed9c64...

@bors
Copy link
Contributor

bors commented Jul 14, 2022

☀️ Test successful - checks-actions
Approved by: wesleywiser
Pushing 0ed9c64 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 14, 2022
@bors bors merged commit 0ed9c64 into rust-lang:master Jul 14, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 14, 2022
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #98975!

Tested on commit 0ed9c64.
Direct link to PR: #98975

💔 miri on windows: test-fail → build-fail (cc @RalfJung @oli-obk).
💔 miri on linux: test-fail → build-fail (cc @RalfJung @oli-obk).
💔 rls on windows: test-pass → build-fail (cc @Xanewok).
💔 rls on linux: test-pass → build-fail (cc @Xanewok).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jul 14, 2022
Tested on commit rust-lang/rust@0ed9c64.
Direct link to PR: <rust-lang/rust#98975>

💔 miri on windows: test-fail → build-fail (cc @RalfJung @oli-obk).
💔 miri on linux: test-fail → build-fail (cc @RalfJung @oli-obk).
💔 rls on windows: test-pass → build-fail (cc @Xanewok).
💔 rls on linux: test-pass → build-fail (cc @Xanewok).
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0ed9c64): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 🎉 relevant improvement found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-1.1% -1.1% 1
All 😿🎉 (primary) N/A N/A 0

Max RSS (memory usage)

Results
  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
2.3% 2.3% 1
Improvements 🎉
(primary)
-1.1% -1.1% 1
Improvements 🎉
(secondary)
-2.2% -2.2% 3
All 😿🎉 (primary) -1.1% -1.1% 1

Cycles

Results
  • Primary benchmarks: mixed results
  • Secondary benchmarks: mixed results
mean1 max count2
Regressions 😿
(primary)
2.6% 2.6% 1
Regressions 😿
(secondary)
2.1% 2.1% 1
Improvements 🎉
(primary)
-2.6% -2.6% 1
Improvements 🎉
(secondary)
-3.7% -3.7% 1
All 😿🎉 (primary) 0.0% 2.6% 2

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@jyn514 jyn514 deleted the unstable_opts branch July 14, 2022 12:15
@jyn514
Copy link
Member Author

jyn514 commented Jul 14, 2022

This only renames some variables, I doubt the improvements are real (seems more likely those benchmarks are high variance)

flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 18, 2022
Rename `debugging_opts` to `unstable_opts`

This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`).
Rename it to be more clear.

cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Codegen.20options.20.2F.20debugging.20options

r? `@Amanieu` cc `@nikic` `@joshtriplett`
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants