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

cargo features should be additive #4931

Open
toidiu opened this issue Nov 24, 2024 · 2 comments
Open

cargo features should be additive #4931

toidiu opened this issue Nov 24, 2024 · 2 comments

Comments

@toidiu
Copy link
Contributor

toidiu commented Nov 24, 2024

Problem:

As described here, cargo features should be additive and safe to compose because a package is built with the combination of features its dependencies enable.

This is not true for the no-network-tests feature. The consequence of this is that it is possible to accidentally disable network tests if the testing becomes more complicated.

It is important to call out that the risk is low because the integration crate is only used in internal testing so theoretically shouldn't be enabling the flag.

Solution:

Instead of gating the network tests behind a feature flag, does it make sense to make a separate binary that runs the network tests?

@lrstewart
Copy link
Contributor

We also need to figure out how to handle the fips flag

@jmayclin
Copy link
Contributor

jmayclin commented Dec 5, 2024

Perhaps there is a solution here using a "named" group of features?

[features]
bmp = []
png = []
ico = ["bmp", "png"]
webp = []

https://doc.rust-lang.org/cargo/reference/features.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants