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

build warnings: unexpected cfg condition #17

Open
Jan-Jan opened this issue Aug 30, 2024 · 1 comment
Open

build warnings: unexpected cfg condition #17

Jan-Jan opened this issue Aug 30, 2024 · 1 comment

Comments

@Jan-Jan
Copy link

Jan-Jan commented Aug 30, 2024

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)
@rzadp
Copy link
Contributor

rzadp commented Aug 30, 2024

Thanks for the report.

This has already been fixed upstream.
We can keep the issue open until the fix has made it into the stable channel and synchronized here.

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

No branches or pull requests

2 participants