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

Add -Zfuture-incompat-test to assist with testing future-incompat reports. #86478

Merged
merged 1 commit into from
Jul 15, 2021

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jun 20, 2021

This adds a -Zfuture-incompat-test cli flag to assist with testing future-incompatible reports. This flag causes all lints to be treated as a future-incompatible lint, and will emit a report for them. This is being added so that Cargo's testsuite can reliably test the reporting infrastructure. Right now, Cargo relies on using array_into_iter as a test subject. Since the breaking "future incompatible" lints are never intended to last forever, this means Cargo's testsuite would always need to keep changing to choose different lints (for example, #86330 proposed dropping that moniker for array_into_iter). With this flag, Cargo's tests can trigger any lint and check for the report.

@rust-highfive
Copy link
Collaborator

r? @matthewjasper

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 20, 2021
bors added a commit to rust-lang/cargo that referenced this pull request Jun 29, 2021
Temporarily disable future_incompat tests.

The `array_into_iter` lint is no longer future-breaking (via rust-lang/rust#86330), so these tests won't work anymore.  This disables the tests until rust-lang/rust#86478 is merged to provide a way to start testing again.
@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 6, 2021
@@ -1077,6 +1077,8 @@ options! {
"set the optimization fuel quota for a crate"),
function_sections: Option<bool> = (None, parse_opt_bool, [TRACKED],
"whether each function should go in its own section"),
future_incompat_test: bool = (false, parse_bool, [UNTRACKED],
"forces all lints to be future incompatible (default: no)"),
Copy link
Contributor

Choose a reason for hiding this comment

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

This should mention that it's a testing flag not meant for actual usage beyond tests

@oli-obk
Copy link
Contributor

oli-obk commented Jul 12, 2021

r=me after rebase and bless over #87070

@oli-obk
Copy link
Contributor

oli-obk commented Jul 12, 2021

r? @oli-obk

@bors
Copy link
Contributor

bors commented Jul 13, 2021

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

@ehuss
Copy link
Contributor Author

ehuss commented Jul 14, 2021

@bors r=oli-obk rollup

@bors
Copy link
Contributor

bors commented Jul 14, 2021

📌 Commit 636fcac has been approved by oli-obk

@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 14, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jul 15, 2021
Add -Zfuture-incompat-test to assist with testing future-incompat reports.

This adds a `-Zfuture-incompat-test` cli flag to assist with testing future-incompatible reports. This flag causes all lints to be treated as a future-incompatible lint, and will emit a report for them. This is being added so that Cargo's testsuite can reliably test the reporting infrastructure.  Right now, Cargo relies on using array_into_iter as a test subject. Since the breaking "future incompatible" lints are never intended to last forever, this means Cargo's testsuite would always need to keep changing to choose different lints (for example, rust-lang#86330 proposed dropping that moniker for array_into_iter). With this flag, Cargo's tests can trigger any lint and check for the report.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jul 15, 2021
Add -Zfuture-incompat-test to assist with testing future-incompat reports.

This adds a `-Zfuture-incompat-test` cli flag to assist with testing future-incompatible reports. This flag causes all lints to be treated as a future-incompatible lint, and will emit a report for them. This is being added so that Cargo's testsuite can reliably test the reporting infrastructure.  Right now, Cargo relies on using array_into_iter as a test subject. Since the breaking "future incompatible" lints are never intended to last forever, this means Cargo's testsuite would always need to keep changing to choose different lints (for example, rust-lang#86330 proposed dropping that moniker for array_into_iter). With this flag, Cargo's tests can trigger any lint and check for the report.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 15, 2021
Rollup of 8 pull requests

Successful merges:

 - rust-lang#85579 (Added Arc::try_pin)
 - rust-lang#86478 (Add -Zfuture-incompat-test to assist with testing future-incompat reports.)
 - rust-lang#86947 (Move assert_matches to an inner module)
 - rust-lang#87081 (Add tracking issue number to `wasi_ext`)
 - rust-lang#87127 (Add safety comments in private core::slice::rotate::ptr_rotate function)
 - rust-lang#87134 (Make SelfInTyParamDefault wording not be specific to type defaults)
 - rust-lang#87147 (Update cargo)
 - rust-lang#87154 (Fix misuse of rev attribute on <a> tag)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9813013 into rust-lang:master Jul 15, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jul 15, 2021
@Aaron1011
Copy link
Member

@ehuss Are you planning to update Cargo to make use of this flag in its tests? If not, I could do it.

@ehuss
Copy link
Contributor Author

ehuss commented Jul 16, 2021

The PR to add it has already been merged: rust-lang/cargo#9698 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants