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
The -Zrustdoc-scrape-examples flag is being ignored on docs.rs due to rust-lang/cargo#11430, which requires users to explicitly indicate that examples which rely on dev-dependencies should be scraped. (This avoids breakage because cargo doc does not normally require dev-dependencies.)
If the maintainers still want to use this feature, you can add doc-scrape-examples = true to one [[example]] configuration, for instance:
[[example]]
name = "demo"required-features = ["derive"]
doc-scrape-examples = true
The text was updated successfully, but these errors were encountered:
While I'm fixing that, I hope its realized that opt-in for this is unsustainable. clap is a bit unique with its examples and manually specifies most. Having to manually specify examples in all of my projects won't work. rust-lang/cargo#6945 would help but then I still have to make sure I set this in every Cargo.toml in every repo I maintain. Thats with knowing about this and I overlooked this even though I saw the PRs going through the Cargo repo.
Yes I totally agree with the maintenance burden. My goal is to get -Z rustdoc-scrape-examples (or whatever it turns into once stabilized) to implicitly mean "I accept that cargo doc will include dev-dependencies". Your comment helps me advance the case.
The
-Zrustdoc-scrape-examples
flag is being ignored on docs.rs due to rust-lang/cargo#11430, which requires users to explicitly indicate that examples which rely on dev-dependencies should be scraped. (This avoids breakage becausecargo doc
does not normally require dev-dependencies.)If the maintainers still want to use this feature, you can add
doc-scrape-examples = true
to one[[example]]
configuration, for instance:The text was updated successfully, but these errors were encountered: