-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Should opam file generation use promotion #2966
Comments
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. |
Yeah, not committing |
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. |
We are focusing on the 2.1.0 beta release expected on february. Once done, I'll focus on the opam file generation. |
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 thedune-project
file sincedune 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.
The text was updated successfully, but these errors were encountered: