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

libtest --include-ignored nightly-gating is confusing #65770

Closed
ehuss opened this issue Oct 24, 2019 · 1 comment · Fixed by #80053
Closed

libtest --include-ignored nightly-gating is confusing #65770

ehuss opened this issue Oct 24, 2019 · 1 comment · Fixed by #80053
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-libtest Area: #[test] related A-stability Area: issues related to #[stable] and #[unstable] attributes themselves. C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@ehuss
Copy link
Contributor

ehuss commented Oct 24, 2019

The libtest --include-ignored flag is intended to be unstable, but it does not present a clear way to use it.

> cargo +nightly test -- --include-ignored
error: The "include-ignored" flag is only accepted on the nightly compiler
error: test failed, to rerun pass '--lib'

Hmm, I'm running on nightly. Only through some sleuthing can one find out that you have to pass -Zunstable-options to make it work:

cargo +nightly test -- --include-ignored -Zunstable-options

There are several issues here (some of which were noted in the original PR):

  • The text "is only accepted on the nightly compiler" should probably say something about -Zunstable-options.
  • The text "is only accepted on the nightly compiler" is wrong, it works on stable, too. And this isn't a compiler.
  • There is no tracking issue for this feature, so there is nowhere to discuss it. Should one be created?
  • The --help text gives no indication that this flag is unstable.
  • Is there any reason not to just stabilize it now?
@jonas-schievink jonas-schievink added A-diagnostics Area: Messages for errors, warnings, and lints A-libtest Area: #[test] related C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. A-stability Area: issues related to #[stable] and #[unstable] attributes themselves. labels Oct 24, 2019
Centril added a commit to Centril/rust that referenced this issue Mar 24, 2020
Request "-Z unstable-options" for unstable options

Explicitly requests the "-Z unstable-options" flag if someone attempts to use
a cargo option gated by it. This enhances discoverability, particularly in the
instance where the user is on the nightly compiler but isn't using the flag.

This relates to, but does not end with or resolve, issue rust-lang#65770.
Centril added a commit to Centril/rust that referenced this issue Mar 24, 2020
Request "-Z unstable-options" for unstable options

Explicitly requests the "-Z unstable-options" flag if someone attempts to use
a cargo option gated by it. This enhances discoverability, particularly in the
instance where the user is on the nightly compiler but isn't using the flag.

This relates to, but does not end with or resolve, issue rust-lang#65770.
@gilescope
Copy link
Contributor

I think it's a footgun that cargo test -- --ignored is the only stable option. We should eliminate that footgun by stabilising --include-ignored.

How does one nominate for stabilising something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-libtest Area: #[test] related A-stability Area: issues related to #[stable] and #[unstable] attributes themselves. C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants