Skip to content

Conversation

DaniPopes
Copy link
Contributor

cargo-platform 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.

@rustbot rustbot added A-cfg-expr Area: Platform cfg expressions S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 21, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 21, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Due to this changing cargo-platform, can you also bump its version?

[dependencies]
serde_core.workspace = true

[target.'cfg(any())'.dependencies]
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason for this target table?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It bumps the requirement of serde to the minimum required for serde_core. I don't think this is required, however other serde_core users add this cfg

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add a comment explaining that? My understanding is that if someone has a lockfile with a version of serde from before serde_core was added, serde will stay on the older version while cargo-platform will use serde_core and thus have the wrong definitions.

`cargo-platform` 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.
Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Thanks!

@ehuss ehuss added this pull request to the merge queue Sep 29, 2025
Merged via the queue into rust-lang:master with commit a0d9889 Sep 29, 2025
27 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 29, 2025
@DaniPopes DaniPopes deleted the serde_core branch September 29, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cfg-expr Area: Platform cfg expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants