OCaml Weekly News

Previous Week Up Next Week


Here is the latest OCaml Weekly News, for the week of December 15 to 22, 2020.

Table of Contents

ocaml-lsp-server 1.4.0

Rudi Grinberg announced

On behalf of the ocaml-lsp team, it is my pleasure to announce version 1.4.0. This release introduces support for automatic signature help. Signature help is not yet present in all possible contexts. We intend to improve to support as many relevant language constructs as possible in the future. Many thanks to @mnxn for implementing this feature.

The full change log is replicated at the end of this post for your convenience.

Happy Holidays!

  • Support cancellation notifications when possible. (#323)
  • Implement signature help request for functions (#324)
  • Server LSP requests & notifications concurrently. Requests that require merlin are still serialized. (#330)

OCaml 4.12.0, third alpha release

octachron announced

The release of OCaml 4.12.0 is approaching. We have released a third alpha version to help fellow hackers join us early in our bug hunting and opam ecosystem fixing fun.

Beyond the usual bug fixes, this new alpha version contains two small API fixes for statmemprof and the Unix module. (Keen-eyed readers might notice a breaking change in the change log below but this concerns a corner case of a corner case of the type system that should not affect anyone.)

The base compiler can be installed as an opam switch with the following commands

opam update
opam switch create 4.12.0~alpha3

If you want to tweak the configuration of the compiler, you can pick configuration options with

opam update
opam switch create <switch_name> --packages=ocaml-variants.4.12.0~alpha3+options,<option_list>

where <option_list> is a comma separated list of ocaml-option-* packages. For instance, for a flambda and afl enabled switch:

opam switch create 4.12.0~alpha3+flambda+afl

All available options can be listed with "opam search ocaml-option".

The source code for the alpha is also available at these addresses:

If you want to test this version, it is advised to install the alpha opam repository



opam repo add alpha git://github.com/kit-ty-kate/opam-alpha-repository.git

This alpha repository contains various packages patched with fixes in the process of being upstreamed. Once the repository installed, these patched packages will take precedence over the non-patched version.

If you find any bugs, please report them here: https://github.com/ocaml/ocaml/issues

Changes from the second alpha:

  • additional fixes 1128, 7503, 9036, 9722, +10069: EINTR-based signal handling. When a signal arrives, avoid running its OCaml handler in the middle of a blocking section. Instead, allow control to return quickly to a polling point where the signal handler can safely run, ensuring that
  • 9907: Fix native toplevel on native Windows. (David Allsopp, review by Florian Angeletti)
  • 10056: Memprof: ensure young_trigger is within the bounds of the minor heap in caml_memprof_renew_minor_sample (regression from 8684) (David Allsopp, review by Guillaume Munch-Maccagnoni and Jacques-Henri Jourdan)
  • 10062: set ARCH_INT64_PRINTF_FORMAT correctly for both modes of mingw-w64 (David Allsopp, review by Xavier Leroy)
  • 10025: Track custom blocks (e.g. Bigarray) with Statmemprof (Stephen Dolan, review by Leo White, Gabriel Scherer and Jacques-Henri Jourdan)
  • 10070: Fix Float.Array.blit when source and destination arrays coincide. (Nicolás Ojeda Bär, review by Alain Frisch and Xavier Leroy)
  • additional fixes 9869, +10073: Add Unix.SO_REUSEPORT (Yishuai Li, review by Xavier Leroy, amended by David Allsopp)
  • 9877: manual, warn that multi-index indexing operators should be defined in conjunction of single-index ones. (Florian Angeletti, review by Hezekiah M. Carty, Gabriel Scherer, and Marcello Seri)
  • 10046: Link all DLLs with -static-libgcc on mingw32 to prevent dependency on libgcc_s_sjlj-1.dll with mingw-w64 runtime 8.0.0 (previously this was only needed for dllunix.dll). (David Allsopp, report by Andreas Hauptmann, review by Xavier Leroy)
  • 9896: Share the strings representing scopes, fixing some regression on .cmo/.cma sizes (Alain Frisch and Xavier Clerc, review by Gabriel Scherer)
  • 10044: Always report the detected ARCH, MODEL and SYSTEM, even for bytecode- only builds (fixes a "configuration regression" from 4.08 for the Windows builds) (David Allsopp, review by Xavier Leroy)
  • 10071: Fix bug in tests/misc/weaklifetime.ml that was reported in 10055 (Damien Doligez and Gabriel Scherer, report by David Allsopp)
  • breaking change 8907, 9878: Typemod.normalize_signature uses wrong environment Does not treat submodules differently when normalizing conjunctive types in polymorphic variants. This may break code that expose conjunctive types in inferred interface. (Jacques Garrigue, report and review by Leo White)
  • 9739, 9747: Avoid calling type variables, types that are not variables in recursive occurence error messages (for instance, "Type variable int occurs inside int list") (Florian Angeletti, report by Stephen Dolan, review by Armaël Guéneau)
  • 10048: Fix bug with generalized local opens. (Leo White, review by Thomas Refis)

Lwt 5.4.0, Lwt_ppx 2.0.2, Lwt_react 1.1.4 releases

Raphaël Proust announced

We are glad to announce the release of version 5.4.0 of Lwt, version 2.0.2 of Lwt_ppx, and version 1.1.4 of Lwt_react.


It can be installed from opam as usual:

opam update
opam upgrade lwt lwt_ppx lwt_react

OCaml 4.12 compatibility

With this release, Lwt is now compatible with OCaml 4.12. Thanks @kit-ty-kate for the contribution towards this support.

Thanks as well to all the other contributors for all the other improvements that made it into this release. Check-out the release's changelog (link above) for a full list of bugfixes and additions.

Maintainers' notes

As per a previous announce I am a co-maintainer of Lwt. With this release I'm taking on a more and more central role in the maintenance effort. Whilst I've received a lot of help getting this release together, I'm most likely the one responsible for any issues in the process.

I'd like to thank @antron who is as stellar with maintenance of the project as he is with guiding me through the learning process. I'd also like to thank the opam-repository team who stepped up very quickly to fix some CI-related build-issues. And I'd like to thank my employer, Nomadic Labs, who agreed to make Lwt maintenance part of my day job.

I'm looking forward to all your bug reports, pull requests, comments, ideas, questions, remarks, as well as any sort of feedback. Don't hesitate to get in touch!

Senior software engineer at Docent, France - Remote OK

Thibaut Mattio announced

Docent, a company I'm working with, is recruiting an OCaml developer. You can see the job post here

The team and project are really nice, I would definitely recommend it!

I've built the current version of the backend, so don't hesitate to reach out (thibaut.mattio@gmail.com) if you have any questions on the tech (or other).


If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.