You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently started using the new (implicit_transitive_deps false) with dune 3.17 and OCaml 5 (is -H from 5.1 or 5.2?), and I like it a lot. Thanks!
One issue I did not foresee, and discovered in CI results is that, for certain repos, the CI matrix checks the build with older ocaml versions, such as 4.14, and because it uses the same dune config files there, things do not work well (this effectively reverts to a world where -H is not well supported).
Dune files have the ability to restrict stanza based on the OCaml version, via the enabled_if construct. I wonder if something similar could be made available in dune-project files.
Example
Something like this, which I would put in my dune-project file maybe?
Now that OCaml supports -H (since 5.2), there is no longer a reason to support both modes in Dune (other than backwards compatibility), and (implicit_transitive_deps false) should become the default (and only) setting of Dune. Is there a reason to support (implicit_transitive_deps true) with OCaml >= 5.2?
If we do this, then (implicit_transitive_deps ...) could be understood to modify the behaviour only for versions of OCaml < 5.2, which do not support -H.
Is there a reason to support (implicit_transitive_deps true) with OCaml >= 5.2?
I don't know if some people find it convenient not to have to list transitive dependencies. Imo the new behavior seems desirable and I am happy to forget about the old one. There is though a breaking change to cross when you need to add all the deps that were permitted to be missing, the first time this is enabled. I don't know if this fits with dune policy about breaking changes in general. Perhaps this default can be changed when reaching dune version 4.x?
Desired Behavior
I recently started using the new
(implicit_transitive_deps false)
with dune3.17
and OCaml 5 (is-H
from5.1
or5.2
?), and I like it a lot. Thanks!One issue I did not foresee, and discovered in CI results is that, for certain repos, the CI matrix checks the build with older ocaml versions, such as
4.14
, and because it uses the same dune config files there, things do not work well (this effectively reverts to a world where-H
is not well supported).Dune files have the ability to restrict stanza based on the OCaml version, via the
enabled_if
construct. I wonder if something similar could be made available indune-project
files.Example
Something like this, which I would put in my
dune-project
file maybe?Currently doesn't work:
Workaround
Maybe I can add a line in the CI script to edit that construct and replace the
false
bytrue
for older ocaml version. I haven't tried this yet.The text was updated successfully, but these errors were encountered: