opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
This package correctly contains ocaml-option-bytecode-only in bothdepends and depopts. It is a limited dependency and if arch != "x86_32" it must be treated as a depopt in order to trigger a recompilation. This scheme above does not trigger lint error 31, because the use of ocaml-option-bytecode-only in depends is guarded with a filter.
Upgrades for Windows packaging change this pattern slightly, adding an additional depends formula:
This does trigger lint error 31, and this is an error. Lint error 31 should only trigger when we can prove that the package atom is always a dependency. Likewise, it should not trigger for a formula such as ("ocaml-arch-x86_64" | "ocaml-arch-x86_32" & "ocaml-option-bytecode-only") i.e. it's not just about the presence of a filter - the point is that there is a way of satisfying the dependency formula which does not depend on ocaml-option-bytecode-only so it's valid in the depopt list.
I'm not sure why this has always been an error, rather than a warning, though @AltGr? I've worked around it in the compiler packages simply by adding an unnecessary {os = "win32"} to the "ocaml-option-bytecode-only".
The compiler's packages presently contain:
This package correctly contains
ocaml-option-bytecode-only
in bothdepends
anddepopts
. It is a limited dependency and ifarch != "x86_32"
it must be treated as adepopt
in order to trigger a recompilation. This scheme above does not trigger lint error 31, because the use ofocaml-option-bytecode-only
independs
is guarded with a filter.Upgrades for Windows packaging change this pattern slightly, adding an additional depends formula:
This does trigger lint error 31, and this is an error. Lint error 31 should only trigger when we can prove that the package atom is always a dependency. Likewise, it should not trigger for a formula such as
("ocaml-arch-x86_64" | "ocaml-arch-x86_32" & "ocaml-option-bytecode-only")
i.e. it's not just about the presence of a filter - the point is that there is a way of satisfying the dependency formula which does not depend onocaml-option-bytecode-only
so it's valid in the depopt list.I'm not sure why this has always been an error, rather than a warning, though @AltGr? I've worked around it in the compiler packages simply by adding an unnecessary
{os = "win32"}
to the"ocaml-option-bytecode-only"
.