Closed agarwal closed 9 years ago
See https://github.com/ocaml/opam-repository/pull/4343 or the discussion.
I do not remember whether "ocaml" "setup.ml" "-install"
install the binaries (it may well) but "ocamlfind" "remove"
will not remove them (oasis
could but it would need the data of the previous compilation). This is why oasis2opam
genrates this .install
file.
Note that since https://github.com/ocaml/oasis2opam/commit/99bee4f8e0d52d1e5091991bea623fc64c36d937 oasis2opam
generates the install
file at the root of the directory.
More generally, we used oasis2opam to generate the opam/ directory, but then modified it manually. That seems wrong.
This is no longer required with the latest oasis2opam.
But that wouldn't allow us to do an opam pin, so that also seems wrong.
Indeed. If you want to be able to "Git pin", then this is needed.
Should we just document that the opam/ directory is auto-generated and should not be manually modified? Is that correct?
Maybe it is enough to add a make target that updates OPAM metadata when _oasis
changes?
Maybe it is enough to add a make target that updates OPAM metadata when
_oasis
changes?
That sounds right. When auto-generated files do need to be checked in for some reason, I usually do:
In our
opam
file, I've now added"cp" "opam/files/oloop.install" "./"
to the install step. But is it necessary, or does the command"ocaml" "setup.ml" "-install"
already do that anyway? Or is there some other better solution?More generally, we used
oasis2opam
to generate theopam/
directory, but then modified it manually. That seems wrong. If theopam/
directory is auto-generated, maybe we shouldn't include it in the repo. But that wouldn't allow us to do anopam pin
, so that also seems wrong. Should we just document that theopam/
directory is auto-generated and should not be manually modified? Is that correct?