Skip to content

perf(json5): Remove use of serde(untagged) #677

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

Merged
merged 1 commit into from
Aug 12, 2025
Merged

Conversation

epage
Copy link
Contributor

@epage epage commented Aug 12, 2025

Prep for #472

serde(untagged) translates to an if/else if ladder that ends up being pretty expensive, including the error generation for each branch that gets skipped. This switches us to dispatch on type instead, speeding things up.

This is also prep for speeding up builds by removing the need for serde_derive. Once serde_core is published, we can depend on that and not wait for syn, quote, etc.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 16917008830

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.1%) to 65.424%

Files with Coverage Reduction New Missed Lines %
src/error.rs 1 71.08%
src/format.rs 1 40.0%
Totals Coverage Status
Change from base Build 16806457660: 0.1%
Covered Lines: 965
Relevant Lines: 1475

💛 - Coveralls

@epage epage merged commit d0a7cd6 into rust-cli:main Aug 12, 2025
17 checks passed
@epage epage deleted the serde branch August 12, 2025 18:12
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.

2 participants