Skip to content

Build script doesn't take into account Cargo's unstable.allow-features #38

@Nemo157

Description

@Nemo157
root@8671a3d656bc:/# cargo new foo
    Creating binary (application) `foo` package
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

root@8671a3d656bc:/# cd foo

root@8671a3d656bc:/foo# mkdir .cargo

root@8671a3d656bc:/foo# echo 'unstable.allow-features = []' > .cargo/config.toml

root@8671a3d656bc:/foo# cargo add io-extras
    Updating crates.io index
      Adding io-extras v0.19.0 to dependencies
             Features:
             - async-std
             - mio
             - os_pipe
             - socket2
             - tokio
             - use_async_std
             - use_mio_net
             - use_mio_os_ext
             - use_os_pipe
             - use_socket2
             - use_tokio
    Updating crates.io index
     Locking 13 packages to latest Rust 1.96.0 compatible versions

root@8671a3d656bc:/foo# cargo +nightly check
  Downloaded io-lifetimes v3.0.1
  Downloaded io-extras v0.19.0
  Downloaded 2 crates (62.1KiB) in 0.14s
   Compiling io-lifetimes v3.0.1
   Compiling io-extras v0.19.0
error[E0725]: the feature `can_vector` is not in the list of allowed features
  --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/io-extras-0.19.0/src/lib.rs:19:33
   |
19 | #![cfg_attr(can_vector, feature(can_vector))]
   |                                 ^^^^^^^^^^

AFAICT there is no way to disable nightly-detection in this crate making it impossible to use in projects that use nightly but explicitly restrict unstable features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions