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 need to be additive #543

Closed
dtolnay opened this issue Sep 6, 2016 · 3 comments
Closed

Cargo features need to be additive #543

dtolnay opened this issue Sep 6, 2016 · 3 comments

Comments

@dtolnay
Copy link
Member

dtolnay commented Sep 6, 2016

Filing here for lack of a better place to file it. This affects all of serde_codegen, serde_codegen_internals, aster and quasi.

Cargo features are supposed to be additive. The with-syntex features across the ecosystem are not additive because they remove the libsyntax-based methods. This results in breakage like adding a dependency on serde_derive can break existing code that uses aster without syntex.

We need to move to additive features like:

[features]
default = ["with-syntex"]
with-syntex = ["syntex_syntax"]
with-libsyntax = []

where you can build with both syntex and libsyntax simultaneously if necessary.

@dtolnay
Copy link
Member Author

dtolnay commented Sep 28, 2016

No longer urgent because serde_derive does not use syntex anymore, so the problem has not gotten worse.

@dtolnay dtolnay assigned dtolnay and oli-obk and unassigned dtolnay Jan 8, 2017
@dtolnay
Copy link
Member Author

dtolnay commented Jan 12, 2017

We may be done here by just dropping Syntex. The std feature may not strictly follow this but that should be fine, you won't be using std Serde with no-std serde_json or vice versa. @oli-obk just check whether there is anything to fix here for 0.9.0 and let's file separate tickets in syntex/quasi/aster as necessary to follow up later.

@oli-obk
Copy link
Member

oli-obk commented Jan 23, 2017

Indeed I can confirm that the only feature breaking from the additiveness is std. We can't make it additive, because collections requires nightly.

@oli-obk oli-obk removed this from the v0.9.0 milestone Jan 23, 2017
@dtolnay dtolnay closed this as completed Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants