-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[new release] dune (17 packages) (3.21.0) #29216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
CHANGES: ### Fixed - Fix `include_subdirs qualified` incorrectly picking the furthest module instead of the closest when resolving module name ambiguities. (ocaml/dune#12587, @ElectreAAS and @Alizter) - Fix: include the module alias in the transitive dependency closure with `(include_subdirs qualified)`. (ocaml/dune#12299, @anmonteiro) - Improve error messages for invalid version formats containing non-ASCII characters. Previously, non-ASCII characters in version strings (e.g., `(lang dune è)` or `(using menhir π3.14)`) would fail with a generic "Invalid file" error. Now they display a clear message: "Invalid atom: contains non-ASCII character(s). Atoms must only contain ASCII characters." The fix is implemented at the lexer level, providing consistent error handling across all s-expression parsing. (ocaml/dune#12844, fixes ocaml/dune#12836, @benodiwal) - Pass private modules with -H when this is available (ocaml/dune#12666, @rgrinberg) - Allow multiple modules in `(modules_flags ...)`, in `coq.theory` (ocaml/dune#12733, @rlepigre) - Improve error message for invalid version formats in both `(lang dune ...)` and `(using extension ...)` declarations. Changes "Atom of the form NNN.NNN expected" to "Invalid version. Version must be two numbers separated by a dot." (ocaml/dune#12833, @benodiwal) - Fix crash when running `dune build @check` on a library with virtual modules. (ocaml/dune#12644, fixes ocaml/dune#12636, @Alizter) - Provide a more informative error message when `(pkg enabled)` is put in `dune-project` instead of `dune-workspace`. (ocaml/dune#12802, fixes ocaml/dune#12801, @benodiwal) - Improve error message when invalid version strings are used in `dune-project` files. Non-ASCII characters and malformed versions now show a helpful hint with an example of the correct format. (ocaml/dune#12794, fixes ocaml/dune#12751, @benodiwal) - Stop hiding the `root_module` from the include path (ocaml/dune#12239, @rgrinberg) - Allow `$ dune init` to work on absolute paths (ocaml/dune#12601, fixes ocaml/dune#7806, @rgrinberg) - `(include_subdirs qualified)`: Add missing alias dependency to module group. (ocaml/dune#12530, @anmonteiro) - Add Melange compilation to the `@all` alias in libraries (ocaml/dune#12628, @anmonteiro) - Fix greedy version location in lang declarations. Previously, error locations for invalid lang versions would span multiple bytes for multi-byte UTF-8 characters, causing carets to appear misaligned and seemingly include the closing parenthesis. Now, error locations for ASCII strings show the full length (e.g., "Ali" shows `^^^`), while non-ASCII strings show only the first byte (e.g., "è" shows `^`) to avoid multi-byte character display issues. (ocaml/dune#12869, fixes ocaml/dune#12806, @benodiwal) - melange support: don't emit empty JavaScript modules for generated module aliases. (ocaml/dune#12464, @anmonteiro) ### Added - (Experimental): Introduce the `library_parameter` stanza. It allows users to declare a parameter when using the OxCaml compiler. (ocaml/dune#11963, implements ocaml/dune#12084, @maiste) - Added the ability to scroll horizontally in TUI. (ocaml/dune#12386, @Alizter) - Feature: Include shell command that was executed when a cram test has occurred in the error message (ocaml/dune#12307, @rgrinberg) - support expanding variables in `(promote (into ..))` (ocaml/dune#12832, fixes ocaml/dune#12742, @anmonteiro) - Add support for `%{cmt:...}` and `%{cmti:...}` variables to reference compiled annotation files (.cmt and .cmti) containing typed abstract syntax trees with location and type information. (ocaml/dune#12634, grants ocaml/dune#12633, @Alizter) - Add `$ dune describe tests` to describe the tests in the workspace (@Gromototo, ocaml/dune#12545, fixes ocaml/dune#12030) - Add `argv`, the process environment, and the dune version to the config event in the trace (ocaml/dune#12909, @rgrinberg) - Allow `dune runtest` to properly run while a watch mode server is running. (ocaml/dune#12473, grants ocaml/dune#8114, @gridbugs and @ElectreAAS) - Use copy-on-write (COW) when copying files on filesystems that support it (Btrfs, ZFS, XFS, etc), under Linux. (ocaml/dune#12074, fixes ocaml/dune#12071, @nojb) - Add support for Tangled ATproto-based code repositories (ocaml/dune#12197, @avsm) - Add support for instantiating OxCaml parameterised libraries. (ocaml/dune#12561, @art-w) - Add a `(conflict_markers error|ignore)` option to the cram stanza. When `(conflict_markers error)` is set, the cram test will fail in the presence of conflict markers. Git, diff3 and jujutsu conflict markers are detected. (ocaml/dune#12538, ocaml/dune#12617, ocaml/dune#12655, fixes ocaml/dune#12512, @rgrinberg, @Alizter) - Introduce a `%{ppx:lib1+..+libn}` stanza to make it possible to refer to ppx executables built by dune. This is useful for writing tests (ocaml/dune#12711, @rgrinberg) - Introduce a `(dir ..)` field on packages defined in the `dune-project`. This field allows to associate a directory with a particular package. This makes dune automatically filter out all stanzas in this directory and its descendants with `--only-packages`. All users are recommended to switch to using this field. (ocaml/dune#12614, fixes ocaml/dune#3255, @rgrinberg) - Add support for `DUNE_ROOT` environment variable, similar to the existing `--root` CLI parameter. (fixes ocaml/dune#12399 @sir4ur0n) - Introduce an `unused-libs` alias to detect unused libraries. (ocaml/dune#12623, fixes ocaml/dune#650, @rgrinberg) - Add `--files` flag to `dune describe opam-files` to print only the names of the opam files line by line. (ocaml/dune#9793, @reynir and @Alizter) - `dune exec` now accepts absolute paths inside the workspace. (ocaml/dune#12094, @Alizter) - Add `coqdoc_header` and `coqdoc_footer` fields to the `coq` field of the `env` stanza, and to the `coq.theory` stanza, allowing to configure a custom header or footer respectively in the HTML output of `coqdoc`. (ocaml/dune#11131, @rlepigre) - Allow `dune fmt` to properly run while a watch mode server is running. Note that the `--preview` flag is not supported in this mode. (ocaml/dune#12064, @ElectreAAS) - Support for generating `_CoqProject` files for `coq.theory` stanzas. (ocaml/dune#11752, @rlepigre) - Added `(files)` stanza, similar to `(dirs)` to control which files are visible to Dune on a per-directory basis. (ocaml/dune#12879, @nojb) - Add support for %{ocaml-config:ox} (ocaml/dune#12236, @jonludlam) - Introduce `dune promotion show` command to display the contents of corrected files that are ready for promotion. This allows users to preview changes before running `dune promote`. The command accepts file arguments to show specific files, or displays all promotable files when called without arguments. (ocaml/dune#12669, fixes ocaml/dune#3883, @MixiMaxiMouse) - New `(lang rocq)` build mode for Rocq 9.0 and later. This new mode is very similar to the existing `(lang coq)`, except that it doesn't need the `coq*` compatibility wrappers. As of today `(lang rocq)` doesn't support yet composed builds with Rocq itself, this will be added later. `(lang coq)` is deprecated, development is frozen, and will be removed at some point in the future. (ocaml/dune#12035, @ejgallego, @Lysxia, fixes ocaml/dune#11572) ### Changed - Don't run `ocamldep` to compute false dependencies on the `root_module` (ocaml/dune#12227, @rgrinberg) - `dune format-dune-file` now uses the syntax version of the Dune project that contains the file being formatted (if any) instead of using the latest version available, which remains the default if there is no Dune project in scope. (ocaml/dune#11865, @nojb) - Persistent DB and process events have been slightly modified. Persistent DB events have more concise names and job events always include full information. (ocaml/dune#12867, @rgrinberg) - Removed the `--trace-extended` flag. Its functionality is always enabled when tracing is active (ocaml/dune#12908, @rgrinberg) - The `test/dune` file generated by `dune init proj` now depends on the project library. (ocaml/dune#12791, @shonfeder) - Starting with version 3.21 of the Dune language, Dune no longer changes the default set of compiler warnings. For users that would like to keep the old behaviour, the variable `%{dune-warnings}` can be used in an `(env)` stanza in a top-level Dune file: `(env (dev (flags :standard %{dune-warnings})))`. (ocaml/dune#12766, @nojb) - Fix: stop generating `cmt` files for cinaps binaries (ocaml/dune#12530, @rgrinberg)
|
After quite a few attempts, we believe we have identified and fixed all regressions, and we have determined that all remaining revdeps errors are due to unrelated factors. For records of our triage see the review of this release candidate, before we cut the point release: I think we should be good to merge here. |
|
I appreciate your work on this. I still am curious about the decompress failures, that Marcello mentioned in #29189 (comment) and that are still in this CI run. |
|
@hannesm ah, sorry I missed addressing that. I seem to skimmed over that part of the comment and only addressed the second issue. The It looks like the fact that some solutions could produce this was reported and closed as expected in mirage/decompress#113. I can reproduce this on the currently released version of dune (on my old Mac laptop, at the moment) with note that installation without What ever is going on with the dependency cone to violate the forbidden |
|
Given the two outstanding issues are triaged (opam-dune-lint has an open PR and the forbidden_libraries issue also exists in the previous release), and that there have been 4 different runs on RCs of dune, it's time to merge this! Congratulations to Shon on managing his first Dune release :-) You may want to announce this on https://discuss.ocaml.org, where we have a Community category and an |
Fast, portable, and opinionated build system
CHANGES:
Fixed
Fix
include_subdirs qualifiedincorrectly picking the furthest moduleinstead of the closest when resolving module name ambiguities. (Fix difference between bootstrap & dune behaviour w.r.t include-subdirs ambiguity dune#12587,
@ElectreAAS and @Alizter)
Fix: include the module alias in the transitive dependency closure with
(include_subdirs qualified). (fix(include_subdirs): include alias module in closure group dune#12299, @anmonteiro)Improve error messages for invalid version formats containing non-ASCII
characters. Previously, non-ASCII characters in version strings (e.g.,
(lang dune è)or(using menhir π3.14)) would fail with a generic "Invalid file"error. Now they display a clear message: "Invalid atom: contains non-ASCII
character(s). Atoms must only contain ASCII characters." The fix is
implemented at the lexer level, providing consistent error handling across all
s-expression parsing. (Feat/good error message extensions non ascii dune#12844, fixes Improve error message for non-ASCII characters in extension versions dune#12836, @benodiwal)
Pass private modules with -H when this is available (fix: -H for hidden modules dune#12666, @rgrinberg)
Allow multiple modules in
(modules_flags ...), incoq.theory(Coq/Rocq: fix handling of (modules_flags ...). dune#12733, @rlepigre)Improve error message for invalid version formats in both
(lang dune ...)and(using extension ...)declarations. Changes "Atom of the form NNN.NNN expected"to "Invalid version. Version must be two numbers separated by a dot." (fix: same error message for both ascii and non ascii invalid version cases dune#12833, @benodiwal)
Fix crash when running
dune build @checkon a library with virtual modules.(fix: missing virtual implementation in top closure dune#12644, fixes virtual libraries: "dune build @check" bug? dune#12636, @Alizter)
Provide a more informative error message when
(pkg enabled)is put indune-projectinstead ofdune-workspace. (Fix/good error msg pkg enabled dune#12802, fixes Good error when(pkg enabled)is put in dune-project dune#12801,@benodiwal)
Improve error message when invalid version strings are used in
dune-projectfiles. Non-ASCII characters and malformed versions now show a helpful hint
with an example of the correct format. (fix: Fix crash on non-ASCII version in dune-project dune#12794, fixes Crash on non-ascii version in dune-project dune#12751, @benodiwal)
Stop hiding the
root_modulefrom the include path (fix: stop hiding the root module dune#12239, @rgrinberg)Allow
$ dune initto work on absolute paths (dune init: use source path dune#12601, fixes dune init project crashes with an absolute directory dune#7806,@rgrinberg)
(include_subdirs qualified): Add missing alias dependency to module group.(fix(include_qualified): add missing alias dependency to module group dune#12530, @anmonteiro)
Add Melange compilation to the
@allalias in libraries (fix(melange): add melange module compilation as part of@allalias dune#12628,@anmonteiro)
Fix greedy version location in lang declarations. Previously, error locations for
invalid lang versions would span multiple bytes for multi-byte UTF-8 characters,
causing carets to appear misaligned and seemingly include the closing
parenthesis. Now, error locations for ASCII strings show the full length (e.g.,
"Ali" shows
^^^), while non-ASCII strings show only the first byte (e.g., "è"shows
^) to avoid multi-byte character display issues. (fix: greedy version location in lang declarations dune#12869, fixes Location excerpts miscompute character positions for unicode and greedy ranges dune#12806,@benodiwal)
melange support: don't emit empty JavaScript modules for generated module
aliases. (melange: don't emit empty
.jsfiles for module aliases dune#12464, @anmonteiro)Added
(Experimental): Introduce the
library_parameterstanza. It allows users todeclare a parameter when using the OxCaml compiler.
(feat(oxcaml): add the library_parameter stanza dune#11963, implements [OxCaml] Parameterized libraries: library parameter dune#12084, @maiste)
Added the ability to scroll horizontally in TUI. (feat(tui): horizontal mouse scrolling dune#12386, @Alizter)
Feature: Include shell command that was executed when a cram test has
occurred in the error message (feature(cram): include failed command in cram timeouts dune#12307, @rgrinberg)
support expanding variables in
(promote (into ..))(feat: expand variables in(promote (into ..))dune#12832, fixes Promote into doesn't accept dune variables dune#12742,@anmonteiro)
Add support for
%{cmt:...}and%{cmti:...}variables to referencecompiled annotation files (.cmt and .cmti) containing typed abstract syntax
trees with location and type information. (feat: %{cmt} and %{cmti} artifact variables dune#12634, grants Add %{cmt} to "artifacts variables" dune#12633, @Alizter)
Add
$ dune describe teststo describe the tests in the workspace(@Gromototo, add
dune describe testssubcommand dune#12545, fixesdune describedoesn't show tests dune#12030)Add
argv, the process environment, and the dune version to the config eventin the trace (Add more info to the config event dune#12909, @rgrinberg)
Allow
dune runtestto properly run while a watch mode server is running.(Allow running tests concurrently with watch server, again! dune#12473, grants Running tests and
exec-ing executables should be possible while build server is running dune#8114, @gridbugs and @ElectreAAS)Use copy-on-write (COW) when copying files on filesystems that support it
(Btrfs, ZFS, XFS, etc), under Linux. (Use copy_file_range when supported dune#12074, fixes Cache: Support Copy on Write (
cp --reflink) dune#12071, @nojb)Add support for Tangled ATproto-based code repositories (Add support for Tangled ATproto-based code repositories dune#12197, @avsm)
Add support for instantiating OxCaml parameterised libraries.
(feat(oxcaml): instantiate parameterised libraries dune#12561, @art-w)
Add a
(conflict_markers error|ignore)option to the cram stanza. When(conflict_markers error)is set, the cram test will fail in the presence ofconflict markers. Git, diff3 and jujutsu conflict markers are detected.
(feature(cram): allow for conflict detection dune#12538, feat(cram): detect diff3 and jujutsu conflicts dune#12617, fix(cram): allow text after conflict markers dune#12655, fixes Issue a warning when there are conflict markers in test files dune#12512, @rgrinberg, @Alizter)
Introduce a
%{ppx:lib1+..+libn}stanza to make it possible to refer to ppxexecutables built by dune. This is useful for writing tests (Add a ppx pform to simplify writing tests dune#12711,
@rgrinberg)
Introduce a
(dir ..)field on packages defined in thedune-project. Thisfield allows to associate a directory with a particular package. This makes
dune automatically filter out all stanzas in this directory and its
descendants with
--only-packages. All users are recommended to switch tousing this field. (One Directory per Package dune#12614, fixes One package per directory mode dune#3255, @rgrinberg)
Add support for
DUNE_ROOTenvironment variable, similar to the existing--rootCLI parameter. (fixes Add support forDUNE_ROOTenvironment variable dune#12399 @sir4ur0n)Introduce an
unused-libsalias to detect unused libraries.(feature: add an unused-libs alias dune#12623, fixes Dune should warn about dependencies on unused libraries dune#650, @rgrinberg)
Add
--filesflag todune describe opam-filesto print only the names ofthe opam files line by line. (Add --files to dune describe opam-files dune#9793, @reynir and @Alizter)
dune execnow accepts absolute paths inside the workspace.(feat(exec): support absolute paths for dune exec dune#12094, @Alizter)
Add
coqdoc_headerandcoqdoc_footerfields to thecoqfield of theenvstanza, and to thecoq.theorystanza, allowing to configure acustom header or footer respectively in the HTML output of
coqdoc.(Add "coqdoc_header" and "coqdoc_footer" fields. dune#11131, @rlepigre)
Allow
dune fmtto properly run while a watch mode server is running.Note that the
--previewflag is not supported in this mode.([RPC] Allow formatting while watch server is running dune#12064, @ElectreAAS)
Support for generating
_CoqProjectfiles forcoq.theorystanzas.(Generate "_CoqProject" files for Coq theories dune#11752, @rlepigre)
Added
(files)stanza, similar to(dirs)to control which files are visibleto Dune on a per-directory basis. (Add (files) stanza dune#12879, @nojb)
Add support for %{ocaml-config:ox} (Expose 'ocamlc -config' parameter 'ox' dune#12236, @jonludlam)
Introduce
dune promotion showcommand to display the contents of correctedfiles that are ready for promotion. This allows users to preview changes
before running
dune promote. The command accepts file arguments to showspecific files, or displays all promotable files when called without
arguments. (Add ‘dune promotion show’ command and tests dune#12669, fixes Add dune command to get the contents of a "corrected" file dune#3883, @MixiMaxiMouse)
New
(lang rocq)build mode for Rocq 9.0 and later. This new modeis very similar to the existing
(lang coq), except that it doesn'tneed the
coq*compatibility wrappers. As of today(lang rocq)doesn't support yet composed builds with Rocq itself, this will be
added later.
(lang coq)is deprecated, development is frozen, andwill be removed at some point in the future. ([rocq] Initial support for the Rocq Prover build language dune#12035, @ejgallego,
@Lysxia, fixes Rocq support in dune dune#11572)
Changed
Don't run
ocamldepto compute false dependencies on theroot_module(Fix handling of root module dependencies dune#12227, @rgrinberg)
dune format-dune-filenow uses the syntax version of the Dune project thatcontains the file being formatted (if any) instead of using the latest version
available, which remains the default if there is no Dune project in scope.
(dune format-dune-file: use Dune lang version of current Dune project dune#11865, @nojb)
Persistent DB and process events have been slightly modified. Persistent
DB events have more concise names and job events always include full
information. (Move trace events to dune_trace dune#12867, @rgrinberg)
Removed the
--trace-extendedflag. Its functionality is always enabled whentracing is active (Remove --trace-extended dune#12908, @rgrinberg)
The
test/dunefile generated bydune init projnow depends on the project library. (Add library dependency in dune init proj tests dune#12791, @shonfeder)Starting with version 3.21 of the Dune language, Dune no longer changes the
default set of compiler warnings. For users that would like to keep the old
behaviour, the variable
%{dune-warnings}can be used in an(env)stanza ina top-level Dune file:
(env (dev (flags :standard %{dune-warnings}))).(Stop changing the default warning set of the compiler dune#12766, @nojb)
Fix: stop generating
cmtfiles for cinaps binaries (fix(include_qualified): add missing alias dependency to module group dune#12530, @rgrinberg)