The ocaml_deprecated_auto_include warning doesn't seem to get attached to anything. It shows the source as File "_none_", line 1 which makes it troublesome to fix (I have to dig in _build/log to find which file was being compiled, as part of which lib/exe, then the dune file, ...). Ideally dune should give me those information directly.
Actual Behavior
$ dune build
File "_none_", line 1:
Alert ocaml_deprecated_auto_include:
OCaml's lib directory layout changed in 5.0. The unix subdirectory has been
automatically added to the search path, but you should add -I +unix to the
command-line to silence this alert (e.g. by adding unix to the list of
libraries in your dune file, or adding use_unix to your _tags file for
ocamlbuild, or using -package unix for ocamlfind).
Reproduction
Build a binary or a lib which uses Unix or Str without putting the corresponding library dependency in the dune file.
Specifications
Version of dune (output of dune --version): ocaml_deprecated_auto_include
Version of ocaml (output of ocamlc --version): 5.2.0
Operating system (distribution and version): debian bookworm
This alert is generated by the compiler; there isn't much Dune can do about it. It may be worth reporting it upstream over at https://github.com/ocaml/ocaml.
Expected Behavior
The
ocaml_deprecated_auto_include
warning doesn't seem to get attached to anything. It shows the source asFile "_none_", line 1
which makes it troublesome to fix (I have to dig in _build/log to find which file was being compiled, as part of which lib/exe, then the dune file, ...). Ideally dune should give me those information directly.Actual Behavior
Reproduction
Build a binary or a lib which uses
Unix
orStr
without putting the corresponding library dependency in the dune file.Specifications
dune
(output ofdune --version
): ocaml_deprecated_auto_includeocaml
(output ofocamlc --version
): 5.2.0