Open braindevices opened 4 years ago
This is an old issue, but I am interested in such a mechanism as well.
At work, most of our applications have half a dozen subprojects, which are checked out at "master" or some LST branches. For reproducibility, it would be great to have a "lock" mechanism like Rust's "cargo.lock", Julia's "Manifest.toml" or nix's "flake.lock".
For meson I could imagine something like this:
A "meson.lock" file, located in the subprojects folder, would contain the exact commit of all dependencies. It is either always generated, when the subprojects change, e.g. on meson subprojects update
or on first meson setup builddir
, or it could be only created by a command as suggested above: meson subprojects freeze
.
A complementary command, e.g. meson subprojects instantiate
, would then allow to set the subprojects to their locked version.
This gets you the reproducibility benefits of version pinning without the downsides (because it is opt-in).
In some projects the wrap file revision is: master, develop or some other branches which actually in progress constantly. When we are working on those projects, every single clone can be different from each other. In many cases for example create a release branch or tag, we need to change the revision to an actual commit/tag. Currently I need to manually change it. If there are many subprojects this can be very tedious and error prone. If we create a meson command like
meson subprojects freeze
, which automatically detect the current commits/tags of local subprojects then change the wrap's revisions to them, it would be very helpful.What do you think?