Open gildor478 opened 7 years ago
I am not against it. What route should we follow for integration? Also, this will entail some changes to OASIS because, for example, functions added to OASISVersion
(in the Version
module) such as min
, max
,... will need to go into that module (and version_compare
will be deprecated and renamed compare
in order to apply seamlessly the Set
functor). Is it OK with you?
Here is the "documentation": https://github.com/ocaml/oasis/blob/master/HACKING.md#creating-plugins
There is an example in the documentation. You probably don't need to change anything in OASISVersion, because you can keep the exact same structure, except that you'll have an extra library.
I can actually send you a PR with a little bit of shuffling around to create the plugin -- if you can wait for it.
Ah, OK. I misunderstood, I thought you wanted oasis2opam
to be merged into oasis
.
My code depends on Str
. When I try to execute the plugin, I get
E: Dynlink error while loading '2opam': error loading shared library: /home/trch/.opam/4.03.0/lib/ocaml/str.cmxa: invalid ELF header
Can you publish your version to a branch, so that I can test it myself ?
unrelated: can we discuss the '2opam' name, I would vote for to-opam or opam-convert...
On 2016-12-12, Sylvain Le Gall wrote:
Can you publish your version to a branch, so that I can test it myself ?
Here is is: https://github.com/Chris00/oasis2opam/tree/plugin
unrelated: can we discuss the '2opam' name, I would vote for to-opam or opam-convert...
I'd like to keep it reasonably short, so "to-opam" is OK with me.
Solved: https://github.com/ocaml/oasis/commit/63aa7638a6f4c1a9e6428ae1bd63601cbf889290
You can pin the dev-repo in a few hours when opam/testing will be promoted.
It sort of works but I get a segfault if the state has to be synchronized. Way to reproduce:
rm ~/.opam/oasis2opam.cache
oasis 2opam
The same happens when trying to generate the files
oasis 2opam https://github.com/mmottl/sqlite3-ocaml/releases/download/v4.1.0/sqlite3-ocaml-4.1.0.tar.gz
I haven't investigated but may it be due to the unix
dependency — trying to load it while already present in oasis?
Tracking bug: https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=1726&group_id=54&atid=291
I will fix it for OASIS 0.4.9, expect to have to test a few version to make sure it is working before the release.
OK. Keep me posted about your progress — I can pin oasis when you are ready to test if you like.
oasis2opam
is tightly linked to OASIS and we should make sure it is always in sync withoasis
. One way to achieve that, is to make it a plugin of OASIS. In this case we will be sure that the parsing of_oasis
files is up to date.I have been hit by this bug a few time, because oasis2opam was using an old parser from OASIS that didn't handled some special features (like AlphaFeatures and BetaFeatures introduced recently).