As per https://github.com/ocaml/ocaml/pull/1110, OCaml 4.08 and later raises a warning for unused module opens, even when they are opened with open!
. This creates friction with the common practice of using open! Foo
to establish that the following code is to be in the context of module Foo
(whether or not any thing is used from inside of Foo
). Moreover, since dune
treats all warnings as fatal errors by default, this will cause dune builds in the default dev
profile to fail with errors like
$ dune build
File "lib/mylib.ml", line 1, characters 0-10:
1 | open! Core
^^^^^^^^^^
Error (warning 66): unused open! Core.
How can I disable this warnings and the fatal error?