-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Lint on invalid values passed to x.py --warnings #62406
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -405,7 +405,7 @@ impl Config { | |
config.incremental = flags.incremental; | ||
config.dry_run = flags.dry_run; | ||
config.keep_stage = flags.keep_stage; | ||
if let Some(value) = flags.warnings { | ||
if let Some(value) = flags.deny_warnings { | ||
config.deny_warnings = value; | ||
} | ||
|
||
|
@@ -571,7 +571,7 @@ impl Config { | |
config.rustc_default_linker = rust.default_linker.clone(); | ||
config.musl_root = rust.musl_root.clone().map(PathBuf::from); | ||
config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from); | ||
set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings)); | ||
set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh also, this inversion of priority won't disturb CI somehow? I don't know exactly how CI passes its parameters but I seem to recall it's not through There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's true. CI doesn't pass the |
||
set(&mut config.backtrace_on_ice, rust.backtrace_on_ice); | ||
set(&mut config.rust_verify_llvm_ir, rust.verify_llvm_ir); | ||
set(&mut config.rust_remap_debuginfo, rust.remap_debuginfo); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So argument parsing here is some kind of two-stage process?
&[String]
->Flags
->Config
? And this is specifically for what gets passed on the cmdline?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that's correct -- configuration loading is a bit non-ideal.