[new release] dune (18 packages) (3.24.0) - #30092
Conversation
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)
|
Prior two rounds of pre-releases:
All issues and regressions have been fixed, to the best of our knowledge, and this PR now presents our minor version release. Prior triaging of CI errors can be found on the above draft PRs. I will perform another round of analysis here once CI has completed, and we share the results, either recommending merge or detailing the plans for any other needed fixes. |
|
This breaks cppo (test suite), camomile and lablgtk3. Sorry for not testing -rc. Maybe the CI will recognize this as well? |
|
Thanks for the input! There is a breaking change in this release, but it is only expected to impact packages that make invalid assumptions, or incorrect use, of the |
|
The |
That's correct. The underlying issues is that prior to dune 3.24, paths to files in the current directory were not represented with a preceding See ocaml/dune#15156 for details. |
|
Hopefully this change did consider the arguments for executables. It is up to each one how something that is (or looks like) a path is processed by that executable. As it can be seen in the case of cppo, it may process a relative path just fine. |
I am not sure what you mean here. Indeed it was in consideration for arguments to executables that this change was made. See ocaml/dune#15147 and ocaml/dune#14724 for prior discussion. The general view we have converged on is as follows: these variables have always expanded to paths, but the path representation was not unambiguous. It is now unambiguous. If build configurations were making invalid assumptions about the path representation that breaks once we make the representation unambiguous, this is a misconfiguration. |
|
Here's the initial error analysis. Failures are grouped by error message. Tons of these are downstream of just a few libraries (e.g., the ones we have already identified). Patches and bounds will be needed (unless we reverse course on the release, but I am still convinced about our analysis): https://gist.github.com/shonfeder/09f28716f60bcf4d1a2eb3b066ddc825 |
|
Triage and remediation is now complete, with results and activities documented in https://gist.github.com/shonfeder/09f28716f60bcf4d1a2eb3b066ddc825 (the work reported there exceeds the character limit of github comments). Since no regressions or unexpected breaking changes have been identified, I think that this release can be published as soon as the following remediation PR has been merged, adding The other PRs into the opam repo mentioning this one are unrelated cleanups to package data, which just happened to be caught by the CI here. |
|
thanks for the release and all the work patching all the small issues that popped up <3 |
|
Thanks for the review and merge! |
Follows ocaml#24028 observed on ocaml#30092
Follows ocaml#24028 observed on ocaml#30092
Follows ocaml#24028 observed on ocaml#30092
Fast, portable, and opinionated build system
CHANGES:
Fixed
Fix promotion failure when a target changes from a directory to a file
between builds, causing "Is a directory" errors.
(fix(promote): clean up stale staging path before rename in register_intermediate dune#14371, fixes Moving a file as a previously existing directory dune#5647, fixes Clean needed when turning a directory into a file dune#6575, @Alizter)
Make
dune build @docpick up an odoc installed viadune tools install odoceven withoutDUNE_CONFIG__LOCK_DEV_TOOL=enabled, mirroring howdune fmtconsumes a locked ocamlformat (fix: check lockdir even if lock_dev_tools is disabled when invoking odoc dune#14426, fixesdune build @docfails to finddune tools install odocinstalled odoc 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. (fix: reject (package ...) inside named dependency bindings dune#14499, @Alizter)Fix incorrect dependency in the
.cmxsbuild for libraries withmode-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. (fix: .cmxs build racing native stubs archive dune#14500, fixes Possible race condition observed on FreeBSD CI dune#12964, @Alizter)Fix
dune buildfailing with "No rule found" whenlock_dirpaths indune-workspacecontain a subdirectory (e.g.(path sub/dune.lock)).(fix(pkg): lock subdirectories dune#14524, fixes lock_dir with subdirectory path is broken dune#14523, @Alizter)
Artifact substitution repairs executable bit if it's not set correctly in the workspace
(artifact-substitution: compare executable bits when replacing files dune#14556, @rgrinberg)
Ignore
EINVALwhen accepting sockets on MacOS (Handle RPC socket preparation failures dune#14612, fixes dune forwarding rpc occasionally gets EINVAL backtrace 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. (Validate profile names. dune#14657, fixes Potential confusion around profile names and _ in the env stanza dune#14630, @rlepigre)Added
Add
%{pkg:<package>:<section>:<path>}pform for resolving package installfiles. Works with workspace packages, lock-file packages, and installed
packages. (feat: %{pkg:foo:lib:file} pforms for package install layouts dune#14200, fixes Support
%{pkg:foo:lib}variables more generally dune#14193, fixes Library variable expansion needs a library installed to work dune#3378, @Alizter)Enable the relocatable compiler by default for package management (feat(pkg): use the relocatable compiler dune#14357,
fixes Always use the relocatable compiler over the older OCaml ones. dune#14012, @Alizter)
Add changed source files to the
build-starttrace event for watch-moderestarts, showing the paths that triggered the rebuild (feature: source files changed event dune#14396, @rgrinberg)
Add dune's rusage information in start/finish build trace events (trace: include dune self rusage snapshots dune#14402, @rgrinberg)
Add a status message for RPC clients that manage to connect (Show RPC connection status in forwarded builds dune#14424, @rgrinberg)
Allow blang expressions in the
runtest_aliasfield in thecramstanza (cram: allow boolean expressions in runtest_alias dune#14425, @rgrinberg)Extend the stat based cache to cache the contents of directories and not just
source files (feature: cache directory reads dune#14469, @rgrinberg).
Show the number of connected RPC clients in the watch mode status line
(Show RPC client count in status line dune#14489, @rgrinberg)
Promote directory targets from experimental to generally available in 3.24
(Make directory targets available in Dune 3.24 dune#14579, @rgrinberg)
Changed
Use
/as directory separator when appending local paths to external paths,making path construction consistent across platforms. (path: appending local paths to external paths dune#14278, @Alizter)
On Windows, normalise process paths to
\before passing them toCreateProcessWso that programs which scanargv[0](notablycmd.exe)do not misparse mixed separators. (path: appending local paths to external paths dune#14278, @Alizter)
%{bin:NAME}now resolves to the build artifact path rather thanthe install staging path. Rules with
%{bin:NAME}deps additionallyget a per-rule
.binariesdirectory prepended to the action'sPATH, containing correctly-named symlinks for each declared binpform dep. (feat: bin-layout for %{bin:...} deps dune#14432, fixes dune build %{bin:foo} returns an error dune#3324, @Alizter)
Replace the Rocq language field
(stdlib ...)with the presence-only field(no_corelib)in Rocq language 0.14. (Rocq(no_corelib)flag dune#14452, fixes Rocq(stdlib ...)field naming changes dune#14358, @Durbatuluk1701)Throttle sandbox creation to 250 concurrent sandboxes. (fix: Throttle live sandboxes dune#14464, @rgrinberg)
The package solver now uses cached revision store lookups for improved
performance. (pkg: enable and version the rev_store cache dune#14494, fixes Version and enable the lmdb cache dune#12637, @Alizter, @rgrinberg)
Remove the deprecated
(lang coq)Coq Build Language. Use theRocq Build Language (
(using rocq <version>)) instead. Projects thatstill declare
(using coq <version>)now get an error pointing themat Rocq. (chore: remove (lang coq) Coq Build Language dune#14525, fixes [coq] Deprecation and removal of
(lang coq)for Dune 3.24 dune#12788, @Alizter)