Skip to content
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

Make features independent from docsrs attribute #1457

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

AaronErhardt
Copy link
Contributor

Removing the "dox" feature caused some unexpected complications because some crates, cairo in particular, used the "dox" feature as replacement for --all-features. In other words, "dox" did not only enable the typical documentation configuration, but also pulled in additional dependencies and effectively overwrote some feature flags (with #[cfg(any(feature = "...", feature = "dox"))]). This behavior was matched with the docsrs attribute so far, but of course the attribute can't activate dependencies in Cargo.toml.

My proposed solution would be to never use the docsrs attribute to interact with feature flags and conditional compilation. If someone wants to document everything --all-features would be the way to go. This makes sure that conditional compilation is the same in regular builds and doc builds.

@sdroege sdroege merged commit 6f18d19 into gtk-rs:master Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants