Fix feature docs not showing up on docs.rs#136
Conversation
Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
|
@copilot since the publish workflow already uses nightly, can you see if you can get |
Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
Done in 953f264. Replaced |
HyperCodec
left a comment
There was a problem hiding this comment.
LGTM, though can't properly test until I set up a codespace or check locally.
Feature-gated items were not appearing with their feature annotations on docs.rs because the
docsrscfg was never passed and not all features were enabled during doc builds.Changes
genetic-rs,genetic-rs-common,genetic-rs-macros): Added[package.metadata.docs.rs]withall-features = trueandrustdoc-args = ["--cfg", "docsrs"]; added[lints.rust] unexpected_cfgsto suppress unknown-cfg warnings fordocsrsgenetic-rs-common/Cargo.toml: Replaced the partialfeatures = ["crossover", "speciation"]withall-features = true#![cfg_attr(docsrs, feature(doc_cfg))]with#![cfg_attr(docsrs, feature(doc_auto_cfg))]and removed all manual#[cfg_attr(docsrs, doc(cfg(feature = "...")))]per-item annotations —doc_auto_cfgautomatically infers cfg requirements from existing#[cfg(...)]attributes, requiring no per-item maintenance going forwardOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.