Skip to content

build warnings: unexpected cfg condition #17

@Jan-Jan

Description

@Jan-Jan

Upon running RUST_BACKTRACE=1 cargo build --package minimal-template-node --release, the following warnings are produced:

 warning: unexpected `cfg` condition value: `try-runtime`
  --> pallets/template/src/lib.rs:20:12
   |
20 |     #[pallet::pallet]
   |               ^^^^^^
   |
   = note: expected values for `feature` are: `default` and `std`
   = help: consider adding `try-runtime` as a feature in `Cargo.toml`
   = 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

warning: `pallet-minimal-template` (lib) generated 1 warning
warning: unexpected `cfg` condition value: `runtime-benchmarks`
  --> node/src/service.rs:30:7
   |
30 | #[cfg(feature = "runtime-benchmarks")]
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `default` and `std`
   = help: consider adding `runtime-benchmarks` as a feature in `Cargo.toml`
   = 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

warning: unexpected `cfg` condition value: `runtime-benchmarks`
  --> node/src/service.rs:34:11
   |
34 | #[cfg(not(feature = "runtime-benchmarks"))]
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `default` and `std`
   = help: consider adding `runtime-benchmarks` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: `minimal-template-node` (lib) generated 2 warnings
warning: unexpected `cfg` condition value: `try-runtime`
  --> node/src/command.rs:26:7
   |
26 | #[cfg(feature = "try-runtime")]
   |       ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `default` and `std`
   = help: consider adding `try-runtime` as a feature in `Cargo.toml`
   = 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

warning: unexpected `cfg` condition value: `runtime-benchmarks`
  --> node/src/service.rs:30:7
   |
30 | #[cfg(feature = "runtime-benchmarks")]
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `default` and `std`
   = help: consider adding `runtime-benchmarks` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: `minimal-template-node` (bin "minimal-template-node") generated 3 warnings (1 duplicate)
    Finished `release` profile [optimized] target(s) in 1.26s

system info

% rustc --version
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
% rustup show
Default host: aarch64-apple-darwin
rustup home:  .../.rustup

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
wasm32-unknown-unknown

active toolchain
----------------

stable-aarch64-apple-darwin (default)
rustc 1.80.1 (3f5fd8dd4 2024-08-06)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions