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

Compile serde_derive separately from serde #866

Conversation

KamilaBorowska
Copy link

@KamilaBorowska KamilaBorowska commented Aug 30, 2023

When serde's derive feature is used, serde_derive must be compiled before serde can be, as serde with that feature has a serde_derive dependency.

As of serde 1.0.186, this issue can be avoided by adding a separate serde_derive dependency due to the fact that serde 1.0.186 has a never-applicable dependency on serde_derive, which ensures that there is no incompatible version of serde_derive in a program (serde-rs/serde#2588).

Because MSRV being set to 1.56, it's not possible to use the dep: syntax in features, so serde crate needs to be renamed. dep: syntax was added in Rust 1.60 if we want to bump MSRV.

This should improve compilation times of programs that use url with its serde feature, provided it doesn't have other crates that use serde with its derive feature.

When serde's derive feature is used, serde_derive must be
compiled before serde can be, as serde with that feature has a
serde_derive dependency.

As of serde 1.0.186, this issue can be avoided by adding a separate
serde_derive dependency due to the fact that serde 1.0.186 has a
never-applicable dependency on serde_derive, which ensures that
there is no incompatible version of serde_derive in a program [1].

Because MSRV being set to 1.56, it's not possible to use the dep:
syntax in features, so serde crate needs to be renamed.

This should improve compilation times of programs that use url
with its serde feature, provided it doesn't have other crates that
use serde with its derive feature.

[1]: serde-rs/serde#2588
@KamilaBorowska
Copy link
Author

Albeit, it seems like according to serde-rs/serde#2584, the serde may be split into serde_core which doesn't have serde_derive which would close this issue, closing for now.

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.

None yet

1 participant