Skip to content

Commit 506fb02

Browse files
emillonnojb
andcommitted
Changelog for dune 3.13.0
Co-authored-by: Nicolás Ojeda Bär <[email protected]>
1 parent c22de61 commit 506fb02

File tree

1 file changed

+130
-0
lines changed

1 file changed

+130
-0
lines changed
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
---
2+
title: Dune 3.13.0
3+
date: "2024-01-16"
4+
tags: [dune, platform]
5+
changelog: |
6+
### Added
7+
8+
- Add command `dune cache clear` to completely delete all traces of the Dune
9+
cache. (#8975, @nojb)
10+
11+
- Allow to disable Coq 0.8 deprecation warning (#9439, @ejgallego)
12+
13+
- Allow `OCAMLFIND_TOOLCHAIN` to be set per context in the workspace file
14+
through the `env` stanza. (#9449, @rgrinberg)
15+
16+
- Menhir: generate `.conflicts` file by default. Add new field to the
17+
`(menhir)` stanza to control the generation of this file: `(explain <blang
18+
expression>)`. Introduce `(menhir (flags ...) (explain ...))` field in the
19+
`(env)` stanza, delete `(menhir_flags)` field. All changes are guarded under
20+
a new version of the Menhir extension, 3.0. (#9512, @nojb)
21+
22+
- Directory targets can now be cached. (#9535, @rleshchinskiy)
23+
24+
- It is now possible to use special forms such as `(:include)` and variables
25+
`%{read-lines:}` in `(modules)` and similar fields. Note that the
26+
dependencies introduced in this way (ie the files being read) must live in a
27+
different directory than the stanza making use of them. (#9578, @nojb)
28+
29+
- Remove warning 30 from default set for projects where dune lang is at least
30+
3.13 (#9568, @gasche)
31+
32+
- Add `coqdoc_flags` field to `coq` field of `env` stanza allowing the setting
33+
of workspace-wide defaults for `coqdoc_flags`. (#9280, fixes #9139, @Alizter)
34+
35+
- ctypes: fix an error where `(ctypes)` with no `(function_description)` would
36+
cause an error trying refer to a nonexistent `_stubs.a` dependency (#9302,
37+
fix #9300, @emillon)
38+
39+
### Changed
40+
41+
- Check that package names in `(depends)` and related fields in `dune-project`
42+
are well-formed. (#9472, fixes #9270, @ElectreAAS)
43+
44+
### Fixed
45+
46+
- Do not ignore `(formatting ..)` settings in context or workspace files
47+
(#8447, @rgrinberg)
48+
49+
- Fixed a bug where Dune was incorrectly parsing the output of coqdep when it
50+
was escaped, as is the case on Windows. (#9231, fixes #9218, @Alizter)
51+
52+
- Copying mode for sandboxes will now follow symbolic links (#9282, @rgrinberg)
53+
54+
- Forbid the empty `(binaries ..)` field in the `env` stanza in the workspace
55+
file unless language version is at least 3.2. (#9309, @rgrinberg)
56+
57+
- [coq] Fix bug in computation of flags when composed with boot theories.
58+
(#9347, fixes #7909, @ejgallego)
59+
60+
- Fixed a bug where the `(select)` field of the `(libraries)` field of the
61+
`(test)` stanza wasn't working properly. (#9387, fixes #9365, @Alizter)
62+
63+
- Fix handling of the `PATH` argument to `dune init proj NAME PATH`. An
64+
intermediate directory called `NAME` is no longer created if `PATH` is
65+
supplied, so `dune init proj my_project .` will now initialize a project in
66+
the current working directory. (#9447, fixes #9209, @shonfeder)
67+
68+
- Experimental doc rules: Correctly handle the case when a package depends upon
69+
its own sublibraries (#9461, fixes #9456, @jonludlam)
70+
71+
- Resolve various public binaries to their build location, rather than to where
72+
they're copied in the `_build/install` directory (#9496, fixes #7908,
73+
@rgrinberg).
74+
75+
- Correctly ignore warning flags in vendored projects (#9515, @rgrinberg)
76+
77+
- Use watch exclusions in watch mode on MacOS (#9643, fixes #9517,
78+
@PoorlyDefinedBehaviour)
79+
80+
- Fix merlin configuration for `(include_subdirs qualified)` modules (#9659,
81+
fixes #8297, @rgrinberg)
82+
83+
- Fix handling of `enabled_if` in binary install stanzas. Previously, we'd
84+
ignore the result of `enabled_if` when evaluating `%{bin:..}` (#9707,
85+
@rgrinberg)
86+
---
87+
88+
We're happy to announce that Dune 3.13.0 is now available.
89+
This feature is packed with fixes and new features that you can find in the
90+
changelog.
91+
92+
There are a few new features that we would like to specially highlight.
93+
94+
### Generate Conflicts File for Menhir Grammars ([#9512](https://github.com/ocaml/dune/pull/9512), [@nojb](https://github.com/nojb))
95+
96+
When `menhir` is used to generate code from `.mly` files, there are sometimes
97+
issues with the grammar itself, such as shift-reduce conflicts.
98+
99+
Menhir has an option to generate a "conflicts" file using its `--explain` flag,
100+
but until now this was not exposed by Dune. Starting from this version, this
101+
file will be generated automatically to help developers debug their grammars.
102+
103+
### Cached Directory Targets ([#9535](https://github.com/ocaml/dune/pull/9535), [@rleshchinskiy](https://github.com/rleshchinskiy))
104+
105+
Dune's global cache is a way to save the result of intermediate build results,
106+
even across projects. Previously, it would only work with file targets. With
107+
this change, it now supports Dune's experimental directory targets.
108+
109+
### Dynamic Module List ([#9578](https://github.com/ocaml/dune/pull/9578), [@nojb](https://github.com/nojb))
110+
111+
In several places in the Dune language, it is possible to pass a list of
112+
modules. For example in a `(library)` stanza, if for some reason the default of
113+
picking all the source files in the current directory is not the right thing to
114+
do, it is possible to pass `(module A B C)` to only attach these modules to the
115+
library.
116+
117+
An important limitation has been that the list of modules needed to be static:
118+
written as is in the `dune` file. This limitation has now been lifted and it is
119+
possible to use `(:include)` or `%{read-lines:file}` in this field and similar
120+
ones.
121+
122+
LexiFi's use case is a system of static plug-ins: a program is extended by
123+
selecting which modules are linked to the application core. This list of
124+
modules can now be emitted by a generator that reads a configuration file.
125+
126+
Previously, this required using OCaml syntax for the `dune` file, which has
127+
several issues, including incompatibility with features like
128+
`(include_subdirs)` and poor performance because Dune does not know the
129+
dependencies of the generator and needs to re-run the build more times than
130+
necessary.

0 commit comments

Comments
 (0)