-
Couldn't load subscription status.
- Fork 102
Vendor Base.Ryu #384
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
base: master
Are you sure you want to change the base?
Vendor Base.Ryu #384
Conversation
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
|
I don't think this is a good idea to vendor:
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. |
|
The point of vendoring this code is that There is no need for this to be kept in sync with Base because it is its own self-contained separate copy. A check on the existence of JSON.jl is also used to develop Julia itself, so JSON.jl cannot react to changes in Base internals like a normal package. |
Base is already free to evolve? I know package eval is run to check breakage on things, but for something internal like Ryu, I don't think it would stop changes from happening.
That sounds problematic to me; bug fixes or even worse, security issues, would then not flow through to JSON eventually via upgrades.
It seems practical to add sophisticated checks via reflection on the exact methods + shape expected and use if present, and if not exact matching, fall back to non-vendored. It's notable since I wrote the original Ryu implementation, that the main interfaces for the used functions hasn't changed (> 6 years ago).
That doesn't seem particularly fair or relevant here; if Base is using JSON.jl to develop Julia, then they need to be ready to account for changes/breakage in the package like if they relied on any other package. As far as I'm aware, there's no formal documentation or agreement on how this works or is expected to work, so, in my mind, doesn't exist. If JSON.jl is actually critical in a key way to Base, then it should be promoted to a proper stdlib, which I believe is the more formal way of saying "this is functionality we want to be tied/tracked/evaluated against Base more closely than other packages". I've opened JuliaLang/julia#59763 to further discuss formally exposing an API to the Ryu internal functions and I think that will provide a practical answer here. |
|
I think, @quinnj 's view is right here. JSON is a package maintained by Julia, if Base.Ryu happens to break JSON in the future it can be fixed at that time. |
From what I can tell,
Base.Ryuis 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.