Skip to content

Add support for the new -H <dir> argument in OCaml 5.2 #9333

@kit-ty-kate

Description

@kit-ty-kate

Would fix:

ocaml/ocaml#12246 added support for the -H <dir> argument, which, similarly to -I <dir> adds the given directory to the list of directories the compiler will look into for interfaces. However contrary to -I, -H forbids explicit calls to the modules and instead only resolves their type.

Using this would fix a foundamental flaw in the (implicit_transitive_deps false) option which causes regular annoyance for users and opam-repository maintainers alike.

Dune should be able to detect which version of the OCaml compiler it’s using, and if it’s OCaml >= 5.2, then instead of not adding any of the implicit directories in (implicit_transitive_deps false) mode, it would instead use -H, the same way -I is used with (implicit_transitive_deps true)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions