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

Tracking issue for future-incompatibility lint soft_unstable #64266

Open
petrochenkov opened this issue Sep 7, 2019 · 3 comments
Open

Tracking issue for future-incompatibility lint soft_unstable #64266

petrochenkov opened this issue Sep 7, 2019 · 3 comments
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-future-incompatibility Category: Future-incompatibility lints C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@petrochenkov
Copy link
Contributor

petrochenkov commented Sep 7, 2019

What is this lint about

When some feature is unstable, but was allowed on stable due to some stability checking hole or oversight we may unstabilize it in a "soft" way to avoid breaking crates depending on the crates using the feature.

This soft unstabilization can be done using this lint.

How to fix this warning/error

Remove or cfg-out uses of the unstable feature in configurations of your code that are supposed to build on stable.

Current status

@petrochenkov petrochenkov added A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Sep 7, 2019
@Centril Centril added C-future-incompatibility Category: Future-incompatibility lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue. and removed C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Sep 7, 2019
@lqd
Copy link
Member

lqd commented Oct 4, 2019

#[deny(soft_unstable)] is on by default, but the error message (playground) still has a lint-like note warning mentioning it will become a hard error in the future:

= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #64266 <https://github.com/rust-lang/rust/issues/64266>

do we need an issue for this ?

Centril added a commit to Centril/rust that referenced this issue Jan 11, 2020
feature_gate: Remove `GateStrength`

The "soft feature gating" from `feature_gate/check.rs` is unused, and even if it were used, hardcoded warning is not a good solution and [deny-by-default lint](rust-lang#64266) would be a better way to do this.

cc rust-lang#67806 (comment)
r? @Centril
Centril added a commit to Centril/rust that referenced this issue Jan 11, 2020
feature_gate: Remove `GateStrength`

The "soft feature gating" from `feature_gate/check.rs` is unused, and even if it were used, hardcoded warning is not a good solution and [deny-by-default lint](rust-lang#64266) would be a better way to do this.

cc rust-lang#67806 (comment)
r? @Centril
apyrgio added a commit to apyrgio/tindercrypt that referenced this issue Mar 17, 2021
The generated Rust code from our proto files triggers a warning in Rust
nightly, which we treat as an error:

    error: custom inner attributes are unstable
    Error:  --> src/../proto/metadata.rs:9:4
      |
    9 | #![rustfmt::skip]
      |    ^^^^^^^^^^^^^
      |
      = note: `#[deny(soft_unstable)]` on by default
      = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
      = note: for more information, see issue #64266 <rust-lang/rust#64266>

This is already reported in the `rust-protobuf` repo [1] so until it's
fixed, we choose to silence this warning to make our builds work.

[1]: stepancheg/rust-protobuf#551
apyrgio added a commit to apyrgio/tindercrypt that referenced this issue Mar 17, 2021
The generated Rust code from our proto files triggers a warning in Rust
nightly, which we treat as an error:

    error: custom inner attributes are unstable
    Error:  --> src/../proto/metadata.rs:9:4
      |
    9 | #![rustfmt::skip]
      |    ^^^^^^^^^^^^^
      |
      = note: `#[deny(soft_unstable)]` on by default
      = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
      = note: for more information, see issue #64266 <rust-lang/rust#64266>

This is already reported in the `rust-protobuf` repo [1] so until it's
fixed, we choose to silence this warning to make our builds work.

[1]: stepancheg/rust-protobuf#551
scottlamb added a commit to scottlamb/moonfire-nvr that referenced this issue Mar 24, 2021
The CI nightly builds had been broken with the following error:

```
error: custom inner attributes are unstable
  --> /home/runner/work/moonfire-nvr/moonfire-nvr/server/target/debug/build/moonfire-db-415ce696a754c614/out/schema.rs:10:4
   |
10 | #![rustfmt::skip]
   |    ^^^^^^^^^^^^^
   |
   = note: `#[deny(soft_unstable)]` on by default
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #64266 <rust-lang/rust#64266>
```

I'd thought this was by mistake given that #[rustfmt::skip] is still
advertised on rustfmt's github page, but maybe not. Looks like
rust-protobuf's newest version uses
`#![cfg_attr(rustfmt, rustfmt::skip)]` to avoid this error.

Also fix a warning on nightly about an extraneous semicolon.
@Stargateur
Copy link
Contributor

Stargateur commented Aug 31, 2021

So this feature is used to make breaking change to avoid breaking change ? The concept of solf_unstable don't make any sense for me, specially if #[deny(soft_unstable)] is default. It's just a more complicate way that produce the same result. Or I'm missing something.

#[stability(level=2.33333333, wind-strenght=5.3)] (not from me, author probably wishes to stay in shadow)

@yaahc
Copy link
Member

yaahc commented May 16, 2022

I think I might need to use this for #95956 as well

cafkafk added a commit to eza-community/eza that referenced this issue Sep 27, 2023
See: rust-lang/rust#64266
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Omnikron13 pushed a commit to Omnikron13/eza that referenced this issue Mar 17, 2024
See: rust-lang/rust#64266
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
@fmease fmease changed the title Tracking issue for soft_unstable compatibility lint Tracking issue for future-incompatibility lint soft_unstable Sep 14, 2024
@fmease fmease added the C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. label Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. C-future-incompatibility Category: Future-incompatibility lints C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
Archived in project
Development

No branches or pull requests

6 participants