Re: ocaml-dangling-cmi for ocamlify generated files
2013/5/29 Hendrik Tews <hendrik@askra.de>:
> Hi,
>
> oasis 0.3 src/oasis/OASISData.mlify from which ocamlify generates
> a .ml, which is then compiled. When installing OASISData.cmi in
> the -dev package lintian reports a ocaml-dangling-cmi. The
> trouble is that there is no .mli available or generated and the
> generated .ml file is not readable.
>
> In order to deal with this warning, I would ask upstream to
> supply a .mli file, either by writing it manually or by enhancing
> ocamlify to generate it. One could of course also ignore or
> override this tag for generated .ml files.
That is a good point, I never thought about (as an upstream of oasis
and ocamlify).
So here you have an immediate solution to fix the problem:
- run "ocamlbuild src/oasis/OASISData.inferred.mli" after building the
project (ocaml setup.ml -build)
- copy _build/src/oasis/OASISData.inferred.mli to src/oasis/OASISData.mli
This way you fix the problem of the lintian report, without any
upstream release.
To solve the problem on a longer term, there are two solutions:
1. ocamlify should take as an input file OASISData.mli, with this content:
var oasissys_ml: string (* source "OASISSys.ml" *)
var oasissyslight_ml: string (* source "OASISSysLight.ml" *)
...
2. ocamlify generate the .mli and oasis look for the .mli or
.inferred.mli in _build
2. is probably easier to implement but less readable than 1.
Cheers
Sylvain
Reply to: