[ANN] Dune 3.2.0

On behalf of the dune team, I’m pleased to announce the availability of version 3.2.0. This release contains few new features, but is packed with bug fixes and usability improvements. In particular, I’d like to point out that we’ve continued to improve the user experience with the watch mode. I encourage you all to try it out if you haven’t already.

Happy Hacking.

3.2.0 (17-05-2022)

  • Fixed dune describe workspace --with-deps so that it correctly
    handles Reason files, as well as files any other dialect. (#5701, @esope)

  • Disable alerts when compiling code in vendored directories (#5683,
    @NathanReb)

  • Fixed dune describe --with-deps, that crashed when some
    preprocessing was required in a dune file using per_module.
    (#5682, fixes #5680, @esope)

  • Add $ dune describe pp to print the preprocssed ast of sources. (#5615,
    fixes #4470, @cannorin)

  • Report dune file evaluation errors concurrently. In the same way we report
    build errors. (#5655, @rgrinberg)

  • Watch mode now default to clearing the terminal on rebuild (#5636, fixes,
    #5216, @rgrinberg)

  • The output of jobs that finished but were cancelled is now omitted. (#5631,
    fixes #5482, @rgrinberg)

  • Allows to configure all the default destination directories with ./configure
    (adds bin, sbin, data, libexec). Use OPAM_SWITCH_PREFIX instead of
    calling the opam binaries in dune install. Fix handling of multiple
    libdir in ./configure for handling /usr/lib/ocaml/ and
    /usr/local/lib/ocaml. In dune install forbid relative directories in
    libdir, docdir and others specific directory setting because their handling
    was inconsistent (#5516, fixes #3978 and #5455, @bobot)

  • --terminal-persistence=clear-on-rebuild will no longer destroy scrollback
    on some terminals (#5646, @rgrinberg)

  • Add a fmt command as a shortcut of dune build @fmt --auto-promote (#5574,
    @tmattio)

  • Watch mode now tracks copied external files, external directories for
    dependencies, dune files in OCaml syntax, files used by include stanzas,
    dune-project, opam files, libraries builtin with compiler, and foreign
    sources (#5627, #5645, #5652, #5656, #5672, #5691, #5722, fixes #5331,
    @rgrinberg)

  • Improve metrics for cram tests. Include test names in the event and add a
    category for cram tests (#5626, @rgrinberg)

  • Allow specifying multiple licenses in project file (#5579, fixes #5574,
    @liyishuai)

  • Match glob_files only against files in external directories (#5614, fixes
    #5540, @rgrinberg)

  • Add pid’s to chrome trace output (#5617, @rgrinberg)

  • Fix race when creating local cache directory (#5613, fixes #5461, @rgrinberg)

  • Add not to boolean expressions (#5610, fix #5503, @rgrinberg)

  • Fix relative dependencies outside the workspace (#4035, fixes #5572, @bobot)

  • Allow to specify --prefix via the environment variable
    DUNE_INSTALL_PREFIX (#5589, @vapourismo)

  • Dune-site.plugin: add support for archive(native|byte, plugin) used in the
    wild before findlib documented plugin(native|byte) in 2015 (#5518, @bobot)

  • Fix a bug where Dune would not correctly interpret META files in alternative
    layout (ie when the META file is named META.$pkg). The Llvm bindings were
    affected by this issue. (#5619, fixes #5616, @nojb)

  • Support (binaries) in (env) in dune-workspace files (#5560, fix #5555,
    @emillon)

  • (mdx) stanza: add support for (locks). (#5628, fixes #5489, @emillon)

  • (mdx) stanza: support including files in different directories using relative
    paths, and provide better error messages when paths are invalid (#5703, #5704,
    fixes #5596, @emillon)

  • Fix ctypes rules for external lib names which aren’t valid ocaml names
    (#5667, fixes #5511, @Khady)

13 Likes

The Dune 3.2 update is amazing! It’s so exciting to see all of the new features and how much work has gone into making this update as good as possible. I think this is great because it makes the program more user-friendly.

I don’t see an “upgrading” section in Welcome to dune’s documentation! — dune documentation. Is the 3.x line a drop-in replacement for 2.x? In other words, if someone like me is still on 2.9.1, are there any gotchas for upgrading to 3.2.x?

It’s mostly drop in, so we didn’t bother with an upgrade guide. The most notable change is that we dropped support for opam 1.x. Read the change log for 3.0 for the other breaking changes.

2 Likes

This one was a show-stopper for me (at least as far as 2.9 → 3.0). I don’t believe it has been fixed in 3.2 although I will do a test compile and see.

1 Like

It should be fixed in 3.2.0

2 Likes

It does appear to be fixed in 3.2.0. Since the maintainer hasn’t closed the issue, I’ll do it.

1 Like