Replies: 1 comment 4 replies
-
|
When you say:
Are you referring to the possibility of someone updating the tag's commit ? The commit of a tag should never be updated on public repository, since the tag has to be seen as a source of truth. But this operation is not forbidden. What does happen when someone is updating the recipe of a brioche package with the git repository tag referred in |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
GitHub offers source
.tar.gzfiles of the tags of a repo. This is really convenient for Brioche, since we can just download and unpack them. Here's a snippet from theripgreppackage:The problem is, these tar files aren't guaranteed to be byte-for-byte identical. In the context of
brioche-packages, this wouldn't necessarily cause an immediate breakage since the registry should save a copy of the downloaded recipes, effectively acting as an archive of the downloads we've used. But, outside thebrioche-packagesrepo this can cause problems if GitHub ends up silently changing a.tar.gzand it has a hash that doesn't match the lockfile. Even withinbrioche-packages, if someone submits a new package (or an update to a package) with one hash in their lockfile, then it gets merged, then the build could fail if the hash changed!We can alternatively use
Brioche.gitRef()plusgit.gitCheckout()to do something that's very similar, as can be seen in this old revision of theasciinemapackage:This works very similarly, but instead of the lockfile recording the file hash of the potentially unstable
.tar.gzfile, it instead records the (hopefully stable) git commit hash. Even if the tag itself changed, the repository should hopefully still have the original commit we were referencingI was inspired to open this Discussion from this PR: #171
Beta Was this translation helpful? Give feedback.
All reactions