Repository navigation
Yojson 3 compat - #1534
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)
* Add changelog entry for #1534 * Prepare changelog for 1.23.0 * Update Merlin dep
CHANGES: ## Fixes - Fix hover on method calls not showing the type. (ocaml/ocaml-lsp#1553, fixes ocaml/ocaml-lsp#1552) - Fix error on opening `.mll` files (ocaml/ocaml-lsp#1557) - Ensure compatibility with both yojson 2.0 and 3.0. (ocaml/ocaml-lsp#1534)
CHANGES: ## Fixes - Fix hover on method calls not showing the type. (ocaml/ocaml-lsp#1553, fixes ocaml/ocaml-lsp#1552) - Fix error on opening `.mll` files (ocaml/ocaml-lsp#1557) - Ensure compatibility with both yojson 2.0 and 3.0. (ocaml/ocaml-lsp#1534)
* Update Yojson constraint * Make jsonrpc compatible with both Yojson 2 and 3. This patch has a drawback: now jsonrpc also depends on yojson. --------- Co-authored-by: Ulysse Gérard <thevoodoos@gmail.com>
* Update Yojson constraint * Make jsonrpc compatible with both Yojson 2 and 3. This patch has a drawback: now jsonrpc also depends on yojson. --------- Co-authored-by: Ulysse Gérard <thevoodoos@gmail.com>
* Update Yojson constraint * Make jsonrpc compatible with both Yojson 2 and 3. This patch has a drawback: now jsonrpc also depends on yojson. --------- Co-authored-by: Ulysse Gérard <thevoodoos@gmail.com>
Yojson 3 removed
TupleandVariantwhich makes theJsontype 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.