Desired Behavior
When we pin a git repo:
(lang dune 3.21)
(pin
(url "git+file://$PWD/_repo")
(package (name foo)))
(package
(name main)
(depends foo))
then at the moment locking will lock the repo URL. But it will not record the revision:
(version dev)
(build (all_platforms ((dune))))
(source
(fetch
(url git+file:///$PWD/_repo)))
(dev)
This means that lock files containing a git repo will
- Not be reproducible
- Require pulling the pinned git repo every time
What we want is to is that the revision is fixed at lock-time thus build will always use the same locked revision.
Example
This is how the pin of a git-repo should be recorded in a lock file:
(version dev)
(build (all_platforms ((dune))))
(source
(fetch
(url git+file:///$PWD/_repo#0123456789abcdef)))
(dev)
Desired Behavior
When we pin a git repo:
then at the moment locking will lock the repo URL. But it will not record the revision:
This means that lock files containing a git repo will
What we want is to is that the revision is fixed at lock-time thus
buildwill always use the same locked revision.Example
This is how the pin of a git-repo should be recorded in a lock file: