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

Eliminate dependency on serde's "derive" feature #2815

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

dtolnay
Copy link
Contributor

@dtolnay dtolnay commented Dec 29, 2023

This PR pulls in trishume/syntect#511 and niklasmohrin/clircle#12 to improve bat compile time by 20%. (bat is on the critical path for cargo-expand's build, so I am interested in this PR because it will speed up cargo-expand compilation by the same amount.)

cargo build --lib --timings:

BeforeAfter

@dtolnay
Copy link
Contributor Author

dtolnay commented Dec 29, 2023

Marking as draft until the next syntect version is released.

@dtolnay dtolnay marked this pull request as draft December 29, 2023 04:22
@Enselic
Copy link
Collaborator

Enselic commented Dec 29, 2023

Awesome, thanks. I'll try to get a syntect release out relatively soon.

@Enselic
Copy link
Collaborator

Enselic commented Feb 7, 2024

(https://crates.io/crates/syntect/5.2.0 has been released now.)

@dtolnay
Copy link
Contributor Author

dtolnay commented Feb 8, 2024

Since then, #2755 added a new unconditional dependency on serde_with, so jonasbb/serde_with#694 would be needed in order for this PR to be useful.

jonasbb added a commit to jonasbb/serde_with that referenced this pull request Feb 8, 2024
This allows serde, and other crates downstream of it like serde_json, to
compile in parallel with serde_derive. Without this PR, in any
dependency graph that pulls in serde_with, first serde_derive would need
to compile, then serde would need to compile, then serde_json would need
to compile.

sharkdp/bat#2815 has a diagram of the impact of
this change.
@dtolnay dtolnay marked this pull request as ready for review February 8, 2024 23:57
@sharkdp
Copy link
Owner

sharkdp commented Feb 9, 2024

Looks like this has been fixed — thank you very much!

@sharkdp sharkdp merged commit ab4e5ed into sharkdp:master Feb 9, 2024
22 checks passed
@dtolnay dtolnay deleted the derive branch February 9, 2024 07:43
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