Skip to content

namespaced-features panics on unknown feature name #8046

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

Closed
ehuss opened this issue Mar 27, 2020 · 0 comments · Fixed by #8799
Closed

namespaced-features panics on unknown feature name #8046

ehuss opened this issue Mar 27, 2020 · 0 comments · Fixed by #8799
Labels
A-namespaced-features Area: namespaced-features C-bug Category: bug

Comments

@ehuss
Copy link
Contributor

ehuss commented Mar 27, 2020

Problem
Cargo panics with an unknown feature name when specifying a feature that doesn't exist when namespaced-features is enabled.

Steps
Create a project with this:

cargo-features = ["namespaced-features"]

[package]
name = "foo"
version = "0.1.0"
namespaced-features = true

Run cargo build --features=abc.

thread 'main' panicked at 'must be a valid feature', src/tools/cargo/src/cargo/core/resolver/dep_cache.rs:442:19
backtrace
   9: cargo::core::resolver::dep_cache::Requirements::require_feature
  10: cargo::core::resolver::dep_cache::RegistryQueryer::build_deps
  11: cargo::core::resolver::activate
  12: cargo::core::resolver::activate_deps_loop
  13: cargo::core::resolver::resolve
  14: cargo::ops::resolve::resolve_with_previous
  15: cargo::ops::resolve::resolve_ws_with_opts
  16: cargo::ops::cargo_compile::compile_ws
  17: cargo::ops::cargo_compile::compile
  18: cargo::commands::build::exec
  19: cargo::cli::main
  20: cargo::main

Notes

cargo 1.44.0-nightly (7019b3ed3 2020-03-17)

cc @djc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-namespaced-features Area: namespaced-features C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant