You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"verbose-expansions" during testing works only if the macros were used in a default feature.
So, I'm using macro_rules_attribute::apply in a feature of a small library I'm working on and I came across this issue.
Even though I enable your feature "verbose-expansions" in the dev-deps I only get the output during cargo test if I declare the feature using your crate a default feature in Cargo.toml. It's not supposed to be a default feature though. Could you have a look at this?
std structure:
Cargo.toml
src/
lib.rs
panic.rs
Cargo.toml
...
[features]
default = ["send", "panic"] # panic dep needed for testingsend = ["dep:tokio"]
panic = ["send", "dep:tokio", "dep:macro_rules_attribute"]
[dependencies]
macro_rules_attribute = { version = "0.2", optional = true }
tokio = { version = "1", features = ["rt"], optional = true }
[dev-dependencies]
macro_rules_attribute = { version = "0.2", features = ["verbose-expansions"], optional = false }
...
Finished test [unoptimized + debuginfo] target(s) in 2.94s
Running unittests src/lib.rs (target/debug/deps/helper-57dd50e161b347ff)
... normal rust test output ...
no compiler warnings
no clippy warnings
crate version: "verbose-expansions"
rust version: 1.75.0
cargo version 1.75.0
Things I've tried without success
made "verbose-expansions" non-optional / required
KR
Christoph
The text was updated successfully, but these errors were encountered:
nkia-christoph
changed the title
Macro Expansion Testing
Macro Expansion Testing for Default Feature only
Jan 14, 2024
nkia-christoph
changed the title
Macro Expansion Testing for Default Feature only
Macro Expansion Testing working for Default Feature only
Jan 14, 2024
nkia-christoph
changed the title
Macro Expansion Testing working for Default Feature only
Macro Expansion Testing only working for Default Feature
Jan 14, 2024
"verbose-expansions" during testing works only if the macros were used in a default feature.
So, I'm using
macro_rules_attribute::apply
in a feature of a small library I'm working on and I came across this issue.Even though I enable your feature "verbose-expansions" in the dev-deps I only get the output during
cargo test
if I declare the feature using your crate a default feature inCargo.toml
. It's not supposed to be a default feature though. Could you have a look at this?std structure:
Cargo.toml
lib.rs
panic.rs
output on cargo test
ONLY IF I MAKE "panic" A DEFAULT FEATURE
Rest is the same
... normal rust test output ...
Things I've tried without success
KR
Christoph
The text was updated successfully, but these errors were encountered: