You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, 80% of the Rust crates on crates.io depend on syn v2, which is not semver-compatible with syn v1, and thus not used for resolving schemars_derive's dependency on syn. Incidentally, schemars_derive is the 49th most downloaded depender on syn, and most of the remaining top dependers have already migrated to v2.
Keeping these numbers in mind, I think it's important for schemars_derive to migrate to syn v2 to play nicer with the majority of the ecosystem: because most crates now use syn v2, schemars_derive most likely causes Cargo to download and build at least two major versions of syn. This has a significant impact in build times, as shown in the following cargo build --release --timings excerpt for a project I work on. No other crate in the dependency tree of this project depends on syn v1, and that's likely to be the case for many projects.
In addition to the objective reason of less optimal dependency resolution, a continued dependency on syn v1 also introduces subjective concerns related to the ability of schemars to adapt to the evolving Rust language syntax: syn releases are closely associated with Rust syntax changes, and syn v1 no longer receives patches.
I have tried to update schemars_derive to use syn v2 myself, but it's an intricate refactor due to the extensive usage of the now removed syn::NestedMeta type, and in general the different APIs that should now be used for parsing nested attribute metadata. Before committing further time to this endeavor, I'd like to know your thoughts about it, and whether you already had some plan for it in mind 😄
The text was updated successfully, but these errors were encountered:
Hey, thanks for your work on this great crate!
At the moment, 80% of the Rust crates on
crates.io
depend onsyn
v2, which is not semver-compatible withsyn
v1, and thus not used for resolvingschemars_derive
's dependency onsyn
. Incidentally,schemars_derive
is the 49th most downloaded depender onsyn
, and most of the remaining top dependers have already migrated to v2.Keeping these numbers in mind, I think it's important for
schemars_derive
to migrate tosyn
v2 to play nicer with the majority of the ecosystem: because most crates now usesyn
v2,schemars_derive
most likely causes Cargo to download and build at least two major versions ofsyn
. This has a significant impact in build times, as shown in the followingcargo build --release --timings
excerpt for a project I work on. No other crate in the dependency tree of this project depends onsyn
v1, and that's likely to be the case for many projects.In addition to the objective reason of less optimal dependency resolution, a continued dependency on
syn
v1 also introduces subjective concerns related to the ability ofschemars
to adapt to the evolving Rust language syntax:syn
releases are closely associated with Rust syntax changes, andsyn
v1 no longer receives patches.I have tried to update
schemars_derive
to usesyn
v2 myself, but it's an intricate refactor due to the extensive usage of the now removedsyn::NestedMeta
type, and in general the different APIs that should now be used for parsing nested attribute metadata. Before committing further time to this endeavor, I'd like to know your thoughts about it, and whether you already had some plan for it in mind 😄The text was updated successfully, but these errors were encountered: