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

Remove deprecation warning: #61

Closed

Conversation

schneems
Copy link
Contributor

warning: `default_features` is deprecated in favor of `default-features` and will not work in the 2024 edition
(in the `tokio` dependency)
    Checking itoa v1.0.9
    Checking serde v1.0.192
   Compiling fs-err v2.11.0 (/home/runner/work/fs-err/fs-err)
    Checking ryu v1.0.15
    Checking serde_json v1.0.100

```
warning: `default_features` is deprecated in favor of `default-features` and will not work in the 2024 edition
(in the `tokio` dependency)
    Checking itoa v1.0.9
    Checking serde v1.0.192
   Compiling fs-err v2.11.0 (/home/runner/work/fs-err/fs-err)
    Checking ryu v1.0.15
    Checking serde_json v1.0.100
```
@schneems
Copy link
Contributor Author

I'm getting an unexpected error in CI and not sure why. This PR was an attempt to diagnose it. There's still a deprecation warning in the output, but it's not related to this failure:

error: unexpected `cfg` condition name: `rustc_1_63`
  --> src/path.rs:[16](https://github.com/andrewhickman/fs-err/actions/runs/9925686637/job/27418370104#step:8:17):11
   |
16 |     #[cfg(rustc_1_63)]
   |           ^^^^^^^^^^
   |
   = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rustc_1_63)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rustc_1_63)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: `-D unexpected-cfgs` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`

That cfg should be emitted by autocfg which was added in my PR https://github.com/andrewhickman/fs-err/blob/25ac4217fed035c9283f8612d29305d480de40d6/build.rs but for some reason it's not working.

Notably it doesn't look like autocfg is installed in the build output:

Run actions-rs/cargo@v1
/home/runner/.cargo/bin/cargo test
 Downloading crates ...
  Downloaded itoa v1.0.[9](https://github.com/andrewhickman/fs-err/actions/runs/11391081315/job/31694081963?pr=61#step:6:10)
  Downloaded serde v1.0.192
  Downloaded ryu v1.0.15
  Downloaded serde_json v1.0.[10](https://github.com/andrewhickman/fs-err/actions/runs/11391081315/job/31694081963?pr=61#step:6:11)0
   Compiling serde v1.0.192
   Compiling serde_json v1.0.100
   Compiling ryu v1.0.15
   Compiling itoa v1.0.9
warning: unexpected `cfg` condition name: `rustc_1_63`
  --> src/path.rs:16:[11](https://github.com/andrewhickman/fs-err/actions/runs/11391081315/job/31694081963?pr=61#step:6:12)
   |
16 |     #[cfg(rustc_1_63)]
   |           ^^^^^^^^^^
   |
   = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
   = help: consider using a Cargo feature instead
   = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
            [lints.rust]
            unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rustc_1_63)'] }
   = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rustc_1_63)");` to the top of the `build.rs`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: `#[warn(unexpected_cfgs)]` on by default

@schneems
Copy link
Contributor Author

Figured it out cuviper/autocfg#70

@schneems schneems closed this Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant