rems-project/lem

Using lem as a dependency: add an OPAM package to the main repo?

Closed this issue ยท 6 comments

mgree commented

Satisfied lem user here! Thanks for the great work.

I'm currently overhauling Smoosh's build, with the aim of developing an OPAM package. Smoosh uses lem, which means that my OPAM package will need Lem. I see that #24 has already addressed this issue, but I'd like to reopen the question.

Unfortunately, I don't think it's possible for a package in the main OPAM repository to depend on packages in other repositories. I'd prefer not to ask users to have to add extra OPAM repos.

Also unfortunately, GitHub's releases don't include the submodule source, so I can't have Smoosh's OPAM package install lem on the sly (via lem's OPAM script or just copying the build). In the extreme, I could vendor the lem code into my project, but that feels brittle.

Are y'all interested in having a public lem OPAM package? I've got some (recent, hard-won) experience getting OPAM packages to work, and I'd be happy to take a whack at it... but I figured I'd check first.

One important consideration is that naming the package lem in the public OPAM repo may conflict with your setup as long as lem also exists in the rems-project OPAM repo. I figure we could either synchronize our movements or I could name the public package something different, e.g., lem-lang.

In principle, maybe - but I suspect we don't have spare opam-fighting effort right now. I don't think there should be a separate package, which would inevitably slowly diverge and create confusion.

mgree commented

I'm okay with doing the OPAM fighting (for Lem, at least), but I won't start without your approval. I agree that having just one package is immensely preferable.

It's a tough spot for me, though: without a public Lem OPAM package, it seems like any standalone release of Smoosh in OPAM would need vendored code. But I'll investigate the possibility of using extra-source in my OPAM file to download a Lem release. (But I doubt that the OPAM installer will let me install Lem in .opam while building my own project, due to sandboxing rules.)

Do you have a sense of when---either in absolute time or in circumstances---it would make sense to migrate Lem to public OPAM?

mgree commented

Great news! Please let me know if I can help in some way---I have battled the OPAM ogres[^1] and won before, and I'd be happy to do it again.

^[1]: Everyone on the OPAM project is very nice; publishing software is hard.

Should be available now:

https://opam.ocaml.org/packages/lem/

mgree commented

I've migrated to use lem from OPAM and everything works a treat. Thanks! ๐Ÿ˜€