2.1.1 added OpamParserTypes.FullPos. Unfortunately, this means that OpamParserTypes is no longer an mli-only module. The Makefile build system attests this:
ocamlopt -c opamParser.ml
File "_none_", line 1:
Warning 58: no cmx file was found in path for module OpamParserTypes, and its interface was not compiled with -opaque
and indeed we get link errors like this:
File "test_parser.ml", line 1:
Error: No implementations provided for the following modules:
OpamParserTypes referenced from opam-file-format.cmxa(OpamParser)
Dune avoids this problem because OpamParser is compiled with -no-alias-deps which removes the link dependency on an implementation for OpamParserTypes. #36 essentially replicates this in the Makefile, but this still doesn't fix the underlying problem:
module F = OpamParserTypes.FullPos
which with both #36 and with Dune leads to:
dra27@summer:~/opam-file-format/src$ ocamlopt opam-file-format.cmxa -o broken broken.ml
File "broken.ml", line 1:
Error: No implementations provided for the following modules:
OpamParserTypes referenced from broken.cmx
unless broken.ml itself is compiled with -no-alias-deps. Note that these modules have no business being compiled with -no-alias-deps (they don't really in Dune either) and compiling everything with -opaque kills cross-module inlining.
So this PR converts OpamParserTypes.mli to OpamParserTypes.ml which should fix the problem in both build systems.
2.1.1 added
OpamParserTypes.FullPos
. Unfortunately, this means thatOpamParserTypes
is no longer an mli-only module. TheMakefile
build system attests this:and indeed we get link errors like this:
Dune avoids this problem because
OpamParser
is compiled with-no-alias-deps
which removes the link dependency on an implementation forOpamParserTypes
. #36 essentially replicates this in theMakefile
, but this still doesn't fix the underlying problem:which with both #36 and with Dune leads to:
unless
broken.ml
itself is compiled with-no-alias-deps
. Note that these modules have no business being compiled with-no-alias-deps
(they don't really in Dune either) and compiling everything with-opaque
kills cross-module inlining.So this PR converts
OpamParserTypes.mli
toOpamParserTypes.ml
which should fix the problem in both build systems.