Skip to content

Commit 1ca0ef8

Browse files
committed
Restrict (executables_implicit_empty_intf) to Dune lang 2.9
Signed-off-by: Craig Ferguson <me@craigfe.io>
1 parent 88d5c07 commit 1ca0ef8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

doc/dune-files.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ By default, executables defined via ``(executables(s) ...)`` or ``(test(s)
102102
common to give them empty interface files to strengthen the compiler's ability
103103
to detect unused values in these modules.
104104

105-
Starting from dune 2.8, an option is available to automatically generate empty
105+
Starting from dune 2.9, an option is available to automatically generate empty
106106
interface files for executables and tests that don't already have them:
107107

108108
.. code:: scheme
@@ -651,7 +651,7 @@ binary at the same place as where ``ocamlc`` was found.
651651
Executables can also be linked as object or shared object files. See
652652
`linking modes`_ for more information.
653653

654-
Starting from dune 2.8, it's possible to automatically generate empty interface
654+
Starting from dune 2.9, it's possible to automatically generate empty interface
655655
files for executables. See `executables_implicit_empty_intf`_.
656656

657657
``<optional-fields>`` are:
@@ -1365,7 +1365,7 @@ running dune runtest you can use the following stanza:
13651365
(libraries alcotest mylib)
13661366
(action (run %{test} -e)))
13671367
1368-
Starting from dune 2.8, it's possible to automatically generate empty interface
1368+
Starting from dune 2.9, it's possible to automatically generate empty interface
13691369
files for test executables. See `executables_implicit_empty_intf`_.
13701370

13711371
test

src/dune_engine/dune_project.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ let parse ~dir ~lang ~opam_packages ~file ~dir_status =
707707
loc lang.syntax (2, 8) ~what:"This field"
708708
and+ executables_implicit_empty_intf =
709709
field_o_b "executables_implicit_empty_intf"
710-
~check:(Dune_lang.Syntax.since Stanza.syntax (2, 8))
710+
~check:(Dune_lang.Syntax.since Stanza.syntax (2, 9))
711711
and+ () = Dune_lang.Versioned_file.no_more_lang
712712
and+ generate_opam_files =
713713
field_o_b "generate_opam_files"

test/blackbox-tests/test-cases/executables-implicit-empty-intf.t/run.t

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Executables with no corresponding `.mli` file will have one generated for them
22
by Dune:
33

44
$ cat >dune-project <<EOF
5-
> (lang dune 2.8)
5+
> (lang dune 2.9)
66
> (executables_implicit_empty_intf true)
77
> EOF
88

@@ -39,7 +39,7 @@ If an executable already has an interface, it is preserved:
3939
Generation of empty `.mli` files is disabled by default prior to lang 3.0:
4040

4141
$ dune clean
42-
$ echo >dune-project "(lang dune 2.8)"
42+
$ echo >dune-project "(lang dune 2.9)"
4343
$ dune build ./bin/executable.exe
4444
$ dune runtest
4545
$ test ! -f _build/default/bin/executable.mli

0 commit comments

Comments
 (0)