(name ..)
in projects as long as they don't conflict during resolution (via enabled_if
). (#10307, @anmonteiro, @jchavarri)dune describe pp
now finds the exact module and the stanza it belongs to, instead of guessing the name of the preprocessed file. (#10321, @anmonteiro)dune describe pp
with the respective dialect printer. (#10322, @anmonteiro)--context
to dune ocaml-merlin
, which allows to select a Dune context when requesting Merlin config. Add dune describe contexts
subcommand. Introduce a field generate_merlin_rules
for contexts declared in the workspace, that allows to optionally produce Merlin rules for other contexts besides the one selected for Merlin (#10324, @jchavarri).cmj
files during JS emission. (#10416, @anmonteiro)dune ocaml-merlin
: communicate additional directives SOURCE_ROOT
, UNIT_NAME
(the actual name with wrapping) and INDEX
with the paths to the index(es). (#10422, @voodoos)@ocaml-index
that uses the ocaml-index
binary to generate indexes that can be read by tools such as Merlin to provide project-wide references search. (#10422, @voodoos)(merlin_reader CMD)
construct to (dialect)
stanza to configure a merlin reader (#8567, @andreypopp)(package ..)
as public libraries, fixing an issue where import
paths were wrongly emitted. (#10415, @anmonteiro).glob
files for Coq theories too (#10602, @ejgallego)dune-site
's load_all
function look for META
files so that it doesn't fail on empty directories in the plugin directory (#10458, fixes #10457, @shym)(subdir ..)
and used by executables using dune-build-info
(#10525, @rgrinberg)coq top --no-build
(#10547, fixes #7671, @lzy0505)byte_complete
. This fixes (libraries)
with foreign archives on Linux. (#10586, fixes #10582, @anmonteiro)exists_if
predicate in META
files of installed libraries containing more than one element. (#10564, fixes #10563, @dbuenzli, @nojb)enabled_if
(#10442, @rgrinberg)enabled_if
(#10382, fixes #10310, @gridbugs)ocamlmklib
for ctypes stubs (#8784, @frejsoya)%{env:..}
form can be used to select files to be installed. (#10160, @rgrinberg)%{cma:..}
, %{cmo:..}
, etc.) in more contexts. Previously, they would be randomly forbidden in some fields. (#10169, @rgrinberg)%{inline_tests}
in more contexts (#10191, @rgrinberg)(enabled_if ..)
field of libraries (#10250, @rgrinberg)dune describe pp
(#10283, @emillon)coqc
is not present. Thanks to @vzaliva for the test case and report (#9845, fixes #9818, @rgrinberg, @ejgallego)select
on bigarray
in OCaml 5 (#10011, @moyodiallo)import
paths to be emitted when moving source files within (include_subdirs ..)
(#10286, fixes #9190, @anmonteiro)dune exec --watch
where the working directory would always be set to the project root rather than the directory where the command was run (#10262, @gridbugs)(include_subdirs qualified)
(#10269, fixes #10264, @emillon)--react-to-insignificant-changes
option. (#10083, @rgrinberg)signal.h
not being pulled in spawn stubs. (#10256, @emillon)dune build
runs. (#9327, fix #6575, @emillon)CreateProcess
to avoid crashes when paths contains non-ascii characters. (#10212, fixes #10180, @emillon)(dynamic_include ..)
stanza. This is like (include foo)
but allows foo
to be the target of a rule. Currently, there are some limitations on the stanzas that can be generated. For example, public executables, libraries are currently forbidden. (#9913, @rgrinberg)$ dune promotion list
to print the list of available promotions. (#9705, @moyodiallo)only_sources
field to copy_files
stanza (#9827, fixes #9709, @jchavarri)(foreign_library)
stanza now supports the (enabled_if)
field. (#9914, @nojb)$ dune install -p
incorrectly recognizing packages that are supposed to be filtered (#9879, fixes #4814, @rgrinberg)enabled_if
(#9897, @rgrinberg and @jchavarri)(run %{bin:..} ..)
from where the binary is built. (#9708, @rgrinberg)dune ocaml top-module
to correctly handle absolute paths. (#8249, fixes #7370, @Alizter)dune cache clear
to completely delete all traces of the Dune cache. (#8975, @nojb)OCAMLFIND_TOOLCHAIN
to be set per context in the workspace file through the env
stanza. (#9449, @rgrinberg).conflicts
file by default. Add new field to the (menhir)
stanza to control the generation of this file: (explain <blang expression>)
. Introduce (menhir (flags ...) (explain ...))
field in the (env)
stanza, delete (menhir_flags)
field. All changes are guarded under a new version of the Menhir extension, 3.0. (#9512, @nojb)(:include)
and variables %{read-lines:}
in (modules)
and similar fields. Note that the dependencies introduced in this way (ie the files being read) must live in a different directory than the stanza making use of them. (#9578, @nojb)coqdoc_flags
field to coq
field of env
stanza allowing the setting of workspace-wide defaults for coqdoc_flags
. (#9280, fixes #9139, @Alizter)(ctypes)
with no (function_description)
would cause an error trying refer to a nonexistent _stubs.a
dependency (#9302, fix #9300, @emillon)(depends)
and related fields in dune-project
are well-formed. (#9472, fixes #9270, @ElectreAAS)(formatting ..)
settings in context or workspace files (#8447, @rgrinberg)(binaries ..)
field in the env
stanza in the workspace file unless language version is at least 3.2. (#9309, @rgrinberg)(select)
field of the (libraries)
field of the (test)
stanza wasn't working properly. (#9387, fixes #9365, @Alizter)PATH
argument to dune init proj NAME PATH
. An intermediate directory called NAME
is no longer created if PATH
is supplied, so dune init proj my_project .
will now initialize a project in the current working directory. (#9447, fixes #9209, @shonfeder)_build/install
directory (#9496, fixes #7908, @rgrinberg).(include_subdirs qualified)
modules (#9659, fixes #8297, @rgrinberg)enabled_if
in binary install stanzas. Previously, we'd ignore the result of enabled_if
when evaluating %{bin:..}
(#9707, @rgrinberg)runtest_alias
for cram
stanza (#9454, @emillon)(run)
action can not be parsed. (#9530, fixes #9529, @gridbugs)$ dune ocaml doc
to open and browse documentation. (#7262, fixes #6831, @EmileTrotignon)dune cache trim
now accepts binary byte units: KiB
, MiB
, etc. (#8618, @Alizter)runtest_alias
field to the cram
stanza. This allows removing default runtest
alias from tests. (@rgrinberg, #8887)bigarray
when they are defined in conjunction with OCaml 5.0 (#8902, fixes #8901, @rgrinberg)(include_subdirs qualified)
is enabled (@rgrinberg, #8949, fixes #7610)(expand_aliases_in_sandbox)
changes (#8990, @rgrinberg)write-file
, echo
, etc.) can now be sandboxed. (#9041, fixes #8854, @rgrinberg)bigarray
on recent version of OCaml (#9076, @rgrinberg)test_
prefix to default test name in dune init project
(#9257, fixes #9131, @9sako6)(stdlib no)
and likely other cases. (#8966, fix #8958, @Alizter, reported by Lasse Blaauwbroek)INSIDE_EMACS
. (#8812, @Alizter)version=""
is found in a META
file, we now return None
as a version string (#9177, @emillon)dune-package
files. This fixes (package)
dependencies against packages that contain such directories. (#8953, fixes #8915, @emillon)dune rpc
commands on Windows (#8806, fixes #8799, @nojb)inline_tests
when the partition list is empty (#8849, fixes #8848, @hhugo)enabled_if
now supports arch_sixtyfour
variable (#8023, fixes #7997, @Alizter)posix_spawn
instead of fork
on MacOS. This gives us a performance boost and allows us to re-enable thread. (#8090, @rgrinberg)$ dune monitor
command that can connect to a running dune build
in watch mode and display the errors and progress. (#8152, @Alizter)progress
RPC procedure now has an extra field for the In_progress
constructor for the number of failed jobs. (#8212, @Alizter)--preview
flag to dune fmt
which causes it to print out the changes it would make without applying them (#8289, @gridbugs)(source_trees ..)
to the install stanza to allow installing entire source trees. (#8349, @rgrinberg)--stop-on-first-error
option to dune build
which will terminate the build when the first error is encountered. (#8400, @pmwhite and @Alizter)with_prefix
keyword for changing the prefix of the destination of installed files matched by globs. (#8416, @gridbugs)--display tui
option for Dune that opens an interactive Terminal User Interface (TUI) when Dune is running. Press '?' to open up a help screen when running for more information. (#8429, @Alizter and @rgrinberg)warnings
field to dune-project
files as a unified mechanism to enable or disable dune warnings (@rgrinberg, 8448)dune exec
: support syntax like %{bin:program}
. This can appear anywhere in the command line, so things like dune exec time %{bin:program}
now work. (#6035, #8474, fixes #2691, @emillon, @Leonidas-from-XIV)@doc-json
to build odoc documentation in JSON format. This output can be consumed by external tools. (#8178, @emillon)(modules_without_implementation)
, (private_modules)
or (virtual_modules)
but not declared in (modules)
will raise an error. (#7674, @Alizter).dune
files generated by pre dune 2.0 (#8611, @rgrinberg)dune utop
no longer links utop
in "custom" mode, which should make this command considerably faster. (#8631, fixes #6894, @nojb)dune-project
are valid opam package names. (#8331, @emillon)--public
as a public name (#8603, fixes #7108, @emillon)dune show rules
as alias of the dune rules
command. (#8000, @Alizter)%{deps}
to expand properly in (cat ...)
when containing 2 or more items. (#8196, @Alizter)dune show installed-libraries
as an alias of the dune installed-libraries
command. (#8135, @Alizter)severity
of error messages sent over RPC which was missing. (#8193, @Alizter)dune build --dump-gc-stats FILE
argument to dump garbage collection stats to a named file. (#8072, @Alizter)dune describe package-entries
to print all package entries (#7480, @moyodiallo)dune describe external-lib-deps
by adding the internal dependencies for more information. (#7478, @moyodiallo)sendfile
fallback (#8288, fixes #8284, @alan-j-hu)sendfile
is not available (#8234, fixes #8210, @emillon)$ dune ocaml top-module
. (#8005, fixes #8004, @3Rafal)--trace-file
is enabled (#7960, @rgrinberg)dune show
command group which is an alias of dune describe
. (#7946, @Alizter)--trace-file
(#7937, @rgrinberg)--all
option to dune rpc status
to show all Dune RPC servers running. (#8011, fix #7902, @Alizter).merlin
files. Now dune will never remove .merlin
files automatically (#7562)dune show env
command and make dune printenv
an alias of it. (#7985, @Alizter)--trace-file
whenever --trace-extended
is passed (#7778, @rleshchinskiy)(dialect)
can contain periods (e.g., cppo.ml
). (#7782, fixes #7777, @nojb)(include_subdirs qualified)
to be used when libraries define a (modules ...)
field (#7797, fixes #7597, @anmonteiro)$ dune describe
is now a command group, so arguments to subcommands must be passed after subcommand itself. (#7919, @Alizter)interface
and implementation
fields of a (dialect)
are now optional (#7757, @gpetiot)dune show targets
and dune show aliases
that display all the available targets and aliases in a given directory respectively. (#7770, grants #265, @Alizter)(stdlib (internal_modules ..))
(@anmonteiro, #7878)(and)
and (or)
with no arguments at parse time (#7730, @emillon)(build_if)
to the (test)
stanza. When it evaluates to false, the executable is not built. (#7899, fixes #6938, @emillon)sendfile
to copy files on Linux, fall back to the portable version if it fails at runtime for some reason (NFS, etc). (#8049, fixes #8041, @emillon)-p
/ --only-packages
for melange.emit
artifacts (#7849, @anmonteiro)(mode vo)
for these older versions of Coq. (#7847, fixes #7846, @Alizter)ppx_runtime_libraries
in the target context when cross compiling) (#7887, fixes #7875, @emillon)--trace-file
(#7773, @rleshchinskiy)pkg-config
arguments from the PKG_CONFIG_ARGN
environment variable (#1492, #7734, @anmonteiro)MANPATH
in dune exec
. Previously, we would use the bin/
directory of the context. (#7655, @rgrinberg)ocaml
binary with findlib configuration (#7648, @rgrinberg)public_headers
field on libraries. This field is like install_c_headers
, but it allows to choose the extension and choose the paths for the installed headers. (#7512, @rgrinberg)findlib.conf
when cross-compiling (#7428, fixes #1701, @rgrinberg, @anmonteiro)coqdoc_flags
field to the coq.theory
stanza allowing the user to pass extra arguments to coqdoc
. (#7676, fixes #7954 @Alizter)ppx_runtime_libraries
in the target context when cross compiling (#7450, fixes #2794, @anmonteiro)$PKG_CONFIG
, when set, to find the pkg-config
binary (#7469, fixes #2572, @anmonteiro)(modules_without_implementation)
, (private_modules)
or (virtual_modules)
but not declared in (modules)
will cause Dune to emit a warning which will become an error in 3.11. (#7608, fixes #7026, @Alizter).vos
files) enabled via (mode vos)
in coq.theory
stanzas. This can be used in combination with dune coq top
to obtain fast re-building of dependencies (with no checking of proofs) prior to stepping into a file. (#7406, @rlepigre)$PATH
contains $PWD
(#7441, fixes #6907, @rgrinberg)dune install
when cross compiling (#7410, fixes #6191, @anmonteiro, @rizo)pps
dependencies in the host context when cross-compiling, (#7415, fixes #4156, @anmonteiro)dune coq top
now correctly respects the project root when called from a subdirectory. However, absolute filenames passed to dune coq top
are no longer supported (due to being buggy) (#7357, fixes #7344, @rlepigre and @Alizter)--no-build
option to dune coq top
for avoiding rebuilds (#7380, fixes #7355, @Alizter)nproc
to be looked up in $PATH
(#7272, @Alizter)clonefile
when available (@rgrinberg, #7210)--watch-exclusions
to Dune build options (#7216, @jonahbeckford)--display-separate-messages
flag to separate the error messages produced by commands with a blank line. (#6823, fixes #6158, @esope)modes
field in library
stanzas (#6611, @anmonteiro).(stdlib ...)
to depend on other libraries (#7154, @anmonteiro).-noautolink
and no longer depend on the shared stubs of their dependent libraries (#7156, @nojb)(concurrent )
which is like (progn )
but runs the actions concurrently. (#6933, @Alizter)(stdlib ...)
to be used with (wrapped false)
in library stanzas (#7139, @anmonteiro).(link_flags ...)
in (cinaps ...)
stanza. (#7423, fixes #7416, @nojb)(package ...)
in any position within (rule ...)
stanza (#7445, @Leonidas-from-XIV)opam
files in the generated .install
file. Previously, it would not be included whenever (generate_opam_files true)
was set and the .install
file wasn't yet generated. (#7547, @rgrinberg)-f
to the codesign hook to avoid errors when the binary is already signed (#7183, fixes #6265, @greedy)*.mld
files (#7582, @Leonidas-from-XIV)(coq lang 0.8)
which provides the right semantics for theories that have been globally installed, such as those coming from opam (@ejgallego, @Alizter)(mdx)
stanza (#7109, fixes #7077, @emillon).stdlib.ml
. (#7241, @emillon)(executable)
, (public_name -)
is now equivalent to no (public_name)
. This is consistent with how (executables)
handles this field. (#7576 , fixes #5852, @emillon)odoc.support
(was _odoc_support
) so that it works with Github Pages out of the box. (#7588, fixes #7364, @emillon)$ dune exec
in watch mode (with the -w
flag). In watch mode, $ dune exec
the executed binary whenever it is recompiled. (#6966, @gridbugs)coqdep
is now called once per theory, instead of one time per Coq file. This should significantly speed up some builds, as coqdep
startup time is often heavy (#7048, @Alizter, @ejgallego)map_workspace_root
dune-project stanza to allow disabling of mapping of workspace root to /workspace_root
. (#6988, fixes #6929, @richardlford)...
in them. (#7008, @rgrinberg)<=
operator in blang expressions of dune
files. Previously, the operator would be interpreted as <
. (#6928, @tatchi)--trace-file
output. Dune now emits a single complete event for every executed process. Unterminated async events are no longer written. (#6892, @rgrinberg)staged_pps
(#6748, fixes #6644, @rgrinberg)dune describe workspace
return consistent dependencies for executables and for libraries. By default, compile-time dependencies towards PPX-rewriters are from now not taken into account (but runtime dependencies always are). Compile-time dependencies towards PPX-rewriters can be taken into account by providing the --with-pps
flag. (#6727, fixes #6486, @esope)$ dune exec
. (#6821, fixes #6700, @rgrinberg, @Alizter)-fdiagnostics-color=always
is added to the :standard
set of flags. (#4083, @MisterDA)dune
, dune-package
, and other dune s-expression based files (#6710, @shym)dune init ...
would create a "dune" file in a location which already contains a "dune" directory (#6705, @gridbugs)implicit_transitive_deps
is enabled (#6642, @rgrinberg)$ dune utop
to load libraries defined in data only directories defined using (subdir ..)
(#6631, @rgrinberg)dune-file
. This occurs when we enable the alternative file names project option. (#6566, @rgrinberg)$ dune ocaml-merlin -dump-config=$dir
to $ dune ocaml merlin dump-config $dir
. (#6547, @rgrinberg)(env ..)
stanzas that modify the environment or set binaries. (#6527, @rgrinberg)(mode native)
has been deprecated in favour of detection from the configuration of Coq. (#6409, @Alizter)$ dune ocaml dump-dot-merlin
to run in watch mode. Also this command shouldn't print "Entering Directory" mesages. (#6497, @rgrinberg)dune clean
should no longer fail under Windows due to the inability to remove the .lock
file. Also, bring the implementation of the global lock under Windows closer to that of Unix. (#6523, @nojb)$ dune install
. (#6513, @rgrinberg)-q
flag in dune coq top
, which allows for .coqrc
to be loaded. (#6848, fixes #6847, @Alizter)(include_subdirs qualified)
for OCaml projects. (#6594, fixes #1084, @rgrinberg)copy#
and copy_files#
. The old heuristic of looking for a module in parent directories is removed (#6594, @rgrinberg)--enable=effects
,--enable=use-js-string
or --toplevel
is used. (#6714, #6828, #6920, @hhugo)dune init proj ...
(#6707, fixes #5429, @gridbugs)--sandbox
to affect ocamldep
invocations. Previously, they were wrongly marked as incompatible (#6749, @rgrinberg)$ dune ocaml top-module
. This command requires one positional argument (#6796, fixes #6793, @rgrinberg)dune cache size
command for displaying the size of the cache (#6638, @Alizter)glob_files
(#6764, fixes #6708, @gridbugs)cinaps
stanza to set a custom alias. By default, if the alias is not set then the cinaps actions will be attached to both @cinaps
and @runtest
(#6991, @rgrinberg)(using ctypes 0.3)
. When used, paths in (ctypes)
are interpreted relative to where the stanza is defined. (#6883, fixes #5325, @emillon)dune-workspace
files as dune
files in Emacs (#7061, @ilankri)(bin_annot <bool>)
to (env ...)
to specify whether to generate *.cmt*
files. (#7102, @nojb)subdir
(#6404, fixes #3502, @rgrinberg)$ dune ocaml top-module
subcommand to load modules directly without sealing them behind the signature. (#5940, @rgrinberg)CLICOLOR
and CLICOLOR_FORCE
to enable/disable/force ANSI colors. (#6340, fixes #6323, @MisterDA).(package ..)
set from depending on private libraries that don't belong to a package (#6385, fixes #6153, @rgrinberg)Byte_complete
binaries to be installable (#4873, @AltGr, @rgrinberg)$ dune external-lib-deps
under $ dune describe external-lib-deps
. (#6045, @moyodiallo)pkg-config
because we aren't tracking its external dependencies (#6052, @rgrinberg)(deps %{bin:...})
(#6326, @anmonteiro)_build/.rpc/dune
on windows to allow rpc clients to connect using the build directory. (#6329, @rgrinberg)(glob_files <glob>)
and (glob_files_rec <glob>)
terms to the files
field of the install
stanza (#6250, closes #6018, @gridbugs):standard
in the (modules)
field of the coq.pp
stanza (#6229, fixes #2414, @Alizter)dune promotion
group: dune promote
is moved to dune promotion apply
(the former still works) and the new dune promotion diff
command can be used to just display the promotion without applying it. (#6160, fixes #5368, @emillon)runtime_deps
field in the cinaps
stanza to specify runtime dependencies for running the cinaps preprocessing action (#6175, @rgrinberg)Foo__
when building a library Foo
(#6126, @rgrinberg)clear-on-rebuild-and-flush-history
(#6065, @rgrinberg)(promote (until-clean))
when --ignore-promoted-rules
(or -p
) is passed. (#6010, fixes #4401, @emillon)dirs
field in the install
stanza to install entire directories (#5097, fixes #5059, @rgrinberg)(include <file>)
term to the include_dirs
field for adding directories to the include paths sourced from a file. (#6058, fixes #3993, @gridbugs)(extra_objects ...)
field in (executable ...)
and (library ...)
stanzas (#6084, fixes #4129, @gridbugs)(license)
(#6114, fixes #6103, @emillon)ODOC_SYNTAX
and will rerun accordingly (#6010, fixes #1117, @emillon)%{coq:...}
macro for accessing data about the configuration about Coq. For instance %{coq:version}
(#6049, @Alizter)dune ocaml
. (#6038, @emillon, #6169, @shonfeder)Findlib
).(stdlib no)
. (#6165 #6164, fixes #6163, @ejgallego @Alizter @LasseBlaauwbroek)(coq.theory ...)
stanza will now ensure that for each declared (plugin ...)
, the META
file for it is built before calling coqdep
. This enables the use of the new Findlib
-based loading method in Coq 8.16; however as of Coq 8.16.0, Coq itself has some bugs preventing this to work yet. (#6167 , workarounds #5767, @ejgallego)mode_specific_stubs
that allows the specification of different flags and sources for foreign stubs depending on the build mode (#5649, @voodoos)C-c
when running $ dune subst
(#5892, @rgrinberg)dune describe
correctly handle overlapping implementations for virtual libraries (#5971, fixes #5747, @esope)@check
alias should make sure the libraries and executables don't have dependency cycles (#5892, @rgrinberg)errno
parameter using the errno_policy
field in the ctypes settings. (#5827, @droyo)dune coq top
when it is invoked on files from a subdirectory of the directory containing the associated stanza (#5784, fixes #5552, @ejgallego, @rlepigre, @Alizter)(cat)
action now supports several files. (#5928, fixes #5795, @emillon)META
files for OCaml 5.x, solely using the ones installed by the compiler. (#5916, @dra27)(deps)
field in (test)
stanzas when there is an .expected
file. (#5952, #5951, fixes #5950, @emillon).git/
directory. (#5953, @rgrinberg)FOLDERID_InternetCache
if unset, and XDG_CONFIG_HOME and XDG_DATA_HOME are both taken to be FOLDERID_LocalAppData
if unset. (#5943, fixes #5808, @nojb)(libraries)
field of the coq.theory
stanza has been renamed to (plugins)
and the Coq language version has been bumped to 0.5.pps
specification for preprocessing (#5820, @Firobe)data_only_dirs
that wrongly mentions the unknown constructor data_only
(#5803, @lambdaxdotx)coq.theory
stanza now produces rules for running coqdoc
. Given a theory named mytheory
, the directory targets mytheory.html/
and mytheory.tex/
or additionally the aliases @doc
and @doc-latex
will build the HTML and LaTeX documentation respectively. (#5695, fixes #3760, @Alizter)(boot)
cannot depend on other theories (#5867, @ejgallego)bigarray
in (libraries)
with OCaml >= 5.0. (#5526, fixes #5494, @moyodiallo)dune describe workspace --with-deps
so that it correctly handles Reason files, as well as files any other dialect. (#5701, @esope)dune describe --with-deps
, that crashed when some preprocessing was required in a dune file using per_module
. (#5682, fixes #5680, @esope)$ dune describe pp
to print the preprocssed ast of sources. (#5615, fixes #4470, @cannorin)./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)dune build @fmt --auto-promote
(#5574, @tmattio)include
stanzas, dune-project, opam files, libraries builtin with compiler, and foreign sources (#5627, #5645, #5652, #5656, #5672, #5691, #5722, fixes #5331, @rgrinberg)glob_files
only against files in external directories (#5614, fixes #5540, @rgrinberg)not
to boolean expressions (#5610, fix #5503, @rgrinberg)--prefix
via the environment variable DUNE_INSTALL_PREFIX
(#5589, @vapourismo)archive(native|byte, plugin)
used in the wild before findlib documented plugin(native|byte)
in 2015 (#5518, @bobot)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)(binaries)
in (env)
in dune-workspace files (#5560, fix #5555, @emillon)(system ..)
actions on Windows. (#5593, fixes #5523, @nojb)sourcehut
as an option for defining project sources in dune-project files. For example, (source (sourcehut user/repo))
. (#5564, @rgrinberg)dune coq top
command for running a Coq toplevel (#5457, @rlepigre)(deps <deps>)
in ctype field (#5346, @bobot)(include <file>)
constructor to dependency specifications. This can be used to introduce dynamic dependencies (#5442, @anmonteiro)dune describe
computes a transitively closed set of libraries (#5395, @esope)coqdep
now depends only on the filesystem layout of the .v files, and not on their contents (#5547, helps with #5100, @ejgallego)(implicit_transitive_deps false)
(#5558, fixes #5499, @emillon)(with-outputs-to )
(#5551, fixes #5546, @Alizter)gmake
before make
(#5474, fixes #5470, @rgrinberg)getconf
(#5473 fixes #5471, @mndrix)foreign_archives
for ctypes stub generation (#5475, @mbacarella)BUILD_PATH_PREFIX_MAP
for projects before 3.0 (5448, @rgrinberg)uchar
and seq
dummy ocamlfind libraries from dune's builtin library database (#5260, @kit-ty-kate)DUNE_DIFF_COMMAND
environment variable to match --diff-command
command-line parameter (@raphael-proust, fix #5369, #5375)native_pack_linker
field of ocamlc -config
(#5281, @TheLortex)env
stanza (@hhugo, #5049, #1613)env
stanza. Previously, it was hard coded to always be enabled in the dev
profile. (@hhugo, #5049, fix #970)-no-check-prims
when building bytecode for jsoo (@hhugo, #5049, #4027)(allow_empty)
to the package stanza in the dune-project file. (#4867, fix #2882, @kit-ty-kate, @rgrinberg)link_flags
field to the executable
field of inline_tests
(#5088, fix #1530, @jvillard)inotifywait
watch mode backend on Linux. We now use the inotify API exclusively (#4941, @rgrinberg)(lang dune 2.3.4)
or (lang dune 2.3suffix)
were silently parsed as 2.3
and we know suggest to remove the prefix. (#5040, @emillon)(deps %{read:foo.gen})
(#4662, fixes #4089, @jeremiedimino)binaries
defined in the env stanza
. Binaries defined in x/dune
wouldn't be visible in `x/*/**/dune. (#4975, fixes #4976, @Leonidas-from-XIV, @rgrinberg)foreign_stubs
inside a tests
stanza. Previously, dune would crash when this field was present (#4942, fix #4946, @rgrinberg)enabled_if
field to inline_tests
within the library
stanza. This allows us to disable executing the inline tests while still allowing for compilation (#4939, @rgrinberg)dune-project
when initializing projects with dune init proj ...
(#4881, closes #4367, @shonfeder)subdir
stanza (#4943, fixes #4907, @rgrinberg)%{toolchain}
expansion variable (#4899, fixes #3949, @rgrinberg)dune top
or dune utop
) (#4882, fixes #4872, @Gopiancode)opam
META file requires entry for private libs (#4841, fixes #4839, @toots)dune exec
not adding .exe on Windows (#4371, fixes #3322, @MisterDA)$ dune subst
in empty git repositories (#4441, fixes #3619, @rgrinberg)(package pkg)
in dependencies even if pkg
is an installed package (#4170, @bobot)%{version:pkg}
to work for external packages (#4104, @kit-ty-kate)(glob_files_rec <dir>/<glob>)
for globbing files recursively (#4176, @jeremiedimino).mli
files for executables and tests (#3768, fixes #3745, @CraigFe)ocaml
command subgroup for OCaml related commands such as utop
, top
, and merlin
(#3936, @rgrinberg).dune-project
files as dune
files in Emacs (#4222, @shonfeder)dune-project
files (#4239, fixes #4108, @jeremiedimino)dune-project
is not found (fatal in release mode) (#5343, @emillon)$ dune exec
. (#4260, fixes #4243, @rgrinberg)dune ocaml dump-dot-merlin
that prints a mix of all the merlin configuration of a directory (defaulting to the current directory) in the Merlin configuration syntax. (#4250, @voodoos)ocamlfind
to determine the library search path or library installation directory. This makes the behavior of Dune simpler and more reproducible (#4281, @jeremiedimino)external-lib-deps
command. This command was only approximative and the cost of maintenance was getting too high. We removed it to make room for new more important features (#4298, @jeremiedimino)subdir
is an absolute path (#4366, @anmonteiro)Changed the implementation of actions attached to aliases, as in (rule (alias runtest) (action (run ./test)))
. A visible result for users is that such actions are now memoized for longer. For instance:
$ echo '(rule (alias runtest) (action (echo "X=%{env:X=0}\n")))` > dune
$ X=1 dune runtest
X=1
$ X=2 dune runtest
X=2
$ X=1 dune runtest
Previously, Dune would have re-executed the action again at the last line. Now it remembers the result of the first execution.
--action-<outputs>-on-success ...
(where <outputs>
is stdout
or stderr
) to control how Dune should handle stdout
and stderr
of actions when they succeed. It is now possible to ask Dune to ignore the stdout
of actions when they succeed or to request that the stderr
of actions must be empty. It is also possible to set these options in the config
and/or dune-workspace
files with (action_<outputs>_on_success ...)
. This feature allows you to reduce the noise of large builds (#4422, #4515, @jeremiedimino)@all
alias no longer depends directly on copies of files from the source directory (#4461, @nojb)BUILD_PATH_PREFIX_MAP
to rewrite the root of the build dir (or sandbox) to /workspace_root
(#4466, @jeremiedimino)chdir
s into. (#4509, @aalekseyev)dune compute
. It was broken and unused (#4540, @jeremiedimino)--trace-file
) (#4517, @rgrinberg)live_words
and free_words
in trace file. This allows using Gc.quick_stat
which does not scan the heap. (#4643, @emillon)INSIDE_EMACS
in order to improve reproducibility (#4680, @jeremiedimino)root_module
when used in public libraries (#4685, fixes #4684, @rgrinberg, @CraigFe)root_module
when used with preprocessing (#4683, fixes #4682, @rgrinberg, @CraigFe)dune printenv
(#4767, @ejgallego)deps
field and the possibility to statically link libraries
in the test executable. (#3956, #5391, fixes #3955)dune subst
by adding a new (subst <disable|enable>)
stanza to the dune-project
file. (#4864, @kit-ty-kate)dune
discovers the root of the workspace. It now stops at the first dune-workspace
file it encounters, and fails if it finds neither a dune-workspace
nor a dune-project
file (#4921, fixes #4459, @jeremiedimino)(empty_module_interface_if_absent)
in executable and library stanzas. (#4955, @nojb)%{bin-available:...}
(#4995, @jeremiedimino)git
or hg
in a sandboxed action, such as a cram test cannot escape the sandbox and pick up some random git or mercurial repository on the file system (#4996, @jeremiedimino)%{read:...}
in more places such as (enabled_if ...)
(#4994, @jeremiedimino)expand_aliases_in_sandbox
(#5003, @jeremiedimino)(using directory-targets 0.1)
in dune-project
.promote-into
, promote-until-clean
and promote-until-clean-into
syntax (#5091, Andrey Mokhov).bigarray
library in OCaml >= 5.0 (#5421, @nojb)subst --root
in Opam files (#4806, @MisterDA)ocamldoc
library when ocamlfind
is not installed. (#4811, fixes #4809, @nojb)(enabled_if ...)
for installed libraries (#4824, fixes #4821, @dra27)--promote-install-files=false
(#4860, @bobot)(enabled_if ...)
to (mdx ...)
(#4434, @emillon)locks
with the cram tests stanza (#4397, @voodoos)(package ...)
to (mdx ...)
(#4691, fixes #3756, @emillon)coq.kernel
library to coq-core.kernel
in Coq 8.14 (#4713, @proux01)(include_subdirs unqualified)
on Windows (#4745, @nojb)(include_subdirs qualified)
(#4753, @ejgallego)doc
and etc
sections. We add new options --docdir
and --etcdir
to both Dune's configure and dune install
command. (#4744, fixes #4723, @ejgallego, thanks to @JasonGross for reporting this issue)(env ... (coq (flags ...)))
declarations appearing in dune
files (#4749, fixes #4566, @ejgallego @rgrinberg)(lang coq (>= 0.3))
due to the rework of the Coq "native" compilation system (#4760, @ejgallego)-p
takes now precedence on environment variable DUNE_PROFILE
(#4730, #4774, @bobot, reported by @dra27 #4632).install
file is now produced by a local dune install
during the build phase (#4730, #4645, @bobot, reported by @kit-ty-kate #4198).cmxs
(#4149, fixes #4148, @bobot)compiler-libs.toplevel
is present (@jeremiedimino, #4249)patdiff
show refined diffs (#4257, fixes #4254, @hakuch)Sys.getcwd
(observed under emacs
). (#3966, @nojb).(using coq 0.3)
does require Coq 8.10 at least (#4224, fixes #4142, @ejgallego)compiler-libs.native-toplevel
(#4175, @altgr)chmod
on symbolic links (fixes #4195, @dannywillems)dune
communicate the location of the standard library directory to merlin
(#4211, fixes #4188, @nojb)Unix.utimes
(OCaml PR#8857) in Path.touch
on Windows. This fixes dune cache in direct mode on Windows. (#4223, @dra27)dune ocaml-merlin
is now able to provide configuration for source files in the _build
directory. (#4274, @voodoos)<= 2.7
. (#4261, @voodoos, @aalekseyev)ppx.exe
being compiled for the wrong target when cross-compiling (#3751, fixes #3698, @toots)dune top
correctly escapes the generated toplevel directives, and make it easier for dune top
to locate C stubs associated to concerned libraries. (#4242, fixes #4231, @nojb)dune ocaml-merlin
(#4127, fixes #4125, @voodoos)dune --version
printing n/a
rather than the versiondune rules
accepts aliases and other non-path rules (#4063, @mrmr1993)(diff reference test_result)
now accept reference
to be absent and in that case consider that the reference is empty. Then running dune promote
will create the reference file. (#3795, @bobot)TMPDIR
(or TEMP
on Windows). (#3691, fixes #3422, @rgrinberg)executable
field to inline_tests
to customize the compilation flags of the test runner executable (#3747, fixes #3679, @lubegasimon)(enabled_if ...)
to (copy_files ...)
(#3765, @nojb){gitlab,bitbucket}
as options for defining project sources with source
stanza (source (<host> user/repo))
in the dune-project
file. (#3813, @rgrinberg)META
and dune-package
files when some targets (byte, native, dynlink) are disabled. Previously, dune would generate all archives for regardless of settings. (#3829, #4041, @rgrinberg)package
field to private libraries. This allows such libraries to be installed and to be usable by other public libraries in the same project (#3655, fixes #1017, @rgrinberg)%{make}
variable on Windows by only checking for a gmake
binary on UNIX-like systems as a unrelated gmake
binary might exist on Windows. (#3853, @kit-ty-kate)$ dune install
modifying the build directory. This made the build directory unusable when $ sudo dune install
modified permissions. (fix #3857, @rgrinberg)@
and @@
syntax) so as to correctly handle relative paths. (#3874, fixes #3850, @nojb)git ls-tree
so unicode files are not quoted, this fixes problems with dune subst
in the presence of unicode files. Fixes #3219 (#3879, @ejgallego)dune subst
now accepts common command-line arguments such as --debug-backtraces
(#3878, @ejgallego)dune describe
now also includes information about executables in addition to that of libraries. (#3892, #3895, @nojb)(instrumentation (backend <name> <args>))
. (#3906, #3932, @nojb)dune
files to improve readability. (#3928, @nojb)$ git diff
(#3912, @AltGr)(root_module ..)
field to libraries & executables. This makes it possible to use library dependencies shadowed by local modules (#3825, @rgrinberg)(formatting ...)
field in (env ...)
stanza to set per-directory formatting specification. (#3942, @nojb)coq.theory
, :standard
for the flags
field now uses the flags set in env
profile flags (#3931 , @ejgallego @rgrinberg)-q
flag to :standard
coqc
flags , fixes #3924, (#3931 , @ejgallego)SUFFIX
directive in .merlin
files for each dialect with no preprocessing, to let merlin know of additional file extensions (#3977, @vouillon).merlin
files. Write per-stanza Merlin configurations in binary form. Add a new subcommand dune ocaml-merlin
that Merlin can use to query the configuration files. The allow_approximate_merlin
option is now useless and deprecated. Dune now conflicts with merlin < 3.4.0
and ocaml-lsp-server < 1.3.0
(#3554, @voodoos)libexec
and libexec-private
variables. In cross-compilation settings, they now point to the file in the host context. (#4058, fixes #4057, @TheLortex)$ dune subst
, use project metadata as a fallback when package metadata is missing. We also generate a warning when (name ..)
is missing in dune-project
files to avoid failures in production builds.-nodynlink
for executables. It was bypassed in most cases and not correct in other cases in particular on arm32. (#4085, fixes #4069, fixes #2527, @emillon)use_standard_c_and_cxx_flags
to dune-project
that 1. disables the unconditional use of the ocamlc_cflags
and ocamlc_cppflags
from ocamlc -config
in C compiler calls, these flags will be present in the :standard
set instead; and 2. enables the detection of the C compiler family and populates the :standard
set of flags with common default values when building CXX stubs. (#3875, #3802, fix #3718 and #3528, @voodoos)#define
. We allow duplicate values in the object file, as long as they are the same after parsing. (#3739, fixes #3736, @rgrinberg).aux
& .glob
targets to coq rules (#3721, fixes #3437, @rgrinberg)dune-package
installation when META templates are present (#3743, fixes #3746, @rgrinberg)$ git diff
(#3750, fixes #3740, @rgrinberg)run.t
file, skip empty directories. These can be left around by git. (#3753, @emillon).mdx
folder for each mdx
stanza to prevent the corresponding actions to be executed as part of the @all
alias (#3659, @NathanReb)env
(#3547 , fixes #3486, @gares)bisect_ppx
, landmarks
, etc, via dune-workspace and/or the command-line. (#3404, #3526 @stephanieyou, @nojb)--debug-artifact-substitution
flag to help debug problem with version not being captured by dune-build-info
(#3589, @jeremiedimino)context_name
variable in the enabled_if
fields of executable(s) and install stanzas. (#3568, fixes #3566, @voodoos)$ dune utop
no longer tries to load optional libraries that are unavailable (#3612, fixes #3188, @anuragsoni)inline_tests
to be defined in the same directory (#3621, @rgrinberg)ocamlc
as an intermediary to call C compiler anymore. Configuration flags ocamlc_cflags
and ocamlc_cppflags
are always prepended to the compiler arguments. (#3565, fixes #3346, @voodoos)executables
stanza group (#3644, @rgrinberg){dev}
rather than {pinned}
in the generated .opam
file. (#3647, @kit-ty-kate)dune-project
files. Previously, dune would just insert the stanza name. (#3649, fixes #3624, @rgrinberg)mdx
stanza that depends on unavailable packages. (#3650, @CraigFe)cache-check-probablity
field in dune config files. This field now requires 2.7 as it wasn't usable before this version. (#3652, @edwintorok)"odoc" {with-doc}
to the dependencies in the generated .opam
files. (#3667, @kit-ty-kate)(subdir ...)
stanzas can now appear in dune files used via (include ...)
. (#3676, @nojb)pipe-{stdout,stderr,outputs}
for output redirections (#3392, fixes #428, @NathanReb)-output-complete-exe
until 4.10.1 as it is broken in 4.10.0 (@jeremiedimino, #3187)%{unknown}
) (#3560, @emillon)dune build -p
. (#3561, @emillon)-g
when compiling ppx preprocessors (#3671, @rgrinberg)dune init exec --libs=lib1,lib2
results in an error. (#3444, fix #3443, @bikallem)enabled_ if
field to the install
stanza. Enforce the same variable restrictions for enabled_if
fields in the executable
and install
stanzas than in the library
stanza. When using dune lang < 2.6, the usage of forbidden variables in executables stanzas with only trigger a warning to maintain compatibility. (#3408 and #3496, fixes #3354, @voodoos)dune-project
file (#3434 , fixes #3427, @diml)lib.foo
) that contain .js runtime files. (#3445, @hhugo)(no-infer ...)
action that prevents inference of targets and dependencies in actions. (#3456, fixes #2006, @roddyyaga)diff?
action. (#3457, fixes #2990, @greedy)$ dune print-rules
crashing (#3459, fixes #3440, @rgrinberg)ocaml-merlin
subcommand that can be used by Merlin to get configuration directly from dune instead of using .merlin
files. (#3395, @voodoos)--release
option meaning the same as -p
but without the package filtering. This is useful for custom dune
invocation in opam files where we don't want -p
(#3260, @diml).bc
programs to be built with -custom
by default (#3269, fixes #3262, @diml)(theories ...)
(#2053, @ejgallego, @rgrinberg)dune-project
will trigger a warning for version <=2.4 and an error for versions >2.4 of the dune language. (#3270, fixes #2957, @voodoos)enabled_if
field. Installation will now simply skip such executables instead of raising an error. (#3195, @voodoos)dune upgrade
will now try to upgrade projects using versions <2.0 to version 2.0 of the dune language. (#3174, @voodoos)top
command to integrate dune with any toplevel, not just utop. It is meant to be used with the new #use_output
directive of OCaml 4.11 (#2952, @mbernat, @diml)version
in generated opam
files (#3287, @toots)coq.extraction
stanza. It can be used to extract OCaml sources (#3299, fixes #2178, @rgrinberg)(subdir ..)
stanza to allow evaluating stanzas in sub directories. (#3268, @rgrinberg)%{profile}
variable in the enabled_if
field of the library stanza. (#3344, @mrmr1993)%{ocaml_version}
variable in enabled_if
field of the library stanza. (#3339, @voodoos)mdx
extension and stanza version 0.1 (#3094, @NathanReb)(env ...)
stanza. (#3029, @Julow)dune describe
command to obtain the topology of a dune workspace, for projects such as ROTOR. (#3128, @diml)plugin
linking mode for executables and the (embed_in_plugin_libraries ...)
field. (#3141, @nojb)%{ext_plugin}
variable (#3141, @nojb)supports_shared_libraries
is false (#3225, fixes #3222, @rgrinberg)dune build -w
) (#3220, @snowleopard and @aalekseyev)(lang dune 2.4)
, dune systematically puts all files under _build
in read-only mode instead of only doing it when the shared cache is enabled (#3092, @mefyl)fswatch
on linux (even when inotifywait
is available). (#3162, @aalekseyev)dune init
(#3103, fixes #3046, @shonfeder)dune init exec NAME
now uses the NAME
argument for private modules (#3103, fixes #3088, @shonfeder)(boot)
option to (coq.theories)
to enable bootstrap of Coq's stdlib (#3096, @ejgallego)public_name
field in favour of package
(#2087, @ejgallego)*
will raise an error. The previous behavior was to just do nothing (#3056, fixes #3019, @voodoos)-j1
is set. (#3112, @xclerc, @rgrinberg)enabled_if
fields in executable(s)
stanzas (#3137, fixes #1690 @voodoos)ocamldep
, ocamlmklib
, or ocaml
are absent. Wait for them to be used to fail (#3138, @rgrinberg)strict_package_deps
mode that verifies that dependencies between packages in the workspace are specified correctly. (@rgrinberg, #3117)@all
alias is defined when no dune
file is present in a directory (#2946, fix #2927, @diml)dune test
is now a command alias for dune runtest
. This is to make the CLI less idiosyncratic (#3006, @shonfeder)env
stanza using the menhir_flags
field. (#2960, fix #2924, @bschommer)dune
when dune
is executed inside dune
. This is to make integration tests more reproducible (#3042, @diml)dune subst
now works even without opam files (#2955, fixes #2910, @fangyi-zhou and @diml)./
prefix (#3041, fixes #1094, @voodoos).with-accepted-exit-codes
with chdir
, setenv
, ignore-<outputs>
, with-stdin-from
and with-<outputs>-to
(#3027, fixes #3014, @voodoos)(kind ppx_rewriter)
(#3039, @snowleopard)..opt
extensions. Previously, this detection applied to other binaries as well (@kit-ty-kate, @rgrinberg, #3051).-p
mode. These packages were incorrectly filtered out before. (#3075, @diml)make
now prints a message explaining the main targets available (#3085, fix #3078, @diml)byte_complete
executable mode to build programs as self-contained bytecode programs (#3076, fixes #1519, @diml)Fiber.finalize
function of the concurrency monad of Dune, causing a race condition at the user level (#3009, fix #2958, @diml)META
format. (#2994, @rgrinberg, @anmonteiro).merlin
files when depending on local libraries with more than one source directory. (#2983, @rgrinberg)@runtest
and @cinaps
aliases (#2831, @NathanReb)%{lib-private...}
and %{libexec-private...}
for finding build paths of files in public and private libraries within the same project. (#2901, @snowleopard)--mandir
option to $ dune install
. This option allows to override the installation directory for man pages. (#2915, fixes #2670, @rgrinberg)dune --version
. The bootstrap didn't compute the version correctly. (#2929, fixes #2911, @diml)dune clean
. (#2965, fixes #2964 and #2921, @diml)=
, <>
, ... operators in package dependencies so that we can have things such as (<> :os win32)
(#2965, @diml)dune-package
files. The error is now raised only if the invalid package is treated as a library and used to build something. (#2972, @rgrinberg)install
before installing the new ones. (#2885, fixes #2883, @bschommer)action
field in the alias
stanza is not available starting lang dune 2.0
. The alias
field in the rule
stanza is a replacement. (#2846, fixes 2681, @rgrinberg)alias
and package
fields to the rule
stanza. This is the preferred way of attaching rules to aliases. (#2744, @rgrinberg)(optional)
for executable stanzas (#2463, fixes #2433, @bobot).cm[ox]
files for executables more eagerly. This speeds up builds at the cost of building unnecessary artifacts in some cases. Some of these extra artifacts can fail to built, so this is a breaking change. (#2268, @rgrinberg)<package>.install
files in the source tree unless -p
or --promote-install-files
is passed on the command line (#2329, @diml)(explicit_js_mode)
by default. (#1941, @nojb)--terminal-persistence=clear-on-rebuild
jbuild
files (#2440, @rgrinberg)jbuilder
binary. (#2441, @diml)diff
action will always normalize newlines before diffing. Previously, it would not do this normalization for rules defined in jbuild files. (#2457, @rgrinberg)jbuild
files. (#2458, @rgrinberg)jbuild-ignore
files. They have been replaced by the the dirs
stanza in dune
files. (#2456, @rgrinberg)sandboxing_preference
, the cli argument --sandbox
, and the dep spec sandbox
in dune language. These let the user control the level of sandboxing done by dune per rule and globally. The rule specification takes precedence. The global configuration merely specifies the default. (#2213, @aalekseyev, @diml)(formatting)
stanza in dune-project
(#2347, fixes #2315, @emillon)@install
to @all
. (#2449, fixes #1220, @rgrinberg)@check
rules. (@rgrinberg, #2530)dune-project
file and no longer read VERSION
or similar files (#2541, @diml)(diff? x y)
action, require x
to exist and register a dependency on that file. (#2486, @aalekseyev)(diff? x y)
move the correction file (y
) away from the build directory to promotion staging area. This makes corrections work with sandboxing and in general reduces build directory pollution. (#2486, @aalekseyev, fixes #2482)c_flags
, c_names
and cxx_names
are now supported in executable
and executables
stanzas. (#2562, @nojb) Note: this feature has been subsequently extended into a separate foreign_stubs
field. The fields c(xx)_names
and c(xx)_flags
are now deleted. (#2659, RFC #2650, @snowleopard)$ dune upgrade
(#2565, @rgrinberg)--disable-promotion
to disable all modification to the source directory. There's also a corresponding DUNE_DISABLE_PROMOTION
environment variable. (#2588, fix #2568, @rgrinberg)forbidden_libraries
field to prevent some library from being linked in an executable. This help detecting who accidentally pulls in unix
for instance (#2570, @diml)%{lib:lib:..}
when the library does not exist. (#2597, fix #1541, @rgrinberg)--sections
option to $ dune install
to install subsections of .install files. This is useful for installing only the binaries in a workspace for example. (#2609, fixes #2554, @rgrinberg)jbuild
and jbuild-ignore
files (#2607, @diml)dune-action-plugin
library for describing dependencies directly in the executable source. Programs that use this feature can be run by a new action (dynamic-run ocaml-syntax-shims
binary. In order to use future_syntax
, one now need to depend on the ocaml-syntax-shims
package (#2654, @diml)re_export
and will automatically be provided to users of a library (#2605, @rgrinberg)deprecated_library_name
stanza to redirect old names after a library has been renamed (#2528, @diml)preprocessor_deps
field is present but not preprocess
field is. It is a warning with Dune 1.x projects (#2660, @Julow)-output-complete-exe
instead of -custom
when compiling self-contained bytecode executables whenever this options is available (OCaml version >= 4.10) (#2692, @nojb)(with-accepted-exit-codes <pred> <action>)
to specify the set of successful exit codes of <action>
. <pred>
is specified using the predicate language. (#2699, @nojb)pkg-config
(#2716, @AltGr)no_keep_locs
is a no-op for projects that use lang dune
older than 2.0. In projects where the language is at least 2.0
, the field is now forbidden. (#2752, fixes #2747, @rgrinberg)(foreign_library ...)
stanza as well as the (foreign_stubs ...)
and (foreign_archives ...)
fields. (#2659, RFC #2650, @snowleopard)license
, authors
, maintainers
, source
, bug_reports
, homepage
, and documentation
of dune-project
can now be overridden on a per-package basis. (#2774, @nojb)modes
field of executables to (mode exe)
. If one wants to build a bytecode program, it now needs to be explicitly requested via (modes byte exe)
. (#2851, @diml)ccomp_type
as a variable for evaluating enabled_if
. (#2855, @dra27, @rgrinberg)select
. The file names of conditional sources must match the prefix and the extension of the resultant filename. (#2867, @rgrinberg)disable_dynamically_linked_foreign_archives
to the workspace file. If the flag is set to true
then: (i) when installing libraries, we do not install dynamic foreign archives dll*.so
; (ii) when building executables in the byte
mode, we statically link in foreign archives into the runtime system; (iii) we do not generate any dll*.so
rules. (#2864, @snowleopard).opam.template
files to be generated using rules (#2866, @rgrinberg)self_build_stubs_archive
field, replaced by foreign_archives
.data_only_dirs
without including them as dirs
(#2619, fix #2584, @rgrinberg).install
files generated with an external --build-dir
. (#2638, fix #2629, @rgrinberg)-nodynlink
for executables when not necessary. It seems to be breaking things (see #2527, @diml)dune-package
files. Only public names should exist in such files. (#2558, fix #2425, @rgrinberg)(source_tree ...)
in the presence of directories with only sub-directories and no files (#2514, fixes #2499, @diml)dune utop
. Instead, let the default implementation selection do its job. (#2327, fixes #2323, @TheLortex, review by @rgrinberg)Ppx
toplevel module name for ppx rewriters (#2242, @diml)external_variant
stanza. (#2169, fixes #2134, @TheLortex, review by @diml).cc
and .cxx
sources (#2275, @rgrinberg).cc
extension was always ignored before. (#2275, @rgrinberg)$ dune init project
subcommand to create project boilerplate according to a common template. (#2185, fixes #159, @shonfeder)ppx.exe
as compiling host binary. (#2286, fixes #2252, @toots, review by @rgrinberg and @diml)cinaps
extension and stanza for better integration with the cinaps tool tool (#2269, @diml)META
and dune-package
files to the one read from the vcs when no other version is available (#2224, @diml)%{target}
to be used in situations where the context requires at most one word, so %{targets}
can be confusing; stdout redirections and "-o" arguments of various tools are the main use case; also, introduce a separate field target
that must be used instead of targets
in those situations. (#2341, @aalekseyev)executable
stanza (#2379, @diml)%{ignoring_promoted_rules}
that is true
when --ignore-promoted-rules
is passed on the command line and false otherwise (#2382, @diml)future_syntax
where the characters @
and &
were not distinguished in the names of binding operators (let@
was the same as let&
) (#2376, @aalekseyev, @diml)dune
dependencies with the minimum constraint set based on the dune language version specified in the dune-project
file. (2383, @avsm)66
to default set of warnings starting for dune projects with language version >= 1.11
(@rgrinberg, @diml, fixes #2299)--context
argument to dune install/uninstall
(@diml, #2412)inline_tests
field in the env stanza to control inline_tests framework with a variable (#2313, @mlasson, original idea by @diml, review by @rgrinberg).js
for executables in order to explicitly enable Javascript targets, and a switch (explicit_js_mode)
to require this mode in order to declare JS targets corresponding to executables. (#1941, @nojb)install
stanza to simplify implementation and avoid dependency cycles. (#2073, @aalekseyev, @diml)coq.pp
stanza to help with pre-processing of grammar files (#2054, @ejgallego, review by @rgrinberg)(promote (until-clean) (into <dir>))
(#2068, @diml)(promote (only <pred>))
. For instance: (promote (only *.mli))
(#2068, @diml).opam
files. In particular, a package
field has been added to specify package specific information. (#2017, #2091, @avsm, @jonludlam, @rgrinberg)findlib.dynload
. Before, Dune would simply match on the library name. Now, we only match on the findlib package name when the library doesn't come from Dune. Someone writing a library called findlib.dynload
with Dune would have to add (special_builtin_support findlib_dynload)
to trigger the special behavior. (#2115, @diml)future_syntax
preprocessor as ocaml-syntax-shims.exe
(#2125, @rgrinberg)CI
environment variable). Commands for which the invocation might be omitted must output an error prefixed with File
. Add an --always-show-command-line
option to disable this behavior and always show the full command. (#2120, fixes #1733, @rgrinberg)dune-workspace
files, add the ability to choose the host context and to create duplicates of the default context with different settings. (#2098, @TheLortex, review by @diml, @rgrinberg and @aalekseyev)dune subst
(#2135, @diml)-pp
flag in .merlin (#2142, @rgrinberg)dune subst
add a (version ...)
field to the dune-project
file (#2148, @diml)%{os_type}
variable, which is a short-hand for %{ocaml-config:os_type}
(#1764, @diml)enabled_if
fields in library
stanzas, restricted to the %{os_type}
, %{model}
, %{architecture}
, %{system}
variables (#1764, #2164 @diml, @rgrinberg)chdir
on external and source paths. Dune will also fail gracefully if the external or source path does not exist (#2165, fixes #2158, @rgrinberg).cc
extension for C++ sources (#2195, fixes #83, @rgrinberg)ocamlformat
relative to the context root. This improves the locations of errors. (#2196, fixes #1370, @rgrinberg)README
, LICENSE
, CHANGE
, and HISTORY
files. These would be undetected whenever the project was nested in another workspace. (#2194, @rgrinberg).merlin
whenever there's more than one stanza with the same ppx preprocessing specification (#2209 ,fixes #2206, @rgrinberg).merlin
in the presence of the copy_files
stanza and preprocessing specifications of other stanazs. (#2211, fixes #2206, @rgrinberg)refmt
from the context's root directory. This improves error messages in case of syntax errors. (#2223, @rgrinberg)-dump-ast
to the future_syntax
preprocessor. Merlin doesn't seem to like it when binary AST is generated by a -pp
preprocessor. (#2236, @aalekseyev)dune install
will verify that all files mentioned in all .install files exist before trying to install anything. This prevents partial installation of packages (#2230, @rgrinberg).install
files not being generated (#2124, fixes #2123, @rgrinberg)(using library_variants 0.1)
in their dune-project
file if they want to use it before the design is finalized. (#2116, @diml)dune install
would install man pages to incorrect paths when compared to opam-installer
. For example dune now installs (foo.1 as man1/foo.1)
correctly and previously that was installed to man1/man1/foo.1
. (#2105, @aalekseyev)(coqlib ...)
to (coq.theory ...)
, support for coqlib
will be dropped in the 1.0 version of the Coq language (#2055, @ejgallego)findlib.dynload
. Before, Dune would simply match on the library name. Now, we only match on the findlib package name when the library doesn't come from Dune. Someone writing a library called findlib.dynload
with Dune would have to add (special_builton_support findlib_dynload)
to trigger the special behavior. (#2115, @diml).merlin
does not reflect the preprocessing specification. This occurs when multiple stanzas in the same directory use different preprocessing specifications. This warning can now be disabled with allow_approx_merlin
(#1947, fix #1946, @rgrinberg)$ dune init
command. This command is used to create or update project boilerplate. (#1448, fixes #159, @shonfeder).private
directory (#1983, fix #1973 @rgrinberg)dune subst
attempting to substitute on directories. (#2000, fix #1997, @rgrinberg)(binaries ..)
fields in the env
stanza. Previously, parent binaries
fields would be ignored, but instead they should be combined. (#2029, @rgrinberg)c_names
and cxx_names
(#2036, fix #2033, @rgrinberg)index.mld
. Use correct headings for the listing. (#1925, @rgrinberg, @aantron)dune-package
when version is empty string (#1919, fix #1918, @rgrinberg).cxx
extension for C++ stubs (#1831, @rgrinberg)DUNE_WORKSPACE
variable. This variable is equivalent to setting --workspace
in the command line. (#1711, fix #1503, @rgrinberg)c_flags
and cxx_flags
to env profile settings (#1700 and #1800, @gretay-js)dune printenv
output (#1867, fix #1862, @emillon)Add the (promote-into <dir>)
and `(promote-until-clean-into
dune subst
fails (#1898, fix #1897, @rgrinberg)let+
syntax of OCaml 4.08 (#1899, implements #1891, @diml).merlin
files on Windows. \
characters needed to be escaped (#1869, @mlasson)$ dune format-dune-file
fails. (#1915, fix #1914, @rgrinberg)query_expr
and introduced query_expr_err
which is the same but with a better error in case it fails. (#1886, @ejgallego)(menhir (mode promote) ...)
stanzas are ignored when using --ignore-promoted-rules
or -p
(#1917, @diml)META
files containing archives with /
in the filename. For instance, this was causing llvm to be unusable with dune (#1889, fix #1885, @diml)${corrected-suffix}
, ${library-name}
and a few other variables to the list of variables to upgrade. This fixes the support for various framework producing corrections (#1840, #1853, @diml)$ dune subst
failing because the build directory wasn't set. (#1854, fix #1846, @rgrinberg)Pkg_config.query
when a full package expression is used. Add Pkg_config.query_expr
for cases when the full power of pkg-config's querying is needed (#1842, fix #1833, @rgrinberg)jbuilder
binary now emits a warning on every startup and both jbuilder
and dune
emit warnings when encountering jbuild
files (#1752, @diml).cmx
files of private modules (#1676, @bobot)lsof
on macOS to implement --stats
(#1636, fixes #1634, @xclerc)dune-package
files for every package. These files are installed and read instead of META
files whenever they are available (#1329, @rgrinberg)(include_subdirs ..)
(#1624, fix #1626, @nojb, @rgrinberg)modes
field. (#1632, fix #1617, @rgrinberg)dune compute
to call internal memoized functions (#1528, @rudihorn, @diml)--trace-file
option to trace dune internals (#1639, fix #1180, @emillon)--no-print-directory
(borrowed from GNU make) to suppress Entering directory
messages. (#1668, @dra27)--stats
and track fd usage in --trace-file
(#1667, @emillon)js_of_ocaml
binary when the ocamlfind package is not available (#1467, @nojb)seq
package available for OCaml >= 4.07 (#1714, @rgrinberg)Configurator
handle sizeof
(in addition to negative numbers). (#1726, fixes #1723, @Chris00)-short-paths
when calling ocamlc -i
(#1743, fix #1504, @diml)dune upgrade
command for upgrading jbuilder projects to Dune (#1749, @diml)dune-project
file, insert the detected name in it (#1749, @diml)(implicit_transitive_deps <bool>)
mode to dune projects. When this mode is turned off, transitive dependencies are not accessible. Only listed dependencies are directly accessible. (#1734, #430, @rgrinberg, @hnrgrgr)toplevel
stanza. This stanza is used to define toplevels with libraries already preloaded. (#1713, @rgrinberg).merlin
files that account for normal preprocessors defined using a subset of the action
language. (#1768, @rgrinberg)(orig_src_dir <path>)
metadata in dune-package
for dune packages built with --store-orig-source-dir
command line flag (also controlled by DUNE_STORE_ORIG_SOURCE_DIR
env variable). This is later used to generate .merlin
with S
-directives pointed to original source locations and thus allowing merlin to see those. (#1750, @andreypopp)dune promote
when the files to be promoted have been deleted. (#1775, fixes #1772, @diml)staged_pps
(#1779, fixes #1774, @diml)(mode promote)
in the menhir stanza. It was previously causing intermediate mock files to be promoted (#1783, fixes #1781, @diml)which
function to replace the which
command line utility in a cross platform way. (#1773, fixes #1705, @Chris00)$PKG_CONFIG_PATH
on macOS. Previously it was prepending paths and thus $PKG_CONFIG_PATH
set by users could have been overridden by homebrew installed libraries (#1785, @andreypopp)foo.c
and foo.cpp
can no longer exist in the same library. (#1788, @rgrinberg)%{targets}
(or ${@}
in jbuild files) inside preprocessing actions (#1812, fixes #1811, @diml)DUNE_PROFILE
environment variable to easily set the profile. (#1806, @rgrinberg)(no_keep_locs)
field. It was only necessary until virtual libraries were supported (#1822, fix #1816, @diml)unstable-fmt
to format-dune-file
and remove its --inplace
option. (#1821, @emillon).(using fmt 1.1)
will also format dune files (#1821, @emillon)..ocamlformat-ignore
files (#1824, fixes #1793, @emillon)dune external-lib-deps
when preprocessors are not installed (#1607, @diml)dune external-lib-deps --sexp --unstable-by-dir
so that the output can be easily processed by a machine (#1599, @diml)install
stanzas (#1354, @mseri)(dirs :standard \ lib*)
will use all directories except those that start with lib
. (#1517, #1568, @rgrinberg)binaries
field to the (env ..)
stanza. This field sets and overrides binaries for rules defined in a directory. (#1521, @rgrinberg)%{bin:..}
, %{exe:..}
, and other static expansions in the deps
field. (#1155, fix #1531, @rgrinberg)dune
file (#1551, fixes #1549, @diml)--stats
command line option to record resource usage (#1543, @diml)dune build @doc
deleting highlight.pack.js
on rebuilds, after the first build (#1557, @aantron).List.t
is now provided by OCaml (#1561, @ejgallego)_esy
) from the list of watched directories (#1578, @andreypopp)dune external-lib-deps
(#1594, @diml)data_only_dirs
to replace ignored_subdirs
. ignored_subdirs
is deprecated since 1.6. (#1590, @rgrinberg)dune utop <dir>
when invoked from a sub-directory of the project (#1520, fix #1518, @diml)OCAMLPATH
and PATH
(#1436, @rgrinberg)lib.cma.js
target in lib's directory. Put this target in a sub directory instead. (#1435, fix #1302, @rgrinberg).ml
rather than a .ml-gen
extension (#1425, fix #1414, @rgrinberg)bigarray
library in >= 4.07 without ocamlfind and without installing the corresponding otherlib
. (#1455, @nojb)@all
alias to build all targets defined in a directory (#1409, fix #1220, @rgrinberg)@check
alias to build all targets required for type checking and tooling support. (#1447, fix #1220, @rgrinberg)OCAMLFIND_TOOLCHAIN
and add a toolchain
option to contexts in the workspace file. (#1449, fix #1413, @rgrinberg)copy_files
stanza to copy files from a non sub directory with lang set to dune < 1.3 (#1486, fixes #1485, @NathanReb)test
stanza's action
field. Only emits a warning for retro-compatibility (#1474, fixes #1471, @NathanReb)DESTDIR
environment variable (#1475, @emillon)env
stanzas (#1509, fixes #1508, @diml)context_name
expansion variable (#1507, @rgrinberg)%{env:<var>=<default>}
environment variables under setenv
. Also forbid dynamic environment names or values (#1503, @rgrinberg).ocamlc -config
doesn't include standard_runtime
(#1326, @diml)Configurator.V1.C_define.import
handle negative integers (#1334, @Chris00)_build
(#1343, fix #1342, @diml)--set-switch
to opam (#1341, fix #1337, @diml)menhir
stanza (#1373, fix #1372, @diml)(self_build_stubs_archive ...)
and (c_names ...)
or (cxx_names ...)
simultaneously. (#1375, fix #1306, @nojb)staged_pps
(#1384, @charlesetc)enabled_if
in rule
, menhir
, ocamllex
, ocamlyacc
(#1387, @diml)bytes
, result
and uchar
without findlib
installed (#1391, @nojb)%{env:<var>=<default>}
that expands to the environment variable <var>
, or <default>
if not found. Example: %{env:BIN=/usr/bin}
. (#1305, @trefis)env
customization and vendored projects: when a vendored project didn't have its own env
stanza, the env
stanza from the enclosing project was in effect (#1408, @diml)dune.configurator
and base
to be used together (#1291, fix #1167, @diml)dune rules -m
output a valid makefile (#1293, @diml)(targets ..)
field (#1301, #1320, fix #1189, @nojb, @rgrinberg, @diml)_opam
) from the list of watched directories (#1315, @dysinger)findlib.dynload
(#1317, fix #1310, @diml)copy_files
and copy_files#
stanzas that files to be copied should be in a subdirectory of the current directory. (#1323, fix #911, @nojb)dune
Emacs mode with syntax highlighting and indentation. New file dune-flymake
to provide a hook dune-flymake-dune-mode-hook
to enable linting of dune files. (#1265, @Chris00)link_flags
to cc
when compiling with Configurator.V1.c_test
(#1274, @rgrinberg)dune
to fail eagerly when an optional library isn't available (#1281, @diml)copy_files
does not exist. (#1120, fix #1099, @emillon)dune unstable-fmt
to format dune
files. The interface and syntax are still subject to change, so use with caution. (#1130, fix #940, @emillon)dune utop
without a library name (#1154, fix #1149, @emillon)ocamllex
stanza in jbuild files (#1150, @rgrinberg)Flags.write_{sexp,lines}
in configurator by avoiding the use of Stdune.Path
(#1175, fix #1161, @rgrinberg)findlib.dynload
: when linking an executable using findlib.dynload
, automatically record linked in libraries and findlib predicates (#1172, @bobot)(wrapped (transition "..message.."))
as an option that will generate wrapped modules but keep unwrapped modules with a deprecation message to preserve compatibility. (#1188, fix #985, @rgrinberg)staged_pps
(#1218, @diml)(env var)
to add a dependency to an environment variable. (#1186, @emillon)dune build -w
keeps running and restarts the build when something change on the filesystem (#1140, @kodek16)opam config var lib
in the default build context (#1226, @diml)private_modules
field (#1241, fix #427, @rgrinberg)$ dune build dir
as building the default alias in dir
. (#1259, @rgrinberg)dynlink
library available without findlib installed (#1270, fix #1264, @rgrinberg)$ jbuilder --dev
(#1104, fixes #1103, @rgrinberg)--build-dir
is set to an absolute path (#1105, fixes #1101, @rgrinberg)-opaque
wasn't correctly being added to modules without an interface. (#1108, fix #1107, @rgrinberg)name
fields and make sure this validation also applies when the name
is derived from the public_name
. (#1110, fix #1102, @rgrinberg)env
stanza in the workspace file to be ignored when at least one context had (merlin)
(#1114, @diml)--root
is given. Previously, passing in --root
in conjunction with --workspace
or --config
would not work correctly (#997, @rgrinberg)env
stanza is now allowed in toplevel position in the workspace file, or for individual contexts. This feature requires (dune lang 1.1)
(#1038, @rgrinberg)enabled_if
field for aliases and tests. This field controls whether the test will be ran using a boolean expression language. (#819, @rgrinberg)name
, names
fields optional when a public_name
, public_names
field is provided. (#1041, fix #1000, @rgrinberg)X
in --libdir X
as relative to PREFIX
when X
is relative (#1072, fix #1070, @diml)(include_subdirs unqualified)
(#1034, @diml)(staged_pps ...)
to support staged ppx rewriters such as ones using the OCaml typer like ppx_import
(#1080, fix #193, @diml)-opaque
in the dev
profile. This option trades off binary quality for compilation speed when compiling .cmx files. (#1079, fix #1058, @rgrinberg)dune subst
documentation (#1090, @emillon, thanks @trefis for the bug report)%{lib:name:file}
forms (#1022, fixes #1019, @diml).cm*
files recursively (#666, fixes #660, @emillon)jbuilder external-lib-deps
to crash (#723, @diml)-j
now defaults to the number of processing units available rather 4 (#726, @diml)(inline_tests)
in an executable stanza (#748, @diml)ignored_subdirs
stanza to replace jbuild-ignore
files (#767, @diml)--build-dir
flag or DUNE_BUILD_DIR
environment variable (#846, fix #291, @diml @rgrinberg)#| ... |#)
) and sexp (#;
) comments. These were very rarely used and complicate the language (#837, @diml)dune
file (#576, @diml)Marshal
to store digest and incremental databases. This improves the speed of 0 rebuilds. (#817, @diml)findlib.conf
for cross compilation contexts. (#733, @rgrinberg)link_deps
field to executables, to specify link-time dependencies like version scripts. (#879, fix #852, @emillon)files_recursively_in
to source_tree
to make it clearer it doesn't include generated files (#899, fix #843, @diml)menhir
stanza as an extension with its own version (#901, @diml)(pps ...)
. Now instead of (pps (ppx1 -arg1 ppx2 (-foo x)))
one should write (pps ppx1 -arg ppx2 -- -foo x)
which looks nicer (#910, @diml)(diff a b)
ignore trailing cr on Windows and add (cmp a b)
for comparing binary files (#904, fix #844, @diml)dev
the default build profile (#920, @diml)dune-workspace
and ~/.config/dune/config
files (#932, @diml)@@alias
(#926, @diml)default
alias that defaults to (alias_rec install)
when not defined by the user and make @@default
be the default target (#926, @diml)#require
in dune
files in OCaml syntax (#938, @diml)%{profile}
variable. (#938, @rgrinberg)lib_root
and libexec_root
install sections (#947, @diml)path:file
to dep:file
(#944, @emillon)path-no-dep:file
(#948, @emillon)dune subst
for dune projects (#960, @diml)lib_root
and libexec_root
sections to install stanzas (#947, @diml)Configurator.V1.Flags
module that improves the flag reading/writing API (#840, @avsm)tests
stanza that simplified defining regular and expect tests (#822, @rgrinberg)subst
subcommand to lookup the project name from the dune-project
whenever it's available. (#960, @diml)subst
subcommand no longer looks up the root workspace. Previously this detection would break the command whenever -p
wasn't passed. (#960, @diml)# DUNE_GEN
in META template files. This is done for consistency with # JBUILDER_GEN
. (#958, @rgrinberg)Rename the following variables in dune files:
SCOPE_ROOT
to project_root
@
to targets
^
to deps
<
was renamed in this PR and latter deleted in favor or named dependencies. (#957, @rgrinberg)ROOT
to workspace_root
in dune files (#993, @diml)(deps (:x a b) (:y (glob_files *.c*)))
. This replaces the use for ${<}
in dune files. (#950, @diml, @rgrinberg)(package ..)
dependencies (#988, @diml)documentation
stanza. This stanza allows one to attach .mld files to opam packages. (#570 @rgrinberg)(action ..)
) in the context's environment. (#623 @rgrinberg)(universe)
special dependency to specify that an action depend on everything in the universe. Jbuilder cannot cache the result of an action that depend on the universe (#603, fixes #255 @diml)(package <package>)
dependency specification to indicate dependency on a whole package. Rules depending on whole package will be executed in an environment similar to the one we get once the package is installed (#624, @rgrinberg and @diml)-runtime-variant _pic
on Windows (#635, fixes #573 @diml)-I
) flags being passed to odoc. These flags should be directories that include .odoc files, rather than the include flags of the libraries. (#652 fixes #651 @rgrinberg)-ppx
flags in some cases (#658 fixes #657 @diml)external-lib-deps
was returning too little dependencies (#667, fixes #644 @diml)OCAMLPATH
environment variable when not relying on ocamlfind
(#642 @diml)allow_overlapping_dependencies
in the jbuild file (#587, fixes #562)ext_obj
, ext_asm
, ext_lib
, ext_dll
and ext_exe
as well as ${ocaml-config:XXX}
for most variables in the output of ocamlc -config
(#590)ppx_inline_test
, ppx_expect
or qtest
(#547)best
mode which is native with fallback to byte-code when native compilation is not available (#23)ppx.driver
, inline_tests
and inline_tests.backend
(#588)library
/executables
stanza. Now it is called once per file (#486)-I <stdlib-dir>
to the compiler. It is useless and it causes problems in some cases (#488)-j N
) from the configuration file (#491)external-lib-deps
introduced in 1.0+beta17 (#512, fixes #485)@doc
alias will now build only documentation for public libraries. A new @doc-private
alias has been added to build documentation for private libraries.jbuilder build @lint
in Base for instance (#516)num
is an external package in OCaml >= 4.06.0 (#358)jbuilder exec
will now rebuild the executable before running it if necessary. This can be turned off by passing --no-build
(#345)jbuilder utop
to work in any working directory (#339)S .
to .merlin by default (#284)jbuilder exec
to make it possible to execute non public executables. jbuilder exec path/bin
will execute bin
inside default (or specified) context relative to path
. jbuilder exec /path
will execute /path
as absolute path but with the context's environment set appropriately. Lastly, jbuilder exec
will change the root as to which paths are relative using the -root
option. (#286)jbuilder rules
printing rules when some binaries are missing (#292)${!...}
: the split behavior is now a property of the variable. For instance ${CC}
, ${^}
, ${read-lines:...}
all expand to lists unless used in the middle of a longer atom (#336)(include ...)
stanza allowing one to include another non-generated jbuild file in the current file (#402)(diff <file1> <file2>)
action allowing to diff files and promote generated files in case of mismatch (#402, #421)jbuilder promote
and --auto-promote
to promote files (#402, #421)(glob_files ...)
with a directory that doesn't exist (#413, Fix #412)[@@deriving_inline]
in .ml/.mli files. This require ppx_driver >= v0.10.2
to work properly (#415)META.pkg.from-jbuilder
file. Now the only way to customize the generated META
file is through META.pkg.template
. This feature was unused and was making the code complicated (#370)Add a mode field to rule
stanzas:
(mode standard)
is the default(mode fallback)
replaces (fallback)
(mode promote)
means that targets are copied to the source tree after the rule has completed(mode promote-until-clean)
is the same as (mode promote)
except that jbuilder clean
deletes the files copied to the source tree. (#437)--ignore-promoted-rules
to make jbuilder ignore rules with (mode promote)
. -p
implies --ignore-promoted-rules
(#437)boot.exe
as a bytecode program. It makes the build of jbuilder faster and fix the build on some architectures (#463, fixes #446)install
or runtest
. All aliases are non-recursive. However, when requesting an alias from the command line, this request the construction of the alias in the specified directory and all its children recursively. This allows users to get the same behavior as previous recursive aliases for their own aliases, such as example
. Inside jbuild files, one can use (deps (... (alias_rec xxx) ...))
to get the same behavior as on the command line. (#268).
in the generated documentation index (#280).ARCH_SIXTYFOUR
detection for OCaml 4.06.0 (#303)jbuild-workspace
file is now interpreted the same as one containing just (context default)
Entering directory '...'
when the workspace root is not the current directory. This allows Emacs and Vim to know where relative filenames should be interpreted from. (fixes #138, @jeremiedimino)menhir
stanzas: menhir
stanzas with a merge_into
field that were in jbuild
files in sub-directories where incorrectly interpreted (#264)${..}
syntax in the include
stanza. (#231)FLG
lines in generated .merlin
files (#200, @mseri)-I <path> file.cmxa
, now it does -I <path> <path>/file.cmxa
. Fixes #118 and #177.merlin
files. Merlin <3.0.0 used to run ppx commands from the directory where the .merlin
was present but this is no longer the casejbuilder install
in contexts other than opam; if ocamlfind
is present in the PATH
and the user didn't pass --prefix
or --libdir
explicitly, use the output of ocamlfind printconf destdir
as destination directory for library files (#179, @bobot)(:include ...)
forms in all *flags
fields (#153, @dra27)utop
subcommand. Running jbuilder utop
in a directory builds and executes a custom utop
toplevel with all libraries defined in the current directory (#183, @rgrinberg)per_file
anymore in preprocess
field. per_file
was renamed per_module
and it is planned to reuse per_file
for another purpose(fallback)
to custom rules to keep the current behavior (#218)deprecated-ppx-method
findlib package for ppx rewriters (#222, fixes #163)<package>.opam
file for a given package${SCOPE_ROOT}
pointing to the root of the current scope, to fix some misuses of ${ROOT}
META.pkg.template
with a custom rule (#190)clean
subcommand (@rdavison, #89)jbuilder exec
on Windows--no-buffer
option to see the output of commands in real-time. Should only be used with -j1
per_file
in preprocessing specifications and rename it per_module
copy-and-add-line-directive
and rename it copy#
unix
is supported since a few released packages are using it. The OCaml syntax might eventually be replaced by a simpler mechanism that plays better with incremental builds${^}
now includes files matches by (glob_files ...)
or (file_recursively_in ...)
(rule (copy a b))
(run ...)
, ${xxx}
forms that expands to lists can now be split across multiple arguments by adding a !
: ${!xxx}
. For instance: (run foo ${!^})
Add support for using the contents of a file inside an action:
${read:<file>}
${read-lines:<file>}
${read-strings:<file>}
(same as read-lines
but lines are escaped using OCaml convention)-lfoo
is transparently replaced by foo.lib
(@dra27, #127).exe
when installing executables on Windows (#123)(run <prog> ...)
now resolves <prog>
locally if possible. i.e. (run ${bin:prog} ...)
and (run prog ...)
behave the same. This seems like the right defaultjbuild rules
would crash instead of reporting a proper build error(package ...)
field for aliases, so that one can restrict tests to a specific package (@rgrinberg, #64)Fix a couple of bugs on Windows:
Several improvements/fixes regarding the handling of findlib packages:
jbuilder installed-libraries --not-available
explaining why some libraries are not availablejbuilder rules
subcommand to dump internal compilation rules, mostly for debugging purposesIgnore all directories starting with a .
or _
. This seems to be a common pattern:
.git
, .hg
, _darcs
_build
_opam
(opam 2 local switches)jbuilder external-lib-deps
(#72)ocamllex
and ocamlyacc
to be at the same location as ocamlc
(#75)${lib-available:<library-name>}
which expands to true
or false
with the same semantic as literals in (select ...)
stanzaslibrary-name
cookie--verbose
argument (@stedolan, #40)@install
the default target when no targets are specified (@stedolan, #47)(no_dynlink)
(#55)jbuilder exec foo
. Before, even if foo
was to be installed, the freshly built version wasn't selectedexists_if ...
lines in META files. These are useless sine the META files are auto-generated(executable ...)
stanza for single executables (#33)(package ...)
and (public_name <name>)/(public_names (<names))
to executable/executables
stanzas to make it easier to install executables (#33)ppx_driver.runner
(#37). These problem should go away soon when we start using --cookie
ocamlfind
is present in the PATH
, do not attempt to call opam config var lib
ocamlfind
or opam
Jbuild_plugin.V*.send
ocamlfind printconf path
jbuilder external-lib-deps --missing
Added a few forms to the DSL:
with-{stderr,outputs}-to
ignore-{stdout,stderr,outputs}
${null}
which expands to /dev/null
on Unix and NUL
on Windowsodoc
for wrapped libraries(files_recursively_in ...)
jbuilder
would crash when there was no <package>.opam
file.merlin
files where not generated at the root of the workspace (#20)(glob_files ...)
would cause other dependencies to be ignoredppx(...)
line in META
files(optional)
when a ppx runtime dependency is not available (#24)Simplified the rules for finding the root of the workspace as the old ones were often picking up the home directory. New rules are:
jbuild-workspace
file in parent directoriesjbuild-workspace*
file in parent directories${ROOT}
in actionsquick-start.org
in the documentation directorybuild
command (#5, @rgrinberg)Added a few commands:
runtest
install
uninstall
installed-libraries
exec
: execute a command in an environment similar to what you would get after jbuilder install
build-package
command in favor of a --only-packages
option that is common to all commands.merlin
files (#2, @rdavison)-j N
with N > 1
_build/log
(jbuilder_version 1)
in a jbuild
file at the root of your project to ensure forward compatibilityppx_driver
to ocaml-migrate-parsetree.driver
. In order to use ppx rewriters with Jbuilder, they need to use ocaml-migrate-parsetree.driver
jbuild-workspace
fileextended the action language to support common actions without using a shell:
(with-stdout-to <file> <DSL>)
(copy <src> <dst>)
(bash "...")
or (system "...")
META
filesfoo
only in the sub-tree starting from where foo.opam
livesFirst release