Skip to content

Conversation

@DaniPopes
Copy link

@DaniPopes DaniPopes commented Sep 14, 2025

This crate does not make use of serde derive macros, thus it can depend on serde_core instead of serde to speed up users' compile times.

See the documentation of serde_core for more details.

Note that this adds a hidden serde_core feature, since we cannot use the dep: syntax when declaring the serde feature due to this crate's MSRV being lower than the required 1.60.

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. The serde_core package must be new. This is the first time I heard about it.

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@DaniPopes
Copy link
Author

CI minrust is failing due to the cfg(any())'d import of serde_derive 🤔
this is a false flag because it's not actually a real import but it looks like it's still a breaking change in serde's MSRV?

@paolobarbolini
Copy link
Contributor

Maybe the old version resolver wasn't as smart as the new one. Does it work locally if you let a more modern version (but not too modern that it uses the newer Cargo.lock format) generate the lockfile?

@Darksonn
Copy link
Contributor

I doubt it. Not really sure what we can do about it rather than raise the msrv.

@paolobarbolini
Copy link
Contributor

paolobarbolini commented Sep 19, 2025

I've tried generating the lockfile with Rust v1.63 and then running Rust v1.57 to see it would fix the issue, and it does, but then a similar second error comes out. I've tested all versions between v1.57 and 1.63, and v1.60 is the first one that works. Other than the Yocto Kirkstone 1 people, I don't expect anyone else to possibly complain for the MSRV bump.

Footnotes

  1. even if they do, I'd just tell them to use an older version, which they would already be doing with most other dependencies. Also, that version finally dies in April 2026.

Cargo.toml Outdated
Comment on lines 33 to 36
# serde v1.0.220 is the first version that released with `serde_core`.
# This is required to avoid conflict with other `serde` users which may require an older version.
[target.'cfg(any())'.dependencies]
serde = { version = "1.0.220", default-features = false }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that serde_core has been out for 2 months we may be able to do without this section and keep the MSRV of v1.57

Copy link
Author

@DaniPopes DaniPopes Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I think it should be fine. If errors come up later it can be reconsidered

This crate does not make use of serde derive macros, thus it can
depend on `serde_core` instead of `serde` to speed up users' compile
times.

See the documentation of [`serde_core`](https://docs.rs/serde_core)
for more details.
@paolobarbolini
Copy link
Contributor

Old cargo was very stupid. Should we just give up and bump MSRV 😅? It doesn't seem like a big deal to me.

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.

3 participants