[ANN] New releases of Merlin and OCaml-LSP

I am pleased to announce new releases of Merlin (5.3-502 and 4.18-414) and OCaml-LSP (1.20.1 and 1.20.1-4.14).

The Merlin releases bundle a handful of fixes while the LSP releases focus on adding more custom queries. These custom queries will enable tailored LSP clients to provide the same rich OCaml editing features as the one provided by the original Merlin modes for Emacs and Vim.

Latest releases of vscode-ocaml-platform already provide two new commands: Construct and Jump that respectively provide a better UI to fill typed holes with values and jump to specific parent nodes. Search by type/polarity and a command to get the type of growing and shrinking selections will also be available in the future.

construct

Merlin changelog

merlin 5.3

  • merlin binary
    • Respect the EXCLUDE_QUERY_DIR configuration directive when looking for cmt
      files (#1854)
    • Fix occurrences bug in which relative paths in index files are resolved against the
      PWD rather than the SOURCE_ROOT (#1855)
    • Fix exception in polarity search (#1858 fixes #1113)
    • Fix jump to fun targets not working (#1863, fixes #1862)
    • Fix type-enclosing results instability. This reverts some overly
      aggressive deduplication that should be done on the client side. (#1864)
    • Fix occurrences not working when the definition comes from a hidden source
      file (#1865)

OCaml-LSP changelog

1.20.1

Features

Fixes

  • Fix fd leak in running external processes for preprocessing (#1349)
  • Fix prefix parsing for completion of object methods (#1363, fixes #1358)
  • Remove some duplicates in the selectionRange answers (#1368)
  • Deactivate the jump code actions by default. Clients can enable them with
    the merlinJumpCodeActions configuration option. Alternatively a custom
    request is provided for ad hoc use of the feature. (#1411)
13 Likes

Updating ocaml-lsp-server (from 1.17) forced a downgrade of yojson – is this intentional?

Nice!

The links you posted seem broken, i did a quick look in the repo, and i assume you meant:

And

1 Like

Looking at the direct dependencies, it’s snot supposed to be the case, we will need more precise logging to investigate.

Than you @pat, I fixed the links.

Here’s opam why:

 $ opam why yojson
yojson.1.7.0
β”œβ”€β”€ js_of_ocaml-compiler.5.4.0
β”‚   └── (= version) js_of_ocaml.5.4.0
β”œβ”€β”€ lsp.1.20.0
β”‚   └── (= 1.20.0) ocaml-lsp-server.1.20.0-4.14
β”œβ”€β”€ (>= 1.6.0 & < 2.0.0) merlin.4.5-414
β”œβ”€β”€ ocaml-lsp-server.1.20.0-4.14 [*]
└── (>= 1.7.0) ppx_yojson_conv_lib.v0.16.0
    β”œβ”€β”€ (>= v0.14) lsp.1.20.0 [*]
    β”œβ”€β”€ (>= v0.14) ocaml-lsp-server.1.20.0-4.14 [*]
    └── (>= v0.16 & < v0.17) ppx_yojson_conv.v0.16.0
1 Like

Right, I think the real issue is that your merlin got downgraded. It might be due to dot-merlin-reader, I submited a fix to opam: Release dot-merlin-reader 4.18-414 by voodoos Β· Pull Request #27041 Β· ocaml/opam-repository Β· GitHub. Thanks for reporting that!

2 Likes