Conversation
Bug: ocaml/merlin#1475 Signed-off-by: Maciej Barć <xgqt@gentoo.org>
|
I get this error when trying it out: > opam pin add https://github.com/Leonidas-from-XIV/merlin.git#yojson-2-compat
This will pin the following packages: dot-merlin-reader, merlin-lib, merlin. Continue? [Y/n] y
[NOTE] Package dot-merlin-reader is already pinned to git+https://github.com/Leonidas-from-XIV/merlin.git#yojson-2-compat (version 4.2).
dot-merlin-reader is now pinned to git+https://github.com/Leonidas-from-XIV/merlin.git#yojson-2-compat (version 4.2)
[NOTE] Package merlin-lib is already pinned to git+https://github.com/Leonidas-from-XIV/merlin.git#yojson-2-compat (version ~dev).
merlin-lib is now pinned to git+https://github.com/Leonidas-from-XIV/merlin.git#yojson-2-compat (version ~dev)
[NOTE] Package merlin is already pinned to git+https://github.com/Leonidas-from-XIV/merlin.git#yojson-2-compat (version 4.5-414).
merlin is now pinned to git+https://github.com/Leonidas-from-XIV/merlin.git#yojson-2-compat (version 4.5-414)
[ERROR] Package conflict!
* Missing dependency:
- merlin-lib >= 4.2
no matching version
[NOTE] Pinning command successful, but your installed packages may be out of sync. |
voodoos
left a comment
There was a problem hiding this comment.
Thank you @Leonidas-from-XIV !
Could you add a changelog entry ?
|
@trefis : yojson's update makes older Merlin and Yojson 2.0.0 incompatible. I feel like we should release old versions of Merlin (3.5 and 411) with this patch too for users convenience. |
|
@Leonidas-from-XIV the windows CI failed because Yojson 2.0.0 appears to be unavailable. Is that a known issue ? |
|
@voodoos If I see correctly the build on CI doesn't use opam-repository but https://github.com/fdopen/opam-repository-mingw#opam2 which does not have Yojson 2.0.0. I don't know anything about the Windows CI so I don't know why it uses its own opam-repository or how to contribute to it. Apparently it is discontinued so I am not sure it makes sense to contribute. It seems like setup-ocaml choses to add the mingw-repo instead of upstream opam-repository: https://github.com/ocaml/setup-ocaml/blob/99ffdbe56b436bc6c29c803570b158d347765af6/src/setup-ocaml/constants.ts#L69-L72 I can go ahead raise this issue at setup-ocaml. |
c84fc70 to
f31c06d
Compare
|
According to the blog post
So I think the best would be to use upstream opam-repository + this branch. Unfortunately I was not able to find that branch, it is possible that it never came into existence. In any case, this is more an issue with setup-ocaml, so I opened a ticket here: ocaml/setup-ocaml#547 In theory I assume the Merlin Windows CI run could manually specify to use opam-repository also on Windows, but I don't know if that'll lead to issues with missing Windows packages. It would certainly be nicer to solve it upstream so it works for everyone without local adjustments. |
I don't use OPAM much, but https://github.com/fdopen/opam-repository-mingw seems to be maintained (last commit was two days ago). |
|
And it looks like Yojson 2.0 was part of the batch: https://github.com/fdopen/opam-repository-mingw/tree/opam2/packages/yojson/yojson.2.0.0 :-) |
Yojson 2.0 is dropping the `Stream` API for compatibility with OCaml 5, thus it added an `Seq` based API. This PR does the small changes that are required to use it instead of `Stream`. Which also comes with the added benefit of removing usage of `Stream` from Merlin itself.
f31c06d to
e6f538e
Compare
|
I've squashed the commits to clean up and trigger CI again, so we can see it (hopefully) succeed on the Windows CI. |
from Leonidas-from-XIV/yojson-2-compat
from Leonidas-from-XIV/yojson-2-compat
from Leonidas-from-XIV/yojson-2-compat
CHANGES:
Thu Jun 30 14:51:42 CEST 2022
+ merlin binary
- make most library public and split merlin in two packages: the
`merlin-lib` package that exposes merlin's internals and the `merlin`
package with the frontend. (ocaml/merlin#1448, ocaml/merlin#1455, ocaml/merlin#1457, ocaml/merlin#1497, @rgrinberg,
@tmattio, @kit-ty-kate)
- Type printing: use best_module_path for paths from Mty_alias (ocaml/merlin#1470)
- Attempt at finding the 'real' capitalization of files on windows (ocaml/merlin#1462 by
@mlasson)
- Use newer `Seq`-based API of Yojson 2.0, avoiding the need for the
deprecated `Stream` module (ocaml/merlin#1475 by @Leonidas-from-XIV)
- unify parsing of `MERLIN_LOG` (ocaml/merlin#1480 by @ulugbekna)
- Fix type deduplication in `type-enclosing` results (ocaml/merlin#1483, fixes ocaml/merlin#1477)
- Only weakly reduce the shapes to speed up the new Merlin locate
implementation. (ocaml/merlin#1488)
- Ignore unknown configuration tags from dune configuration provider but not
from dot-merlin-reader (ocaml/merlin#1486)
- typing recovery: recover at the granularity of `core_type` (ocaml/merlin#1484)
+ editor modes
- add method imenu items for emacs (ocaml/merlin#1481, @mndrix)
- emacs: Make the prefix argument to `merlin-locate` optional, both for
consistency with Emacs convention and for backwards compatibility. (ocaml/merlin#1476,
@antalsz)
- emacs: fix duplicated prefix path in imenu entries (ocaml/merlin#1495, @bcc32)
CHANGES:
Thu Jun 30 16:51:42 CEST 2022
+ merlin binary
- Use newer `Seq`-based API of Yojson 2.0, avoiding the need for the
deprecated `Stream` module (ocaml/merlin#1475 by @Leonidas-from-XIV)
CHANGES:
Fri Jul 1 12:51:42 CEST 2022
+ merlin binary
- Type printing: use `best_module_path` for paths from `Mty_alias` (ocaml/merlin#1470)
- Attempt at finding the 'real' capitalization of files on windows (ocaml/merlin#1462 by
@mlasson)
- Use newer `Seq`-based API of Yojson 2.0, avoiding the need for the
deprecated `Stream` module (ocaml/merlin#1475 by @Leonidas-from-XIV)
- unify parsing of `MERLIN_LOG` (ocaml/merlin#1480 by @ulugbekna)
- Fix type deduplication in `type-enclosing` results (ocaml/merlin#1483, fixes ocaml/merlin#1477)
- Ignore unknown configuration tags from dune configuration provider but not
from dot-merlin-reader (ocaml/merlin#1486)
- typing recovery: recover at the granularity of `core_type` (ocaml/merlin#1484)
+ editor modes
- Fix `merlin-locate-in-new-window` is ignored (ocaml/merlin#1461 by @emturner,
fixes ocaml/merlin#1460)
- add method imenu items for emacs (ocaml/merlin#1481, @mndrix)
- emacs: Make the prefix argument to `merlin-locate` optional, both for
consistency with Emacs convention and for backwards compatibility. (ocaml/merlin#1476,
@antalsz)
CHANGES:
Fri Jul 1 12:51:42 CEST 2022
+ merlin binary
- Type printing: use `best_module_path` for paths from `Mty_alias` (ocaml/merlin#1470)
- Attempt at finding the 'real' capitalization of files on windows (ocaml/merlin#1462 by
@mlasson)
- Use newer `Seq`-based API of Yojson 2.0, avoiding the need for the
deprecated `Stream` module (ocaml/merlin#1475 by @Leonidas-from-XIV)
- unify parsing of `MERLIN_LOG` (ocaml/merlin#1480 by @ulugbekna)
- Fix type deduplication in `type-enclosing` results (ocaml/merlin#1483, fixes ocaml/merlin#1477)
- Ignore unknown configuration tags from dune configuration provider but not
from dot-merlin-reader (ocaml/merlin#1486)
- typing recovery: recover at the granularity of `core_type` (ocaml/merlin#1484)
+ editor modes
- Fix `merlin-locate-in-new-window` is ignored (ocaml/merlin#1461 by @emturner,
fixes ocaml/merlin#1460)
- add method imenu items for emacs (ocaml/merlin#1481, @mndrix)
- emacs: Make the prefix argument to `merlin-locate` optional, both for
consistency with Emacs convention and for backwards compatibility. (ocaml/merlin#1476,
@antalsz)
- emacs: fix duplicated prefix path in imenu entries (ocaml/merlin#1495, @bcc32)
CHANGES:
Fri Jul 1 12:51:42 CEST 2022
+ merlin binary
- Type printing: use `best_module_path` for paths from `Mty_alias` (ocaml/merlin#1470)
- Attempt at finding the 'real' capitalization of files on windows (ocaml/merlin#1462 by
@mlasson)
- Use newer `Seq`-based API of Yojson 2.0, avoiding the need for the
deprecated `Stream` module (ocaml/merlin#1475 by @Leonidas-from-XIV)
- unify parsing of `MERLIN_LOG` (ocaml/merlin#1480 by @ulugbekna)
- Fix type deduplication in `type-enclosing` results (ocaml/merlin#1483, fixes ocaml/merlin#1477)
- Ignore unknown configuration tags from dune configuration provider but not
from dot-merlin-reader (ocaml/merlin#1486)
- typing recovery: recover at the granularity of `core_type` (ocaml/merlin#1484)
+ editor modes
- Fix `merlin-locate-in-new-window` is ignored (ocaml/merlin#1461 by @emturner,
fixes ocaml/merlin#1460)
- add method imenu items for emacs (ocaml/merlin#1481, @mndrix)
- emacs: Make the prefix argument to `merlin-locate` optional, both for
consistency with Emacs convention and for backwards compatibility. (ocaml/merlin#1476,
@antalsz)
- emacs: fix duplicated prefix path in imenu entries (ocaml/merlin#1495, @bcc32)
CHANGES:
Fri Jul 1 12:51:42 CEST 2022
+ merlin binary
- Type printing: use `best_module_path` for paths from `Mty_alias` (ocaml/merlin#1470)
- Attempt at finding the 'real' capitalization of files on windows (ocaml/merlin#1462 by
@mlasson)
- Use newer `Seq`-based API of Yojson 2.0, avoiding the need for the
deprecated `Stream` module (ocaml/merlin#1475 by @Leonidas-from-XIV)
- unify parsing of `MERLIN_LOG` (ocaml/merlin#1480 by @ulugbekna)
- Fix type deduplication in `type-enclosing` results (ocaml/merlin#1483, fixes ocaml/merlin#1477)
- Ignore unknown configuration tags from dune configuration provider but not
from dot-merlin-reader (ocaml/merlin#1486)
- typing recovery: recover at the granularity of `core_type` (ocaml/merlin#1484)
+ editor modes
- Fix `merlin-locate-in-new-window` is ignored (ocaml/merlin#1461 by @emturner,
fixes ocaml/merlin#1460)
- add method imenu items for emacs (ocaml/merlin#1481, @mndrix)
- emacs: Make the prefix argument to `merlin-locate` optional, both for
consistency with Emacs convention and for backwards compatibility. (ocaml/merlin#1476,
@antalsz)
CHANGES:
Thu Jun 30 16:51:42 CEST 2022
+ merlin binary
- Use newer `Seq`-based API of Yojson 2.0, avoiding the need for the
deprecated `Stream` module (ocaml/merlin#1475 by @Leonidas-from-XIV)
Yojson 2.0 is dropping☨ the
StreamAPI for compatibility with OCaml 5, thus it added anSeqbased API. This PR does the small changes that are required to use it instead ofStream.Which also comes with the added benefit of removing usage of
Streamfrom Merlin itself.☨Yojson 2.0 will drop the API when it is released. As such this PR requires the
masterversion of Yojson but the idea is to prepare most Yojson consumers in advantage, so when Yojson 2.0 ends up on OPAM the migration is as smooth as possible.