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

Should opam file generation use promotion #2966

Open
NathanReb opened this issue Dec 12, 2019 · 5 comments
Open

Should opam file generation use promotion #2966

NathanReb opened this issue Dec 12, 2019 · 5 comments

Comments

@NathanReb
Copy link
Collaborator

I'm opening this following a recent discussion with @rgrinberg.

It's quite easy to forget about opam generation given that the opam file is silently updated whenever one runs dune build. As a result it's also quite easy not to commit the updated opam file when upating the dune-project file since dune build/runtest will just generate the new one and succeed thus not triggering a CI failure. One can always add an explicit check but that's a bit tedious.

If opam generation was done through the promotion mechanism, an out-of-date opam file would trigger a build failure in CI, preventing such mistakes from slipping in!

I'd be happy to work on this change if you think it's a good idea!

I guess there's an issue here though since opam generation isn't a versioned feature and that can be considered a breaking change.

@ghost
Copy link

ghost commented Dec 12, 2019

The proposed behaviour seems good to me. That said I heard that opam devs started working on a feature allowing opam files to be generated on the fly when pinning a package, which would allow to not commit the opam files in the repository at all. We could also wait for that and then we wouldn't have to decide whether this is a breaking change or not.

@NathanReb
Copy link
Collaborator Author

Yeah, not committing .opam files would definitely be the preferred option. Let's wait and see then!

@NathanReb
Copy link
Collaborator Author

Do you have any news from the opam team on that feature? I'm starting to wonder if it wouldn't be worth having a solution to this in dune in the meantime. It could use the dune lang version to determine which behaviour it should have so that it doesn't break anything.

@rgrinberg
Copy link
Member

Let's CC @dra27, @AltGr, @rjbou. They should have some up to date information.

@rjbou
Copy link

rjbou commented Jan 24, 2020

We are focusing on the 2.1.0 beta release expected on february. Once done, I'll focus on the opam file generation.
Related issues ocaml/opam/issues/3793 ocaml/opam/issues/3797 ocaml/opam/issues/2497

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

No branches or pull requests

3 participants