Skip to content

Conversation

nhz2
Copy link
Member

@nhz2 nhz2 commented Oct 4, 2025

From what I can tell, Base.Ryu is internal, so it may be removed in a future Julia version.

This PR vendors that code and other internal functions from Base that Ryu uses.

Copy link

codecov bot commented Oct 4, 2025

Codecov Report

❌ Patch coverage is 90.12075% with 90 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.09%. Comparing base (3f7d15f) to head (69109d4).

Files with missing lines Patch % Lines
src/ryu/shortest.jl 86.54% 46 Missing ⚠️
src/ryu/fixed.jl 87.91% 18 Missing ⚠️
src/ryu/exp.jl 91.00% 17 Missing ⚠️
src/ryu/Ryu.jl 91.66% 6 Missing ⚠️
src/write.jl 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #384      +/-   ##
==========================================
+ Coverage   89.89%   90.09%   +0.20%     
==========================================
  Files           7       12       +5     
  Lines        1316     2221     +905     
==========================================
+ Hits         1183     2001     +818     
- Misses        133      220      +87     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@quinnj
Copy link
Member

quinnj commented Oct 6, 2025

I don't think this is a good idea to vendor:

  • The Base Ryu code is still evolving/maturing; there have been at least 6 PRs this year massaging the code
  • Vendoring means now we have a much higher code maintenance burden to try and keep synced w/ Base
  • I think we can do something much simpler by doing a compat check on the presence of Base.Ryu and do standard printf calls otherwise.

I'm more worried about the long-term maintenance of this vendored code than Base breaking or slight performance hit of doing printf via compat.

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