Skip to content

[new release] dune (18 packages) (3.24.0~alpha2) - #29996

Closed
shonfeder wants to merge 1 commit into
ocaml:masterfrom
shonfeder:release-dune-3.24.0_alpha2
Closed

[new release] dune (18 packages) (3.24.0~alpha2)#29996
shonfeder wants to merge 1 commit into
ocaml:masterfrom
shonfeder:release-dune-3.24.0_alpha2

Conversation

@shonfeder

Copy link
Copy Markdown
Member

Fast, portable, and opinionated build system

CHANGES:

Fixed

Added

Changed

CHANGES:

### Fixed

- Fix promotion failure when a target changes from a directory to a file
  between builds, causing "Is a directory" errors.
  (ocaml/dune#14371, fixes ocaml/dune#5647, fixes ocaml/dune#6575, @Alizter)

- Make `dune build @doc` pick up an odoc installed via `dune tools install
  odoc` even without `DUNE_CONFIG__LOCK_DEV_TOOL=enabled`, mirroring how
  `dune fmt` consumes a locked ocamlformat (ocaml/dune#14426, fixes ocaml/dune#14235, @mt-caret)

- Reject `(package ...)` inside a named dependency binding
  (`(deps (:name (package foo)))`). Previously this was silently accepted but
  `%{name}` would resolve to an empty path list. (ocaml/dune#14499, @Alizter)

- Fix incorrect dependency in the `.cmxs` build for libraries with
  mode-dependent foreign stubs: the rule depended on the byte stubs archive
  instead of the native one, so parallel builds could fail to find
  `-l<lib>_stubs_native`. (ocaml/dune#14500, fixes ocaml/dune#12964, @Alizter)

- Fix `dune build` failing with "No rule found" when `lock_dir` paths in
  `dune-workspace` contain a subdirectory (e.g. `(path sub/dune.lock)`).
  (ocaml/dune#14524, fixes ocaml/dune#14523, @Alizter)

- Artifact substitution repairs executable bit if it's not set correctly in the workspace
  (ocaml/dune#14556, @rgrinberg)

- Ignore `EINVAL` when accepting sockets on MacOS (ocaml/dune#14612, fixes ocaml/dune#12660, @rgrinberg)

- Validate profile names. Profile names must be non-empty and can only contain
  letters, digits, `_` and `-`. The name `_` is reserved as a wildcard in
  `(env ...)` stanzas. (ocaml/dune#14657, fixes ocaml/dune#14630, @rlepigre)

### Added

- Add `%{pkg:<package>:<section>:<path>}` pform for resolving package install
  files. Works with workspace packages, lock-file packages, and installed
  packages. (ocaml/dune#14200, fixes ocaml/dune#14193, fixes ocaml/dune#3378, @Alizter)

- Enable the relocatable compiler by default for package management (ocaml/dune#14357,
  fixes ocaml/dune#14012, @Alizter)

- Add changed source files to the `build-start` trace event for watch-mode
  restarts, showing the paths that triggered the rebuild (ocaml/dune#14396, @rgrinberg)

- Add dune's rusage information in start/finish build trace events (ocaml/dune#14402, @rgrinberg)

- Add a status message for RPC clients that manage to connect (ocaml/dune#14424, @rgrinberg)

- Allow blang expressions in the `runtest_alias` field in the `cram` stanza (ocaml/dune#14425, @rgrinberg)

- Extend the stat based cache to cache the contents of directories and not just
  source files (ocaml/dune#14469, @rgrinberg).

- Show the number of connected RPC clients in the watch mode status line
  (ocaml/dune#14489, @rgrinberg)

- Promote directory targets from experimental to generally available in 3.24
  (ocaml/dune#14579, @rgrinberg)

### Changed

- Use `/` as directory separator when appending local paths to external paths,
  making path construction consistent across platforms. (ocaml/dune#14278, @Alizter)
- On Windows, normalise process paths to `\` before passing them to
  `CreateProcessW` so that programs which scan `argv[0]` (notably `cmd.exe`)
  do not misparse mixed separators. (ocaml/dune#14278, @Alizter)

- `%{bin:NAME}` now resolves to the build artifact path rather than
  the install staging path. Rules with `%{bin:NAME}` deps additionally
  get a per-rule `.binaries` directory prepended to the action's
  `PATH`, containing correctly-named symlinks for each declared bin
  pform dep. (ocaml/dune#14432, fixes ocaml/dune#3324, @Alizter)

- Replace the Rocq language field `(stdlib ...)` with the presence-only field
  `(no_corelib)` in Rocq language 0.14. (ocaml/dune#14452, fixes ocaml/dune#14358, @Durbatuluk1701)

- Throttle sandbox creation to 250 concurrent sandboxes. (ocaml/dune#14464, @rgrinberg)

- The package solver now uses cached revision store lookups for improved
  performance. (ocaml/dune#14494, fixes ocaml/dune#12637, @Alizter, @rgrinberg)

- Remove the deprecated `(lang coq)` Coq Build Language. Use the
  Rocq Build Language (`(using rocq <version>)`) instead. Projects that
  still declare `(using coq <version>)` now get an error pointing them
  at Rocq. (ocaml/dune#14525, fixes ocaml/dune#12788, @Alizter)
@shonfeder
shonfeder marked this pull request as draft June 5, 2026 21:20
@shonfeder

Copy link
Copy Markdown
Member Author

second pre-release candidate, we will triage again for errors

@shonfeder

shonfeder commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

Analysis of the new errors:

Errors from expected breaking changes, requiring upper bounds

✅ Test failures from tests depending on internal details of the install/build layout

See ocaml/dune#14724

lintcstubs

crunch

merlin

Regressions

✅ Unintended breakage in executability of %{bin:...} variable expansions

See ocaml/dune#15147

✅ Build errors in some versions of melange

This appears to be fixed on the main branch of dune, fixed in trunk and backported in ocaml/dune#15091

Unrelated errors

Race conditions in opam

#=== ERROR while installing ocamlfind.1.9.8 ===================================#
Cannot copy /home/opam/.opam/4.14/.opam-switch/build/ocamlfind.1.9.8/src/findlib/ocamlfind to /home/opam/.opam/4.14/bin/ocamlfind (/usr/bin/opam: "open" failed on /home/opam/.opam/4.14/bin/ocamlfind: Text file busy).

Appears to be a case of ocaml/opam#5256

Race condition in moonpool tests

Details
# File "test/fiber/t_fib1.expected", line 1, characters 0-0:
# /usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/fiber/t_fib1.expected _build/default/test/fiber/t_fib1.exe.output
# diff --git a/_build/default/test/fiber/t_fib1.expected b/_build/default/test/fiber/t_fib1.exe.output
# index d4e2b79..365bba0 100644
# --- a/_build/default/test/fiber/t_fib1.expected
# +++ b/_build/default/test/fiber/t_fib1.exe.output
# @@ -27,8 +27,6 @@ start
#  start
#  1: start fibers
#  1.7.1: I'm fiber 7 and I'm about to fail…
# -1.8.1: sub-fiber 8 was cancelled
# -1.9.1: sub-fiber 9 was cancelled
#  2.0: fiber 0 resolved as ok
#  2.1: fiber 1 resolved as ok
#  2.2: fiber 2 resolved as ok
# @@ -37,8 +35,8 @@ start
#  2.5: fiber 5 resolved as ok
#  2.6: fiber 6 resolved as ok
#  2.7: fiber 7 resolved as error
# -2.8: fiber 8 resolved as error
# -2.9: fiber 9 resolved as error
# +2.8: fiber 8 resolved as ok
# +2.9: fiber 9 resolved as ok
#  3: wait for subs
#  4: await fiber 0
#  5: res 0 = 0
# @@ -55,7 +53,6 @@ start
#  16: await fiber 6
#  17: res 6 = 6
#  18: await fiber 7
# -19: main fiber cancelled with Failure("oh no!")
# -20: main fiber result: error Failure("oh no!")
# -21: main fib failed with "oh no!"
# -22: main fiber exited
# +19: main fiber result: error Failure("oh no!")
# +20: main fib failed with "oh no!"
# +21: main fiber exited
# (cd _build/default/test && ./t_ws_wait.exe)

packages attempting to make network requests in their tests

brittle test fixtures

Details
#      $ default/compiler/catala.exe interpret -I tests/scope/good --stdlib=_build/libcatala -t -s HousingComputation --debug tests/scope/good/scope_call3.catala_en
#                    Reference              │               Result                
#      [DEBUG] = INIT =                     │[DEBUG] = INIT =
#      [DEBUG] = SURFACE =                  │[DEBUG] = SURFACE =
#      [DEBUG] Parsing "tests/scope/good/sco│[DEBUG] Parsing "tests/scope/good/sco
#      [DEBUG] Loading module interfaces... │[DEBUG] Loading module interfaces...
#      [DEBUG] Parsing "libcatala/stdlib_en.│[DEBUG] Parsing "libcatala/stdlib_en.
#      [DEBUG] Parsing "libcatala/date_en.ca│[DEBUG] Parsing "libcatala/date_en.ca
#                                          -╳[DEBUG] - 222ms elapsed -
#=== ERROR while compiling why3find.1.3.0 =====================================#
# context              2.5.1 | linux/x86_64 | ocaml-base-compiler.5.4.1 | file:///home/opam/opam-repository
# path                 ~/.opam/5.4/.opam-switch/build/why3find.1.3.0
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p why3find -j 71 --promote-install-files=false @install @runtest
# exit-code            1
# env-file             ~/.opam/log/why3find-7-f88c29.env
# output-file          ~/.opam/log/why3find-7-f88c29.out
### output ###
# File "tests/replay.t/run.t", line 1, characters 0-0:
# /usr/bin/git --no-pager diff --no-index --color=always -u _build/default/tests/replay.t/run.t _build/default/tests/replay.t/run.t.corrected
# diff --git a/_build/default/tests/replay.t/run.t b/_build/default/tests/replay.t/run.t.corrected
# index 8473233..f66d54a 100644
# --- a/_build/default/tests/replay.t/run.t
# +++ b/_build/default/tests/replay.t/run.t.corrected
# @@ -9,7 +9,10 @@
#    File "mergesort.mlw", line 17, characters 11-16: proof failed
#    Goal Mergesort.merge: ✘
#      merge [VC for merge]
# -  Theory mergesort.Mergesort: ✘ (4/5)
# +  File "mergesort.mlw", line 44, characters 11-20: proof failed
# +  Goal Mergesort.mergesort: ✘
# +    mergesort [VC for mergesort]
# +  Theory mergesort.Mergesort: ✘ (3/5)
#    Error: 1 unproved file
#    Summary:
#    Warning: Goal "merge": tactic 'split_vc' shadowed by 'compute_in_goal'

error in parser from make file

Details
# configure: *********************
# configure: * CREATING MAKEFILE *
# configure: *********************
# configure: creating ./config.status
# Generating   share/Makefile.config
# ./configure: line 13449: ./config.status: Text file busy
# /bin/sh: 1: ./config.status: Text file busy
# /bin/sh: 1: ./config.status: Text file busy
# make[1]: *** [src/plugins/loop_analysis/Makefile:52: src/plugins/loop_analysis/Makefile] Error 126
# make[1]: *** Waiting for unfinished jobs....
# make[1]: *** [src/plugins/nonterm/Makefile:64: src/plugins/nonterm/Makefile] Error 126
# configure: error: write failure creating ./config.status
# ./config.status: line 808: syntax error near unexpected token `fi'
# ./config.status: line 808: `fi # test -n "$CONFIG_FILES"'

errors from ocamlp-streams deprications

@Sudha247

Sudha247 commented Jun 9, 2026

Copy link
Copy Markdown
Member

I've spot checked the errors to triage, and don't find anything particularly concerning. I tested a few locally just to be sure: lintcstubs, and moonpool but I was unable to reproduce the errors locally.

Once we have the melange issue sorted, I think we are okay!

shonfeder added a commit to ocaml/dune that referenced this pull request Jun 11, 2026
Backport #14715 onto 3.24.0-rc.

Fixes the melange build failure on OCaml 4.14 where dune emits an `I/O
error: jscomp/runtime/.melange_src/X.mli: No such file or directory`
against every `melange-re/melange.*-414` reverse dep (see
ocaml/opam-repository#29996 — the 3.24.0~alpha2 release PR). The fix is
to skip the line directive in `setup_melange_sources_copy_rules` when a
module uses non-staged PPX, since the PPX pipeline now passes
`-loc-filename` separately and adding the directive would double-shift
diagnostics.

The fix has a small precursor chain on `main`; bringing the headline
`#14715` alone doesn't apply cleanly because subsequent PRs introduced
the test files and machinery the fix's diff targets. Included PRs
(chronological):

- #14697 — test: show single context melange loses ppx snippet previews
- #14698 — test: show single context reason+melange loses ppx snippet
previews
- #14708 — test: accept ppx loc-filename in fixtures
- #14706 — **fix**: preserve original ppx source locations (introduces
`-loc-filename`)
- #14714 — test: reproduce reason source location regression
- #14715 — **fix**: avoid line directive when passing `-loc-filename`
@shonfeder shonfeder closed this Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment