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

Breaks with dune 1.10 autogenerated opam file #296

Open
Leonidas-from-XIV opened this issue Jun 15, 2019 · 3 comments
Open

Breaks with dune 1.10 autogenerated opam file #296

Leonidas-from-XIV opened this issue Jun 15, 2019 · 3 comments

Comments

@Leonidas-from-XIV
Copy link
Contributor

I was curious to try out the new dune 1.10 feature where it autogenerates the opam file, so I made a branch in my project Leonidas-from-XIV/orewa#4

Unfortunately (but unsurprisingly) the build fails because the repo does not have an opam file anymore and the CI scripts don't know that they have to generate it first.

I'm opening this as an issue, since I don't really know how to tackle this at all, since the existence of an opam file was the underlying premise of this repo. With the new dune we'd need to check for a dune-project file, install dune and attempt to generate an opam file I assume.

If it were for another build system I'd say why bother but since we're talking about dune it would be good to support this usecase which I could imagine becoming popular in the near future.

@avsm
Copy link
Member

avsm commented Jun 25, 2019

You do need to check in the autogenerated opam file at this stage, until ocaml/opam#3797 is addressed in opam (cc @AltGr @dra27 @rjbou). It uses dune promotion so this should hopefully not be too bad.

We could build the opam file here for dev packages though... any opinion on this @rgrinberg?

@dra27
Copy link
Member

dra27 commented Jun 25, 2019

You'll always need to check in an opam file, even when support is added for auto-generation - what will change is that with Dune you would never have change the opam file again.

Note, however, that once the feature does land, you'd still want to be updating the opam file in the repo for a while with fields to remain compatible with users on an earlier version of opam.

(note that you could have no opam file in your repo, but this would depend on the package being published in a repository and having the correct instructions for the repo, so it's not likely to be a recommended thing to do)

@rgrinberg
Copy link
Member

@avsm well I do think it should be a CI failure if you forgot to check in the generated opam file. After all, it's a packaging error.

I wish there was a better way to warn users about this, but in theory this can happen with any file the user can forget to check in.

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

4 participants