-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed as not planned
Labels
A-featuresArea: features — conditional compilationArea: features — conditional compilationC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-propose-closeStatus: A team member has nominated this for closing, pending further input from the teamStatus: A team member has nominated this for closing, pending further input from the team
Description
I have project structure:
+---workspace_a
¦ ¦ Cargo.toml
¦ ¦
¦ +---src
¦ lib.rs
¦ Cargo.lock
¦ Cargo.toml
Main manifest ./Cargo.toml
:
[workspace]
members = ["workspace_a"]
[dependencies.workspace_a]
path = "./workspace_a"
[features]
only_a = [
"workspace_a/only_a"
]
Workspace manifest ./workspace_a/Cargo.toml
:
[package]
name = "workspace_a"
version = "0.1.0"
authors = ["author.com"]
[features]
only_a = []
And ./workspace_a/lib.rs
:
#[test]
fn test_a() {
assert_eq!(1, 1);
}
#[cfg(not(feature = "only_a"))]
#[test]
fn test_b() {
assert_eq!(1, 1);
}
When i'm in root and trying cargo test --all --features only_a
virtual manifest doesn't see feature in my workspace.
It's working when i'm in ./workspace_a/
or when main manifest it's not virtual.
sanmai-NL, patientplatypus, tworec, zimurgh, jgrund and 6 more
Metadata
Metadata
Assignees
Labels
A-featuresArea: features — conditional compilationArea: features — conditional compilationC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-propose-closeStatus: A team member has nominated this for closing, pending further input from the teamStatus: A team member has nominated this for closing, pending further input from the team