-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: Stabilize build.warnings
#16796
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
base: master
Are you sure you want to change the base?
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 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -64,6 +64,7 @@ recursive_example = "rr --example recursions" | |||||||||
| space_example = ["run", "--release", "--", "\"command list\""] | ||||||||||
|
|
||||||||||
| [build] | ||||||||||
| warnings = "warn" # adjust the effective lint level for warnings | ||||||||||
| jobs = 1 # number of parallel jobs, defaults to # of CPUs | ||||||||||
| rustc = "rustc" # the rust compiler tool | ||||||||||
| rustc-wrapper = "…" # run this wrapper instead of `rustc` | ||||||||||
|
|
@@ -457,6 +458,20 @@ recursive_example = "rr --example recursions" | |||||||||
|
|
||||||||||
| The `[build]` table controls build-time operations and compiler settings. | ||||||||||
|
|
||||||||||
| ### `build.warnings` | ||||||||||
| * Type: string | ||||||||||
| * Default: `warn` | ||||||||||
| * Environment: `CARGO_BUILD_WARNINGS` | ||||||||||
|
|
||||||||||
| Adjust the effective lint level for warnings. | ||||||||||
| Allowed values are: | ||||||||||
| * `warn`: continue to emit the lints as warnings (default). | ||||||||||
| * `allow`: hide the lints. | ||||||||||
| * `deny`: emit an error for a crate that has warnings. Use `--keep-going` to see see the warnings for all crates. | ||||||||||
|
|
||||||||||
| Only warnings within the user's control to resolve or adjust the level of are affected, | ||||||||||
|
Contributor
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. Should we be more precise about what "user's control to resolve" means?
Contributor
Author
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. That is what I was seeking to clarify by providing examples. |
||||||||||
| e.g. leaving as-is non-lint warnings or warnings from dependencies visible through `--verbose --verbose`. | ||||||||||
|
Comment on lines
+472
to
+473
Contributor
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.
Suggested change
Contributor
Author
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. I was going for this to be descriptive, rather than prescriptive, and felt listing the cases as examples would help set that tone. |
||||||||||
|
|
||||||||||
| #### `build.jobs` | ||||||||||
| * Type: integer or string | ||||||||||
| * Default: number of logical CPUs | ||||||||||
|
|
||||||||||
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.
This section seems confusing between the terms lint and warning.
The following sounds like all warnings have a lint level that we're adjusting.
This sounds like all lints can have an adjustable lint level that we're changing here.
This is now emitting errors for warnings not lints.
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.
It is tricky to talk about this precisely enough while not adding so many qualifiers that it makes it hard to follow. My intent with the last paragraph ("Only warnings") was to clarify this.