Skip to content
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

Missing -I when building against a virtual library from another project #3636

Closed
rlepigre opened this issue Jul 16, 2020 · 18 comments · Fixed by #5150
Closed

Missing -I when building against a virtual library from another project #3636

rlepigre opened this issue Jul 16, 2020 · 18 comments · Fixed by #5150
Assignees
Milestone

Comments

@rlepigre
Copy link
Contributor

I am having a weird issue with a library containing a bunch of modules and one virtual_modules.
(The problem arises both with dune.2.0.1 and dune 2.6.1, I have not tried other versions.)

First, when the library is installed, no .cma or .cmxa files are installed by dune, and the META file has empty fields:

package "my_lib" (
  ...
  archive(byte) = ""
  archive(native) = ""
  plugin(byte) = ""
  plugin(native) = ""
)

Is that expected behaviour? I could find no clear explanation about that in the doc.

Second, and that is really the origin of my problem, when I try to compile another project depending on the virtual library, no corresponding -I option is generated. I am currently working around that using:

 (flags (:standard -I +../my_package/my_lib)) ; FIXME crazy hack.

with which everything works as expected. However, I feel like I should not have to do that, and my fix is really fragile due to the explicit path.

Unfortunately I cannot give access to the sources of the project (it is not currently open-source, and I am not sure how much information I can give about it). However, here is what the dune file of the library looks like (it is used by other libraries and executables of the same project):

; The library containing a virtual module
(library
 (name my_lib)
 (public_name my_package.my_lib)
 (synopsis "...")
 (modules :standard)
 (virtual_modules virtual)
 (libraries ...))

And here is what the dune file of the (independent) project trying to use the library looks like:

; The executable trying to use the library with the virtual module
(executable
 (name main)
 (public_name my_program)
 (package my_other_package)
 (flags (:standard -w -27 -I +../my_package/my_lib)) ; FIXME crazy hack.
 (libraries cmdliner str unix ... my_package.my_lib my_package.impl_of_virt))
@ghost
Copy link

ghost commented Jul 21, 2020

For the META file, yes that's expected. It's because at the moment ocamlfind doesn't support virtual libraries. For the -I, that is very suspicious indeed and you are right that it is not something you should do.

What does dune output when you don't add this -I?

@rlepigre
Copy link
Contributor Author

OK, thanks, that makes sense.

The output is the following:

File "my_dir/file.ml", line 1, characters 5-18:
Error: Unbound module My_module
File "my_dir/file.mli", line 3, characters 41-76:
Error: Unbound module My_module

@ghost
Copy link

ghost commented Jul 21, 2020

That's really odd. It looks like a standard use case of virtual libraries. However, it's a bit difficult for us to investigate without a minimal reproduction case. :(

@rlepigre
Copy link
Contributor Author

Yeah, that is annoying. In fact, luckily, I can now produce a reproduction case since a publicly available version of the library we are using has become available today here: https://github.com/rems-project/cerberus. You just need to pin it with:

opam pin add -y cerberus git+https://github.com/rems-project/cerberus.git

(I know for sure this works with OCaml 4.07.1.)

The file buggy.tar.gz contains a minimal example to reproduce the problem, you can comment/uncomment the hackish fix in the dune file.

@ghost
Copy link

ghost commented Jul 23, 2020

Thanks for sending a minimal example. @rgrinberg could you have a look at this?

@rgrinberg rgrinberg self-assigned this Jul 23, 2020
@rgrinberg
Copy link
Member

@rlepigre could you check if it's still an issue in 2.7? I'm unable to reproduce this with the latest version of dune.

@rlepigre
Copy link
Contributor Author

Yes, I can reproduce with dune 2.7 (and the example from the archive linked above).

$> dune --version
2.7.0
$> dune build
File "main.ml", line 1, characters 5-18:
Error: Unbound module Cerb_frontend

What version of OCaml are you using?

@rlepigre
Copy link
Contributor Author

rlepigre commented Aug 31, 2020

Actually I forgot to recompile the library with the new version. I'll do that later and tell you if that does the trick.

Edit: I can still reproduce the bug, even after installing the dependency with dune.

@rgrinberg
Copy link
Member

Could you try out master as well?

@rlepigre
Copy link
Contributor Author

rlepigre commented Sep 1, 2020

Yep, still fails with version 2.7.0-69-g1f3c32801.

Note however that with this version of dune the package I depend on must be fixed slightly, by adding a dependency to the result package in backend/driver/dune. I guess this is due to a bug fix in dune, since my package should never have been able to depend on result without an explicit dependency.

@rgrinberg
Copy link
Member

I see. Could you show the contents of your dune-package file of the cerb package? It should be either in the _build directory or installed in ~/.opam/<switch>/lib/...

@rlepigre
Copy link
Contributor Author

rlepigre commented Sep 2, 2020

Here it is:

(lang dune 2.7)
(name cerberus)
(version da87de0)
(library
 (name cerberus.backend_common)
 (kind normal)
 (synopsis "Cerberus backend utilities")
 (archives
  (byte backend_common/cerb_backend.cma)
  (native backend_common/cerb_backend.cmxa))
 (plugins
  (byte backend_common/cerb_backend.cma)
  (native backend_common/cerb_backend.cmxs))
 (foreign_objects backend_common/cerberus_cstubs.o)
 (foreign_archives backend_common/libcerb_backend_stubs.a)
 (native_archives backend_common/cerb_backend.a)
 (requires
  cerberus.frontend
  cerberus.core_parser
  cerberus.c_parser
  pprint
  cerberus.util
  z3)
 (main_module_name Cerb_backend)
 (modes byte native)
 (modules
  (wrapped
   (main_module_name Cerb_backend)
   (modules
    ((name Auxl) (obj_name cerb_backend__Auxl) (visibility public) (impl))
    ((name Dot) (obj_name cerb_backend__Dot) (visibility public) (impl))
    ((name Exhaustive_driver)
     (obj_name cerb_backend__Exhaustive_driver)
     (visibility public)
     (impl)
     (intf))
    ((name Fs_ocaml)
     (obj_name cerb_backend__Fs_ocaml)
     (visibility public)
     (impl))
    ((name Pipeline)
     (obj_name cerb_backend__Pipeline)
     (visibility public)
     (impl)
     (intf)))
   (alias_module
    (name Cerb_backend)
    (obj_name cerb_backend)
    (visibility public)
    (kind alias)
    (impl))
   (wrapped true))))
(library
 (name cerberus.c_parser)
 (kind normal)
 (synopsis "C parser")
 (archives (byte c_parser/c_parser.cma) (native c_parser/c_parser.cmxa))
 (plugins (byte c_parser/c_parser.cma) (native c_parser/c_parser.cmxs))
 (native_archives c_parser/c_parser.a)
 (requires cerberus.frontend)
 (modes byte native)
 (modules
  (unwrapped
   ((name C_lexer) (obj_name c_lexer) (visibility public) (impl))
   ((name C_parser) (obj_name c_parser) (visibility public) (impl) (intf))
   ((name C_parser_driver)
    (obj_name c_parser_driver)
    (visibility public)
    (impl))
   ((name Lexer_feedback)
    (obj_name lexer_feedback)
    (visibility public)
    (impl)
    (intf))
   ((name Tokens) (obj_name tokens) (visibility public) (impl)))))
(library
 (name cerberus.core_parser)
 (kind normal)
 (synopsis "Core parser")
 (archives
  (byte core_parser/core_parser.cma)
  (native core_parser/core_parser.cmxa))
 (plugins
  (byte core_parser/core_parser.cma)
  (native core_parser/core_parser.cmxs))
 (native_archives core_parser/core_parser.a)
 (requires cerberus.frontend)
 (modes byte native)
 (modules
  (unwrapped
   ((name Core_lexer) (obj_name core_lexer) (visibility public) (impl))
   ((name Core_parser)
    (obj_name core_parser)
    (visibility public)
    (impl)
    (intf))
   ((name Core_parser_driver)
    (obj_name core_parser_driver)
    (visibility public)
    (impl))
   ((name Core_parser_util)
    (obj_name core_parser_util)
    (visibility public)
    (impl)))))
(library
 (name cerberus.frontend)
 (kind normal)
 (virtual)
 (synopsis "Cerberus frontend")
 (native_archives frontend/cerb_frontend.a)
 (requires lem pprint cerberus.util cerberus.sibylfs)
 (main_module_name Cerb_frontend)
 (modes byte native)
 (modules
  (wrapped
   (main_module_name Cerb_frontend)
   (modules
    ((name AilSyntax)
     (obj_name cerb_frontend__AilSyntax)
     (visibility public)
     (impl))
    ((name AilSyntaxAux)
     (obj_name cerb_frontend__AilSyntaxAux)
     (visibility public)
     (impl))
    ((name AilTypesAux)
     (obj_name cerb_frontend__AilTypesAux)
     (visibility public)
     (impl))
    ((name AilTyping)
     (obj_name cerb_frontend__AilTyping)
     (visibility public)
     (impl))
    ((name AilWf) (obj_name cerb_frontend__AilWf) (visibility public) (impl))
    ((name Annot) (obj_name cerb_frontend__Annot) (visibility public) (impl))
    ((name Any) (obj_name cerb_frontend__Any) (visibility public) (impl))
    ((name Ast_core)
     (obj_name cerb_frontend__Ast_core)
     (visibility public)
     (impl))
    ((name Bimap) (obj_name cerb_frontend__Bimap) (visibility public) (impl))
    ((name Boot) (obj_name cerb_frontend__Boot) (visibility public) (impl))
    ((name Boot_printf)
     (obj_name cerb_frontend__Boot_printf)
     (visibility public)
     (impl)
     (intf))
    ((name Builtins)
     (obj_name cerb_frontend__Builtins)
     (visibility public)
     (impl))
    ((name Cabs) (obj_name cerb_frontend__Cabs) (visibility public) (impl))
    ((name Cabs_to_ail)
     (obj_name cerb_frontend__Cabs_to_ail)
     (visibility public)
     (impl))
    ((name Cabs_to_ail_aux)
     (obj_name cerb_frontend__Cabs_to_ail_aux)
     (visibility public)
     (impl))
    ((name Cabs_to_ail_effect)
     (obj_name cerb_frontend__Cabs_to_ail_effect)
     (visibility public)
     (impl))
    ((name Cmm_aux)
     (obj_name cerb_frontend__Cmm_aux)
     (visibility public)
     (impl))
    ((name Cmm_csem)
     (obj_name cerb_frontend__Cmm_csem)
     (visibility public)
     (impl))
    ((name Cmm_op)
     (obj_name cerb_frontend__Cmm_op)
     (visibility public)
     (impl))
    ((name Constraint)
     (obj_name cerb_frontend__Constraint)
     (visibility public)
     (impl))
    ((name Core) (obj_name cerb_frontend__Core) (visibility public) (impl))
    ((name Core_anormalise)
     (obj_name cerb_frontend__Core_anormalise)
     (visibility public)
     (impl))
    ((name Core_aux)
     (obj_name cerb_frontend__Core_aux)
     (visibility public)
     (impl))
    ((name Core_ctype_aux)
     (obj_name cerb_frontend__Core_ctype_aux)
     (visibility public)
     (impl))
    ((name Core_eval)
     (obj_name cerb_frontend__Core_eval)
     (visibility public)
     (impl))
    ((name Core_indet)
     (obj_name cerb_frontend__Core_indet)
     (visibility public)
     (impl))
    ((name Core_linking)
     (obj_name cerb_frontend__Core_linking)
     (visibility public)
     (impl))
    ((name Core_peval)
     (obj_name cerb_frontend__Core_peval)
     (visibility public)
     (impl))
    ((name Core_remove_unused_functions)
     (obj_name cerb_frontend__Core_remove_unused_functions)
     (visibility public)
     (impl))
    ((name Core_rewrite)
     (obj_name cerb_frontend__Core_rewrite)
     (visibility public)
     (impl))
    ((name Core_rewriter)
     (obj_name cerb_frontend__Core_rewriter)
     (visibility public)
     (impl))
    ((name Core_run)
     (obj_name cerb_frontend__Core_run)
     (visibility public)
     (impl))
    ((name Core_run_aux)
     (obj_name cerb_frontend__Core_run_aux)
     (visibility public)
     (impl))
    ((name Core_sequentialise)
     (obj_name cerb_frontend__Core_sequentialise)
     (visibility public)
     (impl))
    ((name Core_typing)
     (obj_name cerb_frontend__Core_typing)
     (visibility public)
     (impl))
    ((name Core_typing_aux)
     (obj_name cerb_frontend__Core_typing_aux)
     (visibility public)
     (impl))
    ((name Core_typing_effect)
     (obj_name cerb_frontend__Core_typing_effect)
     (visibility public)
     (impl))
    ((name Core_unstruct)
     (obj_name cerb_frontend__Core_unstruct)
     (visibility public)
     (impl))
    ((name Ctype) (obj_name cerb_frontend__Ctype) (visibility public) (impl))
    ((name Debug) (obj_name cerb_frontend__Debug) (visibility public) (impl))
    ((name Decode)
     (obj_name cerb_frontend__Decode)
     (visibility public)
     (impl))
    ((name Decode_ocaml)
     (obj_name cerb_frontend__Decode_ocaml)
     (visibility public)
     (impl))
    ((name Defacto_memory)
     (obj_name cerb_frontend__Defacto_memory)
     (visibility public)
     (impl))
    ((name Defacto_memory_aux)
     (obj_name cerb_frontend__Defacto_memory_aux)
     (visibility public)
     (impl))
    ((name Defacto_memory_types)
     (obj_name cerb_frontend__Defacto_memory_types)
     (visibility public)
     (impl))
    ((name Dlist) (obj_name cerb_frontend__Dlist) (visibility public) (impl))
    ((name Driver)
     (obj_name cerb_frontend__Driver)
     (visibility public)
     (impl))
    ((name Enum) (obj_name cerb_frontend__Enum) (visibility public) (impl))
    ((name ErrorMonad)
     (obj_name cerb_frontend__ErrorMonad)
     (visibility public)
     (impl))
    ((name Errors)
     (obj_name cerb_frontend__Errors)
     (visibility public)
     (impl))
    ((name Exception)
     (obj_name cerb_frontend__Exception)
     (visibility public)
     (impl))
    ((name Exception_undefined)
     (obj_name cerb_frontend__Exception_undefined)
     (visibility public)
     (impl))
    ((name Float) (obj_name cerb_frontend__Float) (visibility public) (impl))
    ((name Fs) (obj_name cerb_frontend__Fs) (visibility public) (impl))
    ((name GenTypes)
     (obj_name cerb_frontend__GenTypes)
     (visibility public)
     (impl))
    ((name GenTypesAux)
     (obj_name cerb_frontend__GenTypesAux)
     (visibility public)
     (impl))
    ((name GenTyping)
     (obj_name cerb_frontend__GenTyping)
     (visibility public)
     (impl))
    ((name Global)
     (obj_name cerb_frontend__Global)
     (visibility public)
     (impl))
    ((name Impl_mem)
     (obj_name cerb_frontend__Impl_mem)
     (visibility public)
     (kind virtual)
     (intf))
    ((name Implementation)
     (obj_name cerb_frontend__Implementation)
     (visibility public)
     (impl))
    ((name IntegerImpl)
     (obj_name cerb_frontend__IntegerImpl)
     (visibility public)
     (impl))
    ((name Linux) (obj_name cerb_frontend__Linux) (visibility public) (impl))
    ((name Loc) (obj_name cerb_frontend__Loc) (visibility public) (impl))
    ((name Mem) (obj_name cerb_frontend__Mem) (visibility public) (impl))
    ((name Mem_aux)
     (obj_name cerb_frontend__Mem_aux)
     (visibility public)
     (impl))
    ((name Mem_common)
     (obj_name cerb_frontend__Mem_common)
     (visibility public)
     (impl))
    ((name Memory_model)
     (obj_name cerb_frontend__Memory_model)
     (visibility public)
     (impl))
    ((name Monadic_parsing)
     (obj_name cerb_frontend__Monadic_parsing)
     (visibility public)
     (impl))
    ((name Mucore)
     (obj_name cerb_frontend__Mucore)
     (visibility public)
     (impl))
    ((name Mucore_to_core)
     (obj_name cerb_frontend__Mucore_to_core)
     (visibility public)
     (impl))
    ((name Multiset)
     (obj_name cerb_frontend__Multiset)
     (visibility public)
     (impl))
    ((name Nondeterminism)
     (obj_name cerb_frontend__Nondeterminism)
     (visibility public)
     (impl))
    ((name Ocaml_gcc_builtins)
     (obj_name cerb_frontend__Ocaml_gcc_builtins)
     (visibility public)
     (impl))
    ((name Ocaml_implementation)
     (obj_name cerb_frontend__Ocaml_implementation)
     (visibility public)
     (impl))
    ((name Output)
     (obj_name cerb_frontend__Output)
     (visibility public)
     (impl))
    ((name Pp) (obj_name cerb_frontend__Pp) (visibility public) (impl))
    ((name Pp_ail)
     (obj_name cerb_frontend__Pp_ail)
     (visibility public)
     (impl)
     (intf))
    ((name Pp_ail_ast)
     (obj_name cerb_frontend__Pp_ail_ast)
     (visibility public)
     (impl))
    ((name Pp_ail_raw)
     (obj_name cerb_frontend__Pp_ail_raw)
     (visibility public)
     (impl))
    ((name Pp_ast)
     (obj_name cerb_frontend__Pp_ast)
     (visibility public)
     (impl))
    ((name Pp_cabs)
     (obj_name cerb_frontend__Pp_cabs)
     (visibility public)
     (impl)
     (intf))
    ((name Pp_core)
     (obj_name cerb_frontend__Pp_core)
     (visibility public)
     (impl)
     (intf))
    ((name Pp_core_ctype)
     (obj_name cerb_frontend__Pp_core_ctype)
     (visibility public)
     (impl))
    ((name Pp_defacto_memory)
     (obj_name cerb_frontend__Pp_defacto_memory)
     (visibility public)
     (impl)
     (intf))
    ((name Pp_errors)
     (obj_name cerb_frontend__Pp_errors)
     (visibility public)
     (impl))
    ((name Pp_mem)
     (obj_name cerb_frontend__Pp_mem)
     (visibility public)
     (impl)
     (intf))
    ((name Pp_mucore)
     (obj_name cerb_frontend__Pp_mucore)
     (visibility public)
     (impl))
    ((name Pp_run)
     (obj_name cerb_frontend__Pp_run)
     (visibility public)
     (impl))
    ((name Pp_std)
     (obj_name cerb_frontend__Pp_std)
     (visibility public)
     (impl))
    ((name Pp_symbol)
     (obj_name cerb_frontend__Pp_symbol)
     (visibility public)
     (impl)
     (intf))
    ((name Pp_trace)
     (obj_name cerb_frontend__Pp_trace)
     (visibility public)
     (impl))
    ((name Pp_utils)
     (obj_name cerb_frontend__Pp_utils)
     (visibility public)
     (impl))
    ((name Product)
     (obj_name cerb_frontend__Product)
     (visibility public)
     (impl))
    ((name Range) (obj_name cerb_frontend__Range) (visibility public) (impl))
    ((name Remove_unspecs)
     (obj_name cerb_frontend__Remove_unspecs)
     (visibility public)
     (impl))
    ((name Scope_table)
     (obj_name cerb_frontend__Scope_table)
     (visibility public)
     (impl))
    ((name Smt2) (obj_name cerb_frontend__Smt2) (visibility public) (impl))
    ((name State) (obj_name cerb_frontend__State) (visibility public) (impl))
    ((name State_exception)
     (obj_name cerb_frontend__State_exception)
     (visibility public)
     (impl))
    ((name State_exception_undefined)
     (obj_name cerb_frontend__State_exception_undefined)
     (visibility public)
     (impl))
    ((name Std) (obj_name cerb_frontend__Std) (visibility public) (impl))
    ((name String_ail)
     (obj_name cerb_frontend__String_ail)
     (visibility public)
     (impl))
    ((name String_cabs)
     (obj_name cerb_frontend__String_cabs)
     (visibility public)
     (impl))
    ((name String_core)
     (obj_name cerb_frontend__String_core)
     (visibility public)
     (impl))
    ((name String_core_ctype)
     (obj_name cerb_frontend__String_core_ctype)
     (visibility public)
     (impl))
    ((name String_core_run)
     (obj_name cerb_frontend__String_core_run)
     (visibility public)
     (impl))
    ((name String_defacto_memory)
     (obj_name cerb_frontend__String_defacto_memory)
     (visibility public)
     (impl))
    ((name String_mem)
     (obj_name cerb_frontend__String_mem)
     (visibility public)
     (impl))
    ((name String_nat_big_num)
     (obj_name cerb_frontend__String_nat_big_num)
     (visibility public)
     (impl)
     (intf))
    ((name String_symbol)
     (obj_name cerb_frontend__String_symbol)
     (visibility public)
     (impl))
    ((name Switches)
     (obj_name cerb_frontend__Switches)
     (visibility public)
     (impl)
     (intf))
    ((name Symbol)
     (obj_name cerb_frontend__Symbol)
     (visibility public)
     (impl))
    ((name Tags)
     (obj_name cerb_frontend__Tags)
     (visibility public)
     (impl)
     (intf))
    ((name Trace_event)
     (obj_name cerb_frontend__Trace_event)
     (visibility public)
     (impl))
    ((name Translation)
     (obj_name cerb_frontend__Translation)
     (visibility public)
     (impl))
    ((name Translation_aux)
     (obj_name cerb_frontend__Translation_aux)
     (visibility public)
     (impl))
    ((name Translation_effect)
     (obj_name cerb_frontend__Translation_effect)
     (visibility public)
     (impl))
    ((name TypingError)
     (obj_name cerb_frontend__TypingError)
     (visibility public)
     (impl))
    ((name Undefined)
     (obj_name cerb_frontend__Undefined)
     (visibility public)
     (impl))
    ((name Utils) (obj_name cerb_frontend__Utils) (visibility public) (impl))
    ((name Version)
     (obj_name cerb_frontend__Version)
     (visibility public)
     (impl))
    ((name WipFrontend)
     (obj_name cerb_frontend__WipFrontend)
     (visibility public)
     (impl)))
   (alias_module
    (name Cerb_frontend)
    (obj_name cerb_frontend)
    (visibility public)
    (kind alias)
    (impl))
   (wrapped true))))
(library
 (name cerberus.mem.concrete)
 (kind normal)
 (archives
  (byte mem/concrete/mem_concrete.cma)
  (native mem/concrete/mem_concrete.cmxa))
 (plugins
  (byte mem/concrete/mem_concrete.cma)
  (native mem/concrete/mem_concrete.cmxs))
 (native_archives mem/concrete/mem_concrete.a)
 (requires cerberus.frontend)
 (implements cerberus.frontend)
 (main_module_name Cerb_frontend)
 (modes byte native)
 (modules
  (wrapped
   (main_module_name Cerb_frontend)
   (modules
    ((name Impl_mem)
     (obj_name cerb_frontend__Impl_mem)
     (visibility public)
     (kind impl_vmodule)
     (impl)))
   (alias_module
    (name Cerb_frontend__mem_concrete__)
    (obj_name cerb_frontend__mem_concrete__)
    (visibility public)
    (kind alias)
    (impl))
   (wrapped true))))
(library
 (name cerberus.mem.symbolic)
 (kind normal)
 (archives
  (byte mem/symbolic/mem_symbolic.cma)
  (native mem/symbolic/mem_symbolic.cmxa))
 (plugins
  (byte mem/symbolic/mem_symbolic.cma)
  (native mem/symbolic/mem_symbolic.cmxs))
 (native_archives mem/symbolic/mem_symbolic.a)
 (requires cerberus.frontend z3)
 (implements cerberus.frontend)
 (main_module_name Cerb_frontend)
 (modes byte native)
 (obj_dir (private_dir .private))
 (modules
  (wrapped
   (main_module_name Cerb_frontend)
   (modules
    ((name Impl_mem)
     (obj_name cerb_frontend__Impl_mem)
     (visibility public)
     (kind impl_vmodule)
     (impl))
    ((name Mem_simplify)
     (obj_name cerb_frontend__mem_symbolic____Mem_simplify)
     (visibility private)
     (impl)))
   (alias_module
    (name Cerb_frontend__mem_symbolic__)
    (obj_name cerb_frontend__mem_symbolic__)
    (visibility public)
    (kind alias)
    (impl))
   (wrapped true))))
(library
 (name cerberus.sibylfs)
 (kind normal)
 (synopsis Sibylfs)
 (archives (byte sibylfs/sibylfs.cma) (native sibylfs/sibylfs.cmxa))
 (plugins (byte sibylfs/sibylfs.cma) (native sibylfs/sibylfs.cmxs))
 (native_archives sibylfs/sibylfs.a)
 (requires sha lem ppx_sexp_conv sexplib ppx_sexp_conv.runtime-lib)
 (modes byte native)
 (modules
  (unwrapped
   ((name Abstract_string)
    (obj_name abstract_string)
    (visibility public)
    (impl)
    (intf))
   ((name Dir_heap) (obj_name dir_heap) (visibility public) (impl))
   ((name Fs_dict_wrappers)
    (obj_name fs_dict_wrappers)
    (visibility public)
    (impl)
    (intf))
   ((name Fs_dump) (obj_name fs_dump) (visibility public) (impl))
   ((name Fs_prelude) (obj_name fs_prelude) (visibility public) (impl))
   ((name Fs_printer) (obj_name fs_printer) (visibility public) (impl))
   ((name Fs_spec) (obj_name fs_spec) (visibility public) (impl))
   ((name Lem_support)
    (obj_name lem_support)
    (visibility public)
    (impl)
    (intf))
   ((name List_array) (obj_name list_array) (visibility public) (impl))
   ((name Sibylfs) (obj_name sibylfs) (visibility public) (impl)))))
(library
 (name cerberus.util)
 (kind normal)
 (synopsis "Cerberus util library")
 (archives (byte util/util.cma) (native util/util.cmxa))
 (plugins (byte util/util.cma) (native util/util.cmxs))
 (native_archives util/util.a)
 (requires lem pprint yojson)
 (modes byte native)
 (modules
  (unwrapped
   ((name Cerb_runtime)
    (obj_name cerb_runtime)
    (visibility public)
    (impl)
    (intf))
   ((name Colour) (obj_name colour) (visibility public) (impl) (intf))
   ((name Debug_ocaml)
    (obj_name debug_ocaml)
    (visibility public)
    (impl)
    (intf))
   ((name Floating) (obj_name floating) (visibility public) (impl))
   ((name Fresh) (obj_name fresh) (visibility public) (impl))
   ((name Global_ocaml)
    (obj_name global_ocaml)
    (visibility public)
    (impl)
    (intf))
   ((name Json) (obj_name json) (visibility public) (impl))
   ((name Location_ocaml)
    (obj_name location_ocaml)
    (visibility public)
    (impl)
    (intf))
   ((name Logging) (obj_name logging) (visibility public) (impl) (intf))
   ((name N1570) (obj_name n1570) (visibility public) (impl))
   ((name Ocaml_any) (obj_name ocaml_any) (visibility public) (impl))
   ((name Pp_prelude) (obj_name pp_prelude) (visibility public) (impl) (intf))
   ((name Util) (obj_name util) (visibility public) (impl)))))

@rgrinberg
Copy link
Member

Thanks. Unfortunately, I remain confused.

When I reproduced the bug with an older version of dune, I noticed that the requires field was missing for libraries with implements. Adding that missing field back fixed the problem, and recent versions of dune added the requires field correctly.

It seems like you're experiencing the same problem even when the requires field is set. Which is something I haven't reproduced myself :/

@rlepigre
Copy link
Contributor Author

rlepigre commented Sep 2, 2020

OK, so do you mean that everything should work with dune 2.7.0 or higher?
I'm currently creating a fresh opam switch to test things again, maybe I made a mistake in my previous attempts at testing (though I doubt it since I was careful).

@rlepigre
Copy link
Contributor Author

rlepigre commented Sep 2, 2020

I managed to reproduce the problem once again using the following procedure:

# Run the following in an initially empty directory.
$> opam switch create . ocaml-base-compiler.4.07.1
$> opam pin add -n -y cerberus git+https://github.com/rlepigre/cerberus.git
$> opam install dune.2.7.0 cerberus
$> wget https://github.com/ocaml/dune/files/4955076/buggy.tar.gz
$> tar xf buggy.tar.gz
$> cd buggy
$> dune build
File "main.ml", line 1, characters 5-18:
Error: Unbound module Cerb_frontend

Edit: note that you can pin cerberus to git+https://github.com/rlepigre/cerberus.git to get a version that works with most recent dune.

@rgrinberg
Copy link
Member

Okay, I'm able to reproduce. Thanks.

rgrinberg added a commit to rgrinberg/jbuilder that referenced this issue Sep 4, 2020
Signed-off-by: Rudi Grinberg <[email protected]>
@vzaliva
Copy link

vzaliva commented Sep 14, 2021

I am running into the same problem. The workaround suggested by @rlepigre to add -I flag:

 (flags (:standard -w -27 -I +../cerberus/frontend)) 

made it compile when invoking dune from the command line.
However, in my emacs (using merlin) it still shows module import errors.

@vzaliva
Copy link

vzaliva commented Sep 15, 2021

Merlin issue seems to be unrelated to this: ocaml/merlin#1388

rgrinberg added a commit that referenced this issue Nov 4, 2021
Signed-off-by: Rudi Grinberg <[email protected]>

ps-id: 8C67C2BC-9A74-4CBC-A529-FF41DAD8A4F1
rgrinberg added a commit that referenced this issue Nov 4, 2021
Signed-off-by: Rudi Grinberg <[email protected]>

ps-id: 8C67C2BC-9A74-4CBC-A529-FF41DAD8A4F1
rgrinberg added a commit that referenced this issue Nov 4, 2021
Signed-off-by: Rudi Grinberg <[email protected]>

ps-id: 8C67C2BC-9A74-4CBC-A529-FF41DAD8A4F1
rgrinberg added a commit that referenced this issue Nov 4, 2021
Signed-off-by: Rudi Grinberg <[email protected]>

ps-id: 8C67C2BC-9A74-4CBC-A529-FF41DAD8A4F1
@rgrinberg rgrinberg mentioned this issue Nov 12, 2021
@rgrinberg rgrinberg added this to the 3.0.0 milestone Nov 12, 2021
rgrinberg added a commit to rgrinberg/opam-repository that referenced this issue Feb 11, 2022
…e-rpc, dune-rpc-lwt, dune-private-libs, dune-glob, dune-configurator, dune-build-info and dune-action-plugin (3.0.0)

CHANGES:

- Remove `uchar` and `seq` dummy ocamlfind libraries from dune's builtin
  library database (ocaml/dune#5260, @kit-ty-kate)

- Add a `DUNE_DIFF_COMMAND` environment variable to match `--diff-command`
  command-line parameter (@raphael-proust, fix ocaml/dune#5369, ocaml/dune#5375)

- Add support for odoc-link rules (ocaml/dune#5045, @lubegasimon)

- Dune will no longer generate documentation for hidden modules (ocaml/dune#5045,
  @lubegasimon)

- Parse the `native_pack_linker` field of `ocamlc -config` (ocaml/dune#5281, @TheLortex)

- Fix plugins with dot in the name (ocaml/dune#5182, @bobot, review @rgrinberg)

- Don't generate the dune-site build part when not needed (ocaml/dune#4861, @bobot,
  review @kit-ty-kate)

- Fix installation of implementations of virtual libraries (ocaml/dune#5150, fix ocaml/dune#3636,
  @rgrinberg)

- Run tests in all modes defined. Previously, jsoo was excluded. (@hhugo,
  ocaml/dune#5049, fix ocaml/dune#4951)

- Allow to configure the alias to run the jsoo tests (@hhugo, ocaml/dune#5049, ocaml/dune#4999)

- Set jsoo compilation flags in the `env` stanza (@hhugo, ocaml/dune#5049, ocaml/dune#1613)

- Allow to configure jsoo separate compilation in the `env` stanza. Previously,
  it was hard coded to always be enabled in the `dev` profile. (@hhugo, ocaml/dune#5049,
  fix ocaml/dune#970)

- Fix build-info version in jsoo executables (@hhugo, ocaml/dune#5049, fix ocaml/dune#4444)

- Pass `-no-check-prims` when building bytecode for jsoo (@hhugo, ocaml/dune#5049, ocaml/dune#4027)

- Fix jsoo builds when dynamically linked foreign archives are disabled
  (@hhugo, ocaml/dune#5049)

- Disallow empty packages starting from 3.0.  Empty packages may be
  re-enabled by adding the `(allow_empty)` to the package stanza in
  the dune-project file. (ocaml/dune#4867, fix ocaml/dune#2882, @kit-ty-kate, @rgrinberg)

- Add `link_flags` field to the `executable` field of `inline_tests` (ocaml/dune#5088,
  fix ocaml/dune#1530, @jvillard)

- In watch mode, use fsevents instead of fswatch on OSX (ocaml/dune#4937, ocaml/dune#4990, fixes
  ocaml/dune#4896 @rgrinberg)

- Remove `inotifywait` watch mode backend on Linux. We now use the inotify API
  exclusively (ocaml/dune#4941, @rgrinberg)

- Report cycles between virtual libraries and their implementation (ocaml/dune#5050,
  fixes ocaml/dune#2896, @rgrinberg)

- Warn when lang versions have an ignored suffix. `(lang dune 2.3.4)` or `(lang
  dune 2.3suffix)` were silently parsed as `2.3` and we know suggest to remove
  the prefix. (ocaml/dune#5040, @emillon)

- Allow users to specify dynamic dependencies in rules. For example `(deps
  %{read:foo.gen})` (ocaml/dune#4662, fixes ocaml/dune#4089, @jeremiedimino)

- Sandbox infer rules for menhir. Fixes possible "inconsistent assumptions"
  errors (ocaml/dune#5015, @rgrinberg)

- Experimental support for ctypes stubs (ocaml/dune#3905, fixes ocaml/dune#135, @mbacarella)

- Fix interpretation of `binaries` defined in the `env stanza`. Binaries
  defined in `x/dune` wouldn't be visible in `x/*/**/dune. (ocaml/dune#4975, fixes ocaml/dune#4976,
  @Leonidas-from-XIV, @rgrinberg)

- Do not list private libraries in package listings (ocaml/dune#4945, fixes ocaml/dune#4799,
  @rgrinberg)

- Allow spaces in cram test paths (ocaml/dune#4980, fixes ocaml/dune#4162, @rgrinberg)

- Improve error handling of misbehaving cram scripts. (ocaml/dune#4981, fix ocaml/dune#4230,
  @rgrinberg)

- Fix `foreign_stubs` inside a `tests` stanza. Previously, dune would crash
  when this field was present (ocaml/dune#4942, fix ocaml/dune#4946, @rgrinberg)

- Add the `enabled_if` field to `inline_tests` within the `library` stanza.
  This allows us to disable executing the inline tests while still allowing for
  compilation (ocaml/dune#4939, @rgrinberg)

- Generate a `dune-project` when initializing projects with `dune init proj ...`
  (ocaml/dune#4881, closes ocaml/dune#4367, @shonfeder)

- Allow spaces in the directory argument of the `subdir` stanza (ocaml/dune#4943, fixes
  ocaml/dune#4907, @rgrinberg)

- Add a `%{toolchain}` expansion variable (ocaml/dune#4899, fixes ocaml/dune#3949, @rgrinberg)

- Include dependencies of executables when creating toplevels (either `dune
  top` or `dune utop`) (ocaml/dune#4882, fixes ocaml/dune#4872, @Gopiancode)

- Fixes `opam` META file requires entry for private libs (ocaml/dune#4841, fixes ocaml/dune#4839, @toots)

- Fixes `dune exec` not adding .exe on Windows (ocaml/dune#4371, fixes ocaml/dune#3322, @MisterDA)

- Allow multiple cinaps stanzas in the same directory (ocaml/dune#4460, @rgrinberg)

- Fix `$ dune subst` in empty git repositories (ocaml/dune#4441, fixes ocaml/dune#3619, @rgrinberg)

- Improve interpretation of ansi escape sequence when spawning processes (ocaml/dune#4408,
  fixes ocaml/dune#2665, @rgrinberg)

- Allow `(package pkg)` in dependencies even if `pkg` is an installed package
  (ocaml/dune#4170, @bobot)

- Allow `%{version:pkg}` to work for external packages (ocaml/dune#4104, @kit-ty-kate)

- Add `(glob_files_rec <dir>/<glob>)` for globbing files recursively (ocaml/dune#4176,
  @jeremiedimino)

- Automatically generate empty `.mli` files for executables and tests (ocaml/dune#3768,
  fixes ocaml/dune#3745, @craigfe)

- Add `ocaml` command subgroup for OCaml related commands such as `utop`, `top`,
  and `merlin` (ocaml/dune#3936, @rgrinberg).

- Detect unknown variables more eagerly (ocaml/dune#4184, @jeremiedimino)

- Improve location of variables and macros in error messages (ocaml/dune#4205,
  @jeremiedimino)

- Auto-detect `dune-project` files as `dune` files in Emacs (ocaml/dune#4222, @shonfeder)

- Dune no longer automatically create or edit `dune-project` files
  (ocaml/dune#4239, fixes ocaml/dune#4108, @jeremiedimino)

- Warn if `dune-project` is not found (fatal in release mode) (ocaml/dune#5343, @emillon)

- Cleanup temporary files after running `$ dune exec`. (ocaml/dune#4260, fixes ocaml/dune#4243,
  @rgrinberg)

- Add a new subcommand `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. (ocaml/dune#4250, @voodoos)

- Enable cram tests by default (ocaml/dune#4262, @rgrinberg)

- Drop support for opam 1.x (ocaml/dune#4280, @jeremiedimino)

- Stop calling `ocamlfind` to determine the library search path or
  library installation directory. This makes the behavior of Dune
  simpler and more reproducible (ocaml/dune#4281, @jeremiedimino)

- Remove the `external-lib-deps` command. This command was only
  approximative and the cost of maintainance was getting too high. We
  removed it to make room for new more important features (ocaml/dune#4298,
  @jeremiedimino)

- It is now possible to define action dependencies through a chain
  of aliases. (ocaml/dune#4303, @aalekseyev)

- If an .ml file is not used by an executable, Dune no longer report
  parsing error in this file (ocaml/dune#4330, @jeremiedimino)

- Add support for sandboxing using hard links (ocaml/dune#4360, Andrey Mokhov)

- Fix dune crash when `subdir` is an absolute path (ocaml/dune#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.

- Fix a bug where dune would always re-run all actions that produce symlinks,
  even if their dependencies did not change. (ocaml/dune#4405, @aalekseyev)

- Fix a bug that was causing Dune to re-hash generated files more
  often than necessary (ocaml/dune#4419, @jeremiedimino)

- Fields allowed in the config file are now also allowed in the
  workspace file (ocaml/dune#4426, @jeremiedimino)

- Add options to control how Dune should handle stdout and stderr of
  actions when then 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. This allows to reduce the noise of
  large builds (ocaml/dune#4422, ocaml/dune#4515, @jeremiedimino)

- The `@all` alias no longer depends directly on copies of files from the source
  directory (ocaml/dune#4461, @nojb)

- Allow dune-file as an alternative file name for dune files (needs to be
  enabled in the dune-project file) (ocaml/dune#4428, @nojb)

- Drop support for upgrading jbuilder projects (ocaml/dune#4473, @jeremiedimino)

- Extend the environment variable `BUILD_PATH_PREFIX_MAP` to rewrite
  the root of the build dir (or sandbox) to `/workspace_root` (ocaml/dune#4466,
  @jeremiedimino)

- Simplify the implementation of build cache. We stop using the cache daemon to
  access the cache and instead write to and read from it directly. The new cache
  implementation is based on Jenga's cache library, which was thoroughly tested
  on large-scale builds. Using Jenga's cache library will also make it easier
  for us to port Jenga's cloud cache to Dune. (ocaml/dune#4443, ocaml/dune#4465, Andrey Mokhov)

- More informative error message when Dune can't read a target that's supposed
  to be produced by the action. Old message is still produced on ENOENT, but other
  errors deserve a more detailed report. (ocaml/dune#4501, @aalekseyev)

- Fixed a bug where a sandboxed action would fail if it declares no dependencies in
  its initial working directory or any directory it `chdir`s into. (ocaml/dune#4509, @aalekseyev)

- Fix a crash when clearing temporary directories (ocaml/dune#4489, ocaml/dune#4529, Andrey Mokhov)

- Dune now memoizes all errors when running in the file-watching mode. This
  speeds up incremental rebuilds but may be inconvenient in rare cases, e.g. if
  a build action fails due to a spurious error, such as running out of memory.
  Right now, the only way to force such actions to be rebuilt is to restart
  Dune, which clears all memoized errors. In future, we would like to provide a
  way to rerun all actions failed due to errors without restarting the build,
  e.g. via a Dune RPC call. (ocaml/dune#4522, Andrey Mokhov)

- Remove `dune compute`. It was broken and unused (ocaml/dune#4540,
  @jeremiedimino)

- No longer generate an approximate merlin files when computing the
  ocaml flags fails, for instance because they include the contents of
  a file that failed to build. This was a niche feature and it was
  getting in the way of making Dune's core better. (ocaml/dune#4607, @jeremiedimino)

- Make Dune display the progress indicator in all output modes except quiet
  (ocaml/dune#4618, @aalekseyev)

- Report accurate process timing information in trace mode (enabled with
  `--trace-file`) (ocaml/dune#4517, @rgrinberg)

- Do not log `live_words` and `free_words` in trace file. This allows using
  `Gc.quick_stat` which does not scan the heap. (ocaml/dune#4643, @emillon)

- Don't let command run by Dune observe the environment variable
  `INSIDE_EMACS` in order to improve reproducibility (ocaml/dune#4680,
  @jeremiedimino)

- Fix `root_module` when used in public libraries (ocaml/dune#4685, fixes ocaml/dune#4684,
  @rgrinberg, @craigfe)

- Fix `root_module` when used with preprocessing (ocaml/dune#4683, fixes ocaml/dune#4682,
  @rgrinberg, @craigfe)

- Display Coq profile flags in `dune printenv` (ocaml/dune#4767, @ejgallego)

- Introduce mdx stanza 0.2, requiring mdx >= 1.9.0, with a new generic `deps`
  field and the possibility to statically link `libraries` in the test
  executable. (ocaml/dune#3956, ocaml/dune#5391, fixes ocaml/dune#3955)

- Improve lookup of optional or disabled binaries. Previously, we'd treat every
  executable with missing libraries as optional. Now, we treat make sure to
  look at the library's optional or enabled_if status (ocaml/dune#4786).

- Always use 7 char hash prefix in build info version (ocaml/dune#4857, @jberdine, fixes
  ocaml/dune#4855)

- Allow to explicitly disable/enable the use of `dune subst` by adding a
  new `(subst <disable|enable>)` stanza to the `dune-project` file.
  (ocaml/dune#4864, @kit-ty-kate)

- Simplify the way `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
  (ocaml/dune#4921, fixes ocaml/dune#4459, @jeremiedimino)

- Dune no longer reads installed META files for libraries distributed with the
  compiler, instead using its own internal database. (ocaml/dune#4946, @nojb)

- Add support for `(empty_module_interface_if_absent)` in executable and library
  stanzas. (ocaml/dune#4955, @nojb)

- Add support for `%{bin-available:...}` (ocaml/dune#4995, @jeremiedimino)

- Make sure running `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 (ocaml/dune#4996, @jeremiedimino)

- Allow `%{read:...}` in more places such as `(enabled_if ...)`
  (ocaml/dune#4994, @jeremiedimino)

- Run each action in its own process group so that we don't leave
  stray processes behind when killing actions (ocaml/dune#4998, @jeremiedimino)

- Add an option `expand_aliases_in_sandbox` (ocaml/dune#5003, @jeremiedimino)

- Allow to cancel the initial scan via Control+C (ocaml/dune#4460, fixes ocaml/dune#4364
  @jeremiedimino)

- Add experimental support for directory targets (ocaml/dune#3316, ocaml/dune#5025, Andrey Mokhov),
  enabled via `(using directory-targets 0.1)` in `dune-project`.

- Delete old `promote-into`, `promote-until-clean` and `promote-until-clean-into`
  syntax (ocaml/dune#5091, Andrey Mokhov).

- Add link_flags in the env stanza (ocaml/dune#5215)

- Bootstrap: ignore errors when trying to remove generated files. (ocaml/dune#5407,
  @damiendoligez)
smorimoto pushed a commit to rgrinberg/opam-repository that referenced this issue Feb 13, 2022
…e-rpc, dune-rpc-lwt, dune-private-libs, dune-glob, dune-configurator, dune-build-info and dune-action-plugin (3.0.0)

CHANGES:

- Remove `uchar` and `seq` dummy ocamlfind libraries from dune's builtin
  library database (ocaml/dune#5260, @kit-ty-kate)

- Add a `DUNE_DIFF_COMMAND` environment variable to match `--diff-command`
  command-line parameter (@raphael-proust, fix ocaml/dune#5369, ocaml/dune#5375)

- Add support for odoc-link rules (ocaml/dune#5045, @lubegasimon)

- Dune will no longer generate documentation for hidden modules (ocaml/dune#5045,
  @lubegasimon)

- Parse the `native_pack_linker` field of `ocamlc -config` (ocaml/dune#5281, @TheLortex)

- Fix plugins with dot in the name (ocaml/dune#5182, @bobot, review @rgrinberg)

- Don't generate the dune-site build part when not needed (ocaml/dune#4861, @bobot,
  review @kit-ty-kate)

- Fix installation of implementations of virtual libraries (ocaml/dune#5150, fix ocaml/dune#3636,
  @rgrinberg)

- Run tests in all modes defined. Previously, jsoo was excluded. (@hhugo,
  ocaml/dune#5049, fix ocaml/dune#4951)

- Allow to configure the alias to run the jsoo tests (@hhugo, ocaml/dune#5049, ocaml/dune#4999)

- Set jsoo compilation flags in the `env` stanza (@hhugo, ocaml/dune#5049, ocaml/dune#1613)

- Allow to configure jsoo separate compilation in the `env` stanza. Previously,
  it was hard coded to always be enabled in the `dev` profile. (@hhugo, ocaml/dune#5049,
  fix ocaml/dune#970)

- Fix build-info version in jsoo executables (@hhugo, ocaml/dune#5049, fix ocaml/dune#4444)

- Pass `-no-check-prims` when building bytecode for jsoo (@hhugo, ocaml/dune#5049, ocaml/dune#4027)

- Fix jsoo builds when dynamically linked foreign archives are disabled
  (@hhugo, ocaml/dune#5049)

- Disallow empty packages starting from 3.0.  Empty packages may be
  re-enabled by adding the `(allow_empty)` to the package stanza in
  the dune-project file. (ocaml/dune#4867, fix ocaml/dune#2882, @kit-ty-kate, @rgrinberg)

- Add `link_flags` field to the `executable` field of `inline_tests` (ocaml/dune#5088,
  fix ocaml/dune#1530, @jvillard)

- In watch mode, use fsevents instead of fswatch on OSX (ocaml/dune#4937, ocaml/dune#4990, fixes
  ocaml/dune#4896 @rgrinberg)

- Remove `inotifywait` watch mode backend on Linux. We now use the inotify API
  exclusively (ocaml/dune#4941, @rgrinberg)

- Report cycles between virtual libraries and their implementation (ocaml/dune#5050,
  fixes ocaml/dune#2896, @rgrinberg)

- Warn when lang versions have an ignored suffix. `(lang dune 2.3.4)` or `(lang
  dune 2.3suffix)` were silently parsed as `2.3` and we know suggest to remove
  the prefix. (ocaml/dune#5040, @emillon)

- Allow users to specify dynamic dependencies in rules. For example `(deps
  %{read:foo.gen})` (ocaml/dune#4662, fixes ocaml/dune#4089, @jeremiedimino)

- Sandbox infer rules for menhir. Fixes possible "inconsistent assumptions"
  errors (ocaml/dune#5015, @rgrinberg)

- Experimental support for ctypes stubs (ocaml/dune#3905, fixes ocaml/dune#135, @mbacarella)

- Fix interpretation of `binaries` defined in the `env stanza`. Binaries
  defined in `x/dune` wouldn't be visible in `x/*/**/dune. (ocaml/dune#4975, fixes ocaml/dune#4976,
  @Leonidas-from-XIV, @rgrinberg)

- Do not list private libraries in package listings (ocaml/dune#4945, fixes ocaml/dune#4799,
  @rgrinberg)

- Allow spaces in cram test paths (ocaml/dune#4980, fixes ocaml/dune#4162, @rgrinberg)

- Improve error handling of misbehaving cram scripts. (ocaml/dune#4981, fix ocaml/dune#4230,
  @rgrinberg)

- Fix `foreign_stubs` inside a `tests` stanza. Previously, dune would crash
  when this field was present (ocaml/dune#4942, fix ocaml/dune#4946, @rgrinberg)

- Add the `enabled_if` field to `inline_tests` within the `library` stanza.
  This allows us to disable executing the inline tests while still allowing for
  compilation (ocaml/dune#4939, @rgrinberg)

- Generate a `dune-project` when initializing projects with `dune init proj ...`
  (ocaml/dune#4881, closes ocaml/dune#4367, @shonfeder)

- Allow spaces in the directory argument of the `subdir` stanza (ocaml/dune#4943, fixes
  ocaml/dune#4907, @rgrinberg)

- Add a `%{toolchain}` expansion variable (ocaml/dune#4899, fixes ocaml/dune#3949, @rgrinberg)

- Include dependencies of executables when creating toplevels (either `dune
  top` or `dune utop`) (ocaml/dune#4882, fixes ocaml/dune#4872, @Gopiancode)

- Fixes `opam` META file requires entry for private libs (ocaml/dune#4841, fixes ocaml/dune#4839, @toots)

- Fixes `dune exec` not adding .exe on Windows (ocaml/dune#4371, fixes ocaml/dune#3322, @MisterDA)

- Allow multiple cinaps stanzas in the same directory (ocaml/dune#4460, @rgrinberg)

- Fix `$ dune subst` in empty git repositories (ocaml/dune#4441, fixes ocaml/dune#3619, @rgrinberg)

- Improve interpretation of ansi escape sequence when spawning processes (ocaml/dune#4408,
  fixes ocaml/dune#2665, @rgrinberg)

- Allow `(package pkg)` in dependencies even if `pkg` is an installed package
  (ocaml/dune#4170, @bobot)

- Allow `%{version:pkg}` to work for external packages (ocaml/dune#4104, @kit-ty-kate)

- Add `(glob_files_rec <dir>/<glob>)` for globbing files recursively (ocaml/dune#4176,
  @jeremiedimino)

- Automatically generate empty `.mli` files for executables and tests (ocaml/dune#3768,
  fixes ocaml/dune#3745, @craigfe)

- Add `ocaml` command subgroup for OCaml related commands such as `utop`, `top`,
  and `merlin` (ocaml/dune#3936, @rgrinberg).

- Detect unknown variables more eagerly (ocaml/dune#4184, @jeremiedimino)

- Improve location of variables and macros in error messages (ocaml/dune#4205,
  @jeremiedimino)

- Auto-detect `dune-project` files as `dune` files in Emacs (ocaml/dune#4222, @shonfeder)

- Dune no longer automatically create or edit `dune-project` files
  (ocaml/dune#4239, fixes ocaml/dune#4108, @jeremiedimino)

- Warn if `dune-project` is not found (fatal in release mode) (ocaml/dune#5343, @emillon)

- Cleanup temporary files after running `$ dune exec`. (ocaml/dune#4260, fixes ocaml/dune#4243,
  @rgrinberg)

- Add a new subcommand `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. (ocaml/dune#4250, @voodoos)

- Enable cram tests by default (ocaml/dune#4262, @rgrinberg)

- Drop support for opam 1.x (ocaml/dune#4280, @jeremiedimino)

- Stop calling `ocamlfind` to determine the library search path or
  library installation directory. This makes the behavior of Dune
  simpler and more reproducible (ocaml/dune#4281, @jeremiedimino)

- Remove the `external-lib-deps` command. This command was only
  approximative and the cost of maintainance was getting too high. We
  removed it to make room for new more important features (ocaml/dune#4298,
  @jeremiedimino)

- It is now possible to define action dependencies through a chain
  of aliases. (ocaml/dune#4303, @aalekseyev)

- If an .ml file is not used by an executable, Dune no longer report
  parsing error in this file (ocaml/dune#4330, @jeremiedimino)

- Add support for sandboxing using hard links (ocaml/dune#4360, Andrey Mokhov)

- Fix dune crash when `subdir` is an absolute path (ocaml/dune#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.

- Fix a bug where dune would always re-run all actions that produce symlinks,
  even if their dependencies did not change. (ocaml/dune#4405, @aalekseyev)

- Fix a bug that was causing Dune to re-hash generated files more
  often than necessary (ocaml/dune#4419, @jeremiedimino)

- Fields allowed in the config file are now also allowed in the
  workspace file (ocaml/dune#4426, @jeremiedimino)

- Add options to control how Dune should handle stdout and stderr of
  actions when then 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. This allows to reduce the noise of
  large builds (ocaml/dune#4422, ocaml/dune#4515, @jeremiedimino)

- The `@all` alias no longer depends directly on copies of files from the source
  directory (ocaml/dune#4461, @nojb)

- Allow dune-file as an alternative file name for dune files (needs to be
  enabled in the dune-project file) (ocaml/dune#4428, @nojb)

- Drop support for upgrading jbuilder projects (ocaml/dune#4473, @jeremiedimino)

- Extend the environment variable `BUILD_PATH_PREFIX_MAP` to rewrite
  the root of the build dir (or sandbox) to `/workspace_root` (ocaml/dune#4466,
  @jeremiedimino)

- Simplify the implementation of build cache. We stop using the cache daemon to
  access the cache and instead write to and read from it directly. The new cache
  implementation is based on Jenga's cache library, which was thoroughly tested
  on large-scale builds. Using Jenga's cache library will also make it easier
  for us to port Jenga's cloud cache to Dune. (ocaml/dune#4443, ocaml/dune#4465, Andrey Mokhov)

- More informative error message when Dune can't read a target that's supposed
  to be produced by the action. Old message is still produced on ENOENT, but other
  errors deserve a more detailed report. (ocaml/dune#4501, @aalekseyev)

- Fixed a bug where a sandboxed action would fail if it declares no dependencies in
  its initial working directory or any directory it `chdir`s into. (ocaml/dune#4509, @aalekseyev)

- Fix a crash when clearing temporary directories (ocaml/dune#4489, ocaml/dune#4529, Andrey Mokhov)

- Dune now memoizes all errors when running in the file-watching mode. This
  speeds up incremental rebuilds but may be inconvenient in rare cases, e.g. if
  a build action fails due to a spurious error, such as running out of memory.
  Right now, the only way to force such actions to be rebuilt is to restart
  Dune, which clears all memoized errors. In future, we would like to provide a
  way to rerun all actions failed due to errors without restarting the build,
  e.g. via a Dune RPC call. (ocaml/dune#4522, Andrey Mokhov)

- Remove `dune compute`. It was broken and unused (ocaml/dune#4540,
  @jeremiedimino)

- No longer generate an approximate merlin files when computing the
  ocaml flags fails, for instance because they include the contents of
  a file that failed to build. This was a niche feature and it was
  getting in the way of making Dune's core better. (ocaml/dune#4607, @jeremiedimino)

- Make Dune display the progress indicator in all output modes except quiet
  (ocaml/dune#4618, @aalekseyev)

- Report accurate process timing information in trace mode (enabled with
  `--trace-file`) (ocaml/dune#4517, @rgrinberg)

- Do not log `live_words` and `free_words` in trace file. This allows using
  `Gc.quick_stat` which does not scan the heap. (ocaml/dune#4643, @emillon)

- Don't let command run by Dune observe the environment variable
  `INSIDE_EMACS` in order to improve reproducibility (ocaml/dune#4680,
  @jeremiedimino)

- Fix `root_module` when used in public libraries (ocaml/dune#4685, fixes ocaml/dune#4684,
  @rgrinberg, @craigfe)

- Fix `root_module` when used with preprocessing (ocaml/dune#4683, fixes ocaml/dune#4682,
  @rgrinberg, @craigfe)

- Display Coq profile flags in `dune printenv` (ocaml/dune#4767, @ejgallego)

- Introduce mdx stanza 0.2, requiring mdx >= 1.9.0, with a new generic `deps`
  field and the possibility to statically link `libraries` in the test
  executable. (ocaml/dune#3956, ocaml/dune#5391, fixes ocaml/dune#3955)

- Improve lookup of optional or disabled binaries. Previously, we'd treat every
  executable with missing libraries as optional. Now, we treat make sure to
  look at the library's optional or enabled_if status (ocaml/dune#4786).

- Always use 7 char hash prefix in build info version (ocaml/dune#4857, @jberdine, fixes
  ocaml/dune#4855)

- Allow to explicitly disable/enable the use of `dune subst` by adding a
  new `(subst <disable|enable>)` stanza to the `dune-project` file.
  (ocaml/dune#4864, @kit-ty-kate)

- Simplify the way `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
  (ocaml/dune#4921, fixes ocaml/dune#4459, @jeremiedimino)

- Dune no longer reads installed META files for libraries distributed with the
  compiler, instead using its own internal database. (ocaml/dune#4946, @nojb)

- Add support for `(empty_module_interface_if_absent)` in executable and library
  stanzas. (ocaml/dune#4955, @nojb)

- Add support for `%{bin-available:...}` (ocaml/dune#4995, @jeremiedimino)

- Make sure running `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 (ocaml/dune#4996, @jeremiedimino)

- Allow `%{read:...}` in more places such as `(enabled_if ...)`
  (ocaml/dune#4994, @jeremiedimino)

- Run each action in its own process group so that we don't leave
  stray processes behind when killing actions (ocaml/dune#4998, @jeremiedimino)

- Add an option `expand_aliases_in_sandbox` (ocaml/dune#5003, @jeremiedimino)

- Allow to cancel the initial scan via Control+C (ocaml/dune#4460, fixes ocaml/dune#4364
  @jeremiedimino)

- Add experimental support for directory targets (ocaml/dune#3316, ocaml/dune#5025, Andrey Mokhov),
  enabled via `(using directory-targets 0.1)` in `dune-project`.

- Delete old `promote-into`, `promote-until-clean` and `promote-until-clean-into`
  syntax (ocaml/dune#5091, Andrey Mokhov).

- Add link_flags in the env stanza (ocaml/dune#5215)

- Bootstrap: ignore errors when trying to remove generated files. (ocaml/dune#5407,
  @damiendoligez)
kit-ty-kate pushed a commit to rgrinberg/opam-repository that referenced this issue Feb 15, 2022
…e-rpc, dune-rpc-lwt, dune-private-libs, dune-glob, dune-configurator, dune-build-info and dune-action-plugin (3.0.0)

CHANGES:

- Remove `uchar` and `seq` dummy ocamlfind libraries from dune's builtin
  library database (ocaml/dune#5260, @kit-ty-kate)

- Add a `DUNE_DIFF_COMMAND` environment variable to match `--diff-command`
  command-line parameter (@raphael-proust, fix ocaml/dune#5369, ocaml/dune#5375)

- Add support for odoc-link rules (ocaml/dune#5045, @lubegasimon)

- Dune will no longer generate documentation for hidden modules (ocaml/dune#5045,
  @lubegasimon)

- Parse the `native_pack_linker` field of `ocamlc -config` (ocaml/dune#5281, @TheLortex)

- Fix plugins with dot in the name (ocaml/dune#5182, @bobot, review @rgrinberg)

- Don't generate the dune-site build part when not needed (ocaml/dune#4861, @bobot,
  review @kit-ty-kate)

- Fix installation of implementations of virtual libraries (ocaml/dune#5150, fix ocaml/dune#3636,
  @rgrinberg)

- Run tests in all modes defined. Previously, jsoo was excluded. (@hhugo,
  ocaml/dune#5049, fix ocaml/dune#4951)

- Allow to configure the alias to run the jsoo tests (@hhugo, ocaml/dune#5049, ocaml/dune#4999)

- Set jsoo compilation flags in the `env` stanza (@hhugo, ocaml/dune#5049, ocaml/dune#1613)

- Allow to configure jsoo separate compilation in the `env` stanza. Previously,
  it was hard coded to always be enabled in the `dev` profile. (@hhugo, ocaml/dune#5049,
  fix ocaml/dune#970)

- Fix build-info version in jsoo executables (@hhugo, ocaml/dune#5049, fix ocaml/dune#4444)

- Pass `-no-check-prims` when building bytecode for jsoo (@hhugo, ocaml/dune#5049, ocaml/dune#4027)

- Fix jsoo builds when dynamically linked foreign archives are disabled
  (@hhugo, ocaml/dune#5049)

- Disallow empty packages starting from 3.0.  Empty packages may be
  re-enabled by adding the `(allow_empty)` to the package stanza in
  the dune-project file. (ocaml/dune#4867, fix ocaml/dune#2882, @kit-ty-kate, @rgrinberg)

- Add `link_flags` field to the `executable` field of `inline_tests` (ocaml/dune#5088,
  fix ocaml/dune#1530, @jvillard)

- In watch mode, use fsevents instead of fswatch on OSX (ocaml/dune#4937, ocaml/dune#4990, fixes
  ocaml/dune#4896 @rgrinberg)

- Remove `inotifywait` watch mode backend on Linux. We now use the inotify API
  exclusively (ocaml/dune#4941, @rgrinberg)

- Report cycles between virtual libraries and their implementation (ocaml/dune#5050,
  fixes ocaml/dune#2896, @rgrinberg)

- Warn when lang versions have an ignored suffix. `(lang dune 2.3.4)` or `(lang
  dune 2.3suffix)` were silently parsed as `2.3` and we know suggest to remove
  the prefix. (ocaml/dune#5040, @emillon)

- Allow users to specify dynamic dependencies in rules. For example `(deps
  %{read:foo.gen})` (ocaml/dune#4662, fixes ocaml/dune#4089, @jeremiedimino)

- Sandbox infer rules for menhir. Fixes possible "inconsistent assumptions"
  errors (ocaml/dune#5015, @rgrinberg)

- Experimental support for ctypes stubs (ocaml/dune#3905, fixes ocaml/dune#135, @mbacarella)

- Fix interpretation of `binaries` defined in the `env stanza`. Binaries
  defined in `x/dune` wouldn't be visible in `x/*/**/dune. (ocaml/dune#4975, fixes ocaml/dune#4976,
  @Leonidas-from-XIV, @rgrinberg)

- Do not list private libraries in package listings (ocaml/dune#4945, fixes ocaml/dune#4799,
  @rgrinberg)

- Allow spaces in cram test paths (ocaml/dune#4980, fixes ocaml/dune#4162, @rgrinberg)

- Improve error handling of misbehaving cram scripts. (ocaml/dune#4981, fix ocaml/dune#4230,
  @rgrinberg)

- Fix `foreign_stubs` inside a `tests` stanza. Previously, dune would crash
  when this field was present (ocaml/dune#4942, fix ocaml/dune#4946, @rgrinberg)

- Add the `enabled_if` field to `inline_tests` within the `library` stanza.
  This allows us to disable executing the inline tests while still allowing for
  compilation (ocaml/dune#4939, @rgrinberg)

- Generate a `dune-project` when initializing projects with `dune init proj ...`
  (ocaml/dune#4881, closes ocaml/dune#4367, @shonfeder)

- Allow spaces in the directory argument of the `subdir` stanza (ocaml/dune#4943, fixes
  ocaml/dune#4907, @rgrinberg)

- Add a `%{toolchain}` expansion variable (ocaml/dune#4899, fixes ocaml/dune#3949, @rgrinberg)

- Include dependencies of executables when creating toplevels (either `dune
  top` or `dune utop`) (ocaml/dune#4882, fixes ocaml/dune#4872, @Gopiancode)

- Fixes `opam` META file requires entry for private libs (ocaml/dune#4841, fixes ocaml/dune#4839, @toots)

- Fixes `dune exec` not adding .exe on Windows (ocaml/dune#4371, fixes ocaml/dune#3322, @MisterDA)

- Allow multiple cinaps stanzas in the same directory (ocaml/dune#4460, @rgrinberg)

- Fix `$ dune subst` in empty git repositories (ocaml/dune#4441, fixes ocaml/dune#3619, @rgrinberg)

- Improve interpretation of ansi escape sequence when spawning processes (ocaml/dune#4408,
  fixes ocaml/dune#2665, @rgrinberg)

- Allow `(package pkg)` in dependencies even if `pkg` is an installed package
  (ocaml/dune#4170, @bobot)

- Allow `%{version:pkg}` to work for external packages (ocaml/dune#4104, @kit-ty-kate)

- Add `(glob_files_rec <dir>/<glob>)` for globbing files recursively (ocaml/dune#4176,
  @jeremiedimino)

- Automatically generate empty `.mli` files for executables and tests (ocaml/dune#3768,
  fixes ocaml/dune#3745, @craigfe)

- Add `ocaml` command subgroup for OCaml related commands such as `utop`, `top`,
  and `merlin` (ocaml/dune#3936, @rgrinberg).

- Detect unknown variables more eagerly (ocaml/dune#4184, @jeremiedimino)

- Improve location of variables and macros in error messages (ocaml/dune#4205,
  @jeremiedimino)

- Auto-detect `dune-project` files as `dune` files in Emacs (ocaml/dune#4222, @shonfeder)

- Dune no longer automatically create or edit `dune-project` files
  (ocaml/dune#4239, fixes ocaml/dune#4108, @jeremiedimino)

- Warn if `dune-project` is not found (fatal in release mode) (ocaml/dune#5343, @emillon)

- Cleanup temporary files after running `$ dune exec`. (ocaml/dune#4260, fixes ocaml/dune#4243,
  @rgrinberg)

- Add a new subcommand `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. (ocaml/dune#4250, @voodoos)

- Enable cram tests by default (ocaml/dune#4262, @rgrinberg)

- Drop support for opam 1.x (ocaml/dune#4280, @jeremiedimino)

- Stop calling `ocamlfind` to determine the library search path or
  library installation directory. This makes the behavior of Dune
  simpler and more reproducible (ocaml/dune#4281, @jeremiedimino)

- Remove the `external-lib-deps` command. This command was only
  approximative and the cost of maintainance was getting too high. We
  removed it to make room for new more important features (ocaml/dune#4298,
  @jeremiedimino)

- It is now possible to define action dependencies through a chain
  of aliases. (ocaml/dune#4303, @aalekseyev)

- If an .ml file is not used by an executable, Dune no longer report
  parsing error in this file (ocaml/dune#4330, @jeremiedimino)

- Add support for sandboxing using hard links (ocaml/dune#4360, Andrey Mokhov)

- Fix dune crash when `subdir` is an absolute path (ocaml/dune#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.

- Fix a bug where dune would always re-run all actions that produce symlinks,
  even if their dependencies did not change. (ocaml/dune#4405, @aalekseyev)

- Fix a bug that was causing Dune to re-hash generated files more
  often than necessary (ocaml/dune#4419, @jeremiedimino)

- Fields allowed in the config file are now also allowed in the
  workspace file (ocaml/dune#4426, @jeremiedimino)

- Add options to control how Dune should handle stdout and stderr of
  actions when then 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. This allows to reduce the noise of
  large builds (ocaml/dune#4422, ocaml/dune#4515, @jeremiedimino)

- The `@all` alias no longer depends directly on copies of files from the source
  directory (ocaml/dune#4461, @nojb)

- Allow dune-file as an alternative file name for dune files (needs to be
  enabled in the dune-project file) (ocaml/dune#4428, @nojb)

- Drop support for upgrading jbuilder projects (ocaml/dune#4473, @jeremiedimino)

- Extend the environment variable `BUILD_PATH_PREFIX_MAP` to rewrite
  the root of the build dir (or sandbox) to `/workspace_root` (ocaml/dune#4466,
  @jeremiedimino)

- Simplify the implementation of build cache. We stop using the cache daemon to
  access the cache and instead write to and read from it directly. The new cache
  implementation is based on Jenga's cache library, which was thoroughly tested
  on large-scale builds. Using Jenga's cache library will also make it easier
  for us to port Jenga's cloud cache to Dune. (ocaml/dune#4443, ocaml/dune#4465, Andrey Mokhov)

- More informative error message when Dune can't read a target that's supposed
  to be produced by the action. Old message is still produced on ENOENT, but other
  errors deserve a more detailed report. (ocaml/dune#4501, @aalekseyev)

- Fixed a bug where a sandboxed action would fail if it declares no dependencies in
  its initial working directory or any directory it `chdir`s into. (ocaml/dune#4509, @aalekseyev)

- Fix a crash when clearing temporary directories (ocaml/dune#4489, ocaml/dune#4529, Andrey Mokhov)

- Dune now memoizes all errors when running in the file-watching mode. This
  speeds up incremental rebuilds but may be inconvenient in rare cases, e.g. if
  a build action fails due to a spurious error, such as running out of memory.
  Right now, the only way to force such actions to be rebuilt is to restart
  Dune, which clears all memoized errors. In future, we would like to provide a
  way to rerun all actions failed due to errors without restarting the build,
  e.g. via a Dune RPC call. (ocaml/dune#4522, Andrey Mokhov)

- Remove `dune compute`. It was broken and unused (ocaml/dune#4540,
  @jeremiedimino)

- No longer generate an approximate merlin files when computing the
  ocaml flags fails, for instance because they include the contents of
  a file that failed to build. This was a niche feature and it was
  getting in the way of making Dune's core better. (ocaml/dune#4607, @jeremiedimino)

- Make Dune display the progress indicator in all output modes except quiet
  (ocaml/dune#4618, @aalekseyev)

- Report accurate process timing information in trace mode (enabled with
  `--trace-file`) (ocaml/dune#4517, @rgrinberg)

- Do not log `live_words` and `free_words` in trace file. This allows using
  `Gc.quick_stat` which does not scan the heap. (ocaml/dune#4643, @emillon)

- Don't let command run by Dune observe the environment variable
  `INSIDE_EMACS` in order to improve reproducibility (ocaml/dune#4680,
  @jeremiedimino)

- Fix `root_module` when used in public libraries (ocaml/dune#4685, fixes ocaml/dune#4684,
  @rgrinberg, @craigfe)

- Fix `root_module` when used with preprocessing (ocaml/dune#4683, fixes ocaml/dune#4682,
  @rgrinberg, @craigfe)

- Display Coq profile flags in `dune printenv` (ocaml/dune#4767, @ejgallego)

- Introduce mdx stanza 0.2, requiring mdx >= 1.9.0, with a new generic `deps`
  field and the possibility to statically link `libraries` in the test
  executable. (ocaml/dune#3956, ocaml/dune#5391, fixes ocaml/dune#3955)

- Improve lookup of optional or disabled binaries. Previously, we'd treat every
  executable with missing libraries as optional. Now, we treat make sure to
  look at the library's optional or enabled_if status (ocaml/dune#4786).

- Always use 7 char hash prefix in build info version (ocaml/dune#4857, @jberdine, fixes
  ocaml/dune#4855)

- Allow to explicitly disable/enable the use of `dune subst` by adding a
  new `(subst <disable|enable>)` stanza to the `dune-project` file.
  (ocaml/dune#4864, @kit-ty-kate)

- Simplify the way `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
  (ocaml/dune#4921, fixes ocaml/dune#4459, @jeremiedimino)

- Dune no longer reads installed META files for libraries distributed with the
  compiler, instead using its own internal database. (ocaml/dune#4946, @nojb)

- Add support for `(empty_module_interface_if_absent)` in executable and library
  stanzas. (ocaml/dune#4955, @nojb)

- Add support for `%{bin-available:...}` (ocaml/dune#4995, @jeremiedimino)

- Make sure running `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 (ocaml/dune#4996, @jeremiedimino)

- Allow `%{read:...}` in more places such as `(enabled_if ...)`
  (ocaml/dune#4994, @jeremiedimino)

- Run each action in its own process group so that we don't leave
  stray processes behind when killing actions (ocaml/dune#4998, @jeremiedimino)

- Add an option `expand_aliases_in_sandbox` (ocaml/dune#5003, @jeremiedimino)

- Allow to cancel the initial scan via Control+C (ocaml/dune#4460, fixes ocaml/dune#4364
  @jeremiedimino)

- Add experimental support for directory targets (ocaml/dune#3316, ocaml/dune#5025, Andrey Mokhov),
  enabled via `(using directory-targets 0.1)` in `dune-project`.

- Delete old `promote-into`, `promote-until-clean` and `promote-until-clean-into`
  syntax (ocaml/dune#5091, Andrey Mokhov).

- Add link_flags in the env stanza (ocaml/dune#5215)

- Bootstrap: ignore errors when trying to remove generated files. (ocaml/dune#5407,
  @damiendoligez)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment