-
Notifications
You must be signed in to change notification settings - Fork 141
Yojson 3 compat #1534
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
Yojson 3 compat #1534
Conversation
Pull Request Test Coverage Report for Build 4870Details
💛 - Coveralls |
Re-ran the CI now that yojson3 has been merged, it seems that only the changelog change is required :) |
Added a changelog entry, hope it is fine as-is :) |
Thank you for taking the time to do the upgrade! We haven't been doing a release in quite some time, and it is now imminent. |
Yes, unfortunately. Maybe the code can be changed so the If it matters, I can look into it on the next hackday if I can find an implementation that accepts the 2.x style type and always outputs the 3.x style type. (A bit of self-promotion, but this is not a problem in
Unfortunately all packages that currently use |
That's great to know ! What I propose is that we hold onto this until the upcoming release, and after the release we will release a version for Yojson 3, hopefully backward compatible if someone finds a way 🙂 |
I tried that for a second, but you need to also modify ppx_yojson_conv (I think) because it hardcodes @voodoos Note that the inverse problem also exists, people using Yojson3 cannot install ocaml-lsp-server. |
Due to the removal of the Tuple and Variant variants. See also ocaml/ocaml-lsp#1534. Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
Due to the removal of the Tuple and Variant variants. See also ocaml/ocaml-lsp#1534. Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
…awback: now jsonrpc also depends on yojson.
It seems quite simple to have ocaml-lsp compatible with both yojson 2 and 3 but this comes with a drawback: we need to effectively introduce a dependency on yojson to the cc @pitag-ha and @xvw who will probably have to follow up on this :-) |
No objection to using yojson in jsonrpc, but I don't see the point of avoiding the dependency on yojson > 3. Ocamllsp is an application anyway, nobody is going to care much that json library we're using. |
Opam remains the main way to install ocaml-lsp today, and I guess most users do that in their project's switch. Ecosystem splits are even more sensible than usual for projects like ocaml-lsp, because they are installed in almost every switch. |
Thanks everyone, I am going to merge this ahead of the final release for OCaml 5.4. |
…rmat-mlx * 'master' of github.com:/ocaml/ocaml-lsp: nix: updates (ocaml#1550) refactor: get rid of a bunch of [Stdune.String] uses (ocaml#1551) Deleted a dead link (ocaml#1549) Yojson 3 compat (ocaml#1534) Prepare release 1.23.0 (ocaml#1539) Delegate outline generation to Merlin (ocaml#1529) Fix yojson constraint (ocaml#1538) chore: remove all the stdune [O] references (ocaml#1483) Handle new kind of outline symbol (ocaml#1527)
Yojson 3 removed
Tuple
andVariant
which makes theJson
type mismatch with the one defined in this repo. This PR removes these variants and updates the constraint to require Yojson 3 so the type matches again.Depends on ocaml/opam-repository#27956 merged or pinning Yojson.