-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[new release] yojson and yojson-five (3.0.0) #27956
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
Conversation
The removal of variant support is breaking some packages:
@Leonidas-from-XIV could you have a look at the revdeps and send a separate PR to add the upper bounds? You can do it with |
A lot of these issues come from The other packages like Goblint, kind2, LSP actively deal with the variants code so they have to be fixed manually. I'll look into submitting some PRs (but it is easier once Yojson 3 is merged, as these PRs will require bumping the Yojson dependency to Weirdly enough the |
Thanks a lot. It would be much faster to review and test the PR to submit the bounds changes as a separate PR. Otherwise we have to run a massive amount of tests and revdeps each time we make a change |
I can submit the change as separate PR. The reason why I didn't is that in a separate PR I don't have Yojson 3 so I don't see how applying the constraints interacts with the presence of Yojson 3 (e.g. "does constraining atdgen solve the issues or do packages actually ship with the generated code thus requiring the constraints applied to themselves"). Thus bar of merging that hypothetical PR, rebasing this PR upon the merged PR, fixing potentially newly revealed issues and creating new PRs it seems like a fairly complicated process that involves opam-repository maintainers to keep reviewing and merging additional PRs until this one is ready to be merged. If you think that is preferable I can definitely cherry-pick the commits and move them to a separate branch. |
Technically only the |
CHANGES: *2025-05-39* ### Changed - Floats are now always output to JSON in a standard-conformant way or not at all (raising an exception). This makes the `std` variants of functions identical to the non-`std` variants and the `std` arguments have no effect. Users are encouraged to switch to the non-`std` affixed variants, the others will be deprecated in the future. (ocaml-community/yojson#184, @Leonidas-from-XIV) - Bumped the minimum required version of OCaml for the main package to 4.08 since the CI dropped the support. This however allows removing the dependency on the `seq` library, so the depencency cone becomes slightly smaller. (ocaml-community/yojson#194, @Leonidas-from-XIV) ### Fixed - Fixed handling of escape sequences in JSON5. Known escapes like \b will be properly unescaped and undefined escape sequences will unescape to the character itself as per spec (ocaml-community/yojson#187, @david-maison-TrustInSoft) - Fixed tests failing on Windows due to disagreements with the length of an input channel and the text mode conversion (ocaml-community/yojson#192, @Leonidas-from-XIV) ### Removed - Removed support for Tuple and Variant in JSON. It was a non-standard extension that was rarely used, so this simplifies the Yojson types and the parser more standard-conforming (ocaml-community/yojson#105, ocaml-community/yojson#158, ocaml-community/yojson#185 @Leonidas-from-XIV)
It's actually mostly the tests causing issues, the tool works mostly fine.
80685af
to
2b33649
Compare
Thanks! Outside the many network issues, which are a CI problem, the failures now look unrelated |
Yojson is an optimized parsing and printing library for the JSON format
CHANGES:
2025-05-29
Changed
all (raising an exception). This makes the
std
variants of functionsidentical to the non-
std
variants and thestd
arguments have no effect.Users are encouraged to switch to the non-
std
affixed variants, the otherswill be deprecated in the future. (Always output JSON compliant floats (if possible) ocaml-community/yojson#184, @Leonidas-from-XIV)
since the CI dropped the support. This however allows removing the dependency
on the
seq
library, so the depencency cone becomes slightly smaller. (Move to OCaml 4.08, removeseq
ocaml-community/yojson#194,@Leonidas-from-XIV)
Fixed
properly unescaped and undefined escape sequences will unescape to the
character itself as per spec (JSON5: fix escape sequences ocaml-community/yojson#187, @david-maison-TrustInSoft)
input channel and the text mode conversion (Read the full file without line translation ocaml-community/yojson#192, @Leonidas-from-XIV)
Removed
extension that was rarely used, so this simplifies the Yojson types and the
parser more standard-conforming ([RFC] Reduce the amount of different Yojson variants ocaml-community/yojson#105, Remove Tuple & Variant ocaml-community/yojson#158, Remove left-over mentions of tuple and variant ocaml-community/yojson#185 @Leonidas-from-XIV)