Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform oasis2opam into an OASIS command plugin of OASIS #33

Open
gildor478 opened this issue Dec 9, 2016 · 10 comments
Open

Transform oasis2opam into an OASIS command plugin of OASIS #33

gildor478 opened this issue Dec 9, 2016 · 10 comments

Comments

@gildor478
Copy link
Member

oasis2opam is tightly linked to OASIS and we should make sure it is always in sync with oasis. 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).

@Chris00
Copy link
Member

Chris00 commented Dec 9, 2016

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?

@gildor478
Copy link
Member Author

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.

@Chris00
Copy link
Member

Chris00 commented Dec 9, 2016

Ah, OK. I misunderstood, I thought you wanted oasis2opam to be merged into oasis.

@Chris00
Copy link
Member

Chris00 commented Dec 11, 2016

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

@gildor478
Copy link
Member Author

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...

@Chris00
Copy link
Member

Chris00 commented Dec 12, 2016 via email

@gildor478
Copy link
Member Author

Solved:
ocaml/oasis@63aa763

You can pin the dev-repo in a few hours when opam/testing will be promoted.

@Chris00
Copy link
Member

Chris00 commented Dec 15, 2016

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?

@gildor478
Copy link
Member Author

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.

@Chris00
Copy link
Member

Chris00 commented Jan 2, 2017

OK. Keep me posted about your progress — I can pin oasis when you are ready to test if you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants