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

add commit hash information to registry #97

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

simonbyrne
Copy link
Contributor

@simonbyrne simonbyrne commented Dec 31, 2023

First part of JuliaLang/Pkg.jl#3718.

This adds 4 optional keys to each version:

  • git-commit-sha1: the hash of a git commit object corresponding to the release. This is required if any of the other keys exist.
  • git-tag-name: the name of the git tag
  • subdir: the subdirectory of the tree with respect to the root of the repository.

These should satisfy the following:

  • the tree at subdir of the commit git-commit-sha1 should be git-tree-sha1. In other words, git rev-parse $(git-commit-sha1):$(subdir) == $(git-tree-sha1). If subdir is not defined, then it should be the root tree.
  • the tag git-tag-name should resolve to the commit git-commit-sha1. That is, git rev-parse $(git-tag-name)^{commit} == $(git-commit-sha1)

Unlike git-tree-sha1, these keys should all be considered potentially mutable (i.e. the repository may be modified so that the values of these keys may change).

cc @IanButterworth

src/register.jl Outdated Show resolved Hide resolved
@DilumAluthge
Copy link
Member

Instead of sticking everything at the same level as git-tree-sha, what if we have a sub-dict for all optional metadata, e.g.

versions = Dict()
versions["1.2.3"] = Dict(
    "git-tree-sha1" => "...",
    "optional" => Dict(
        "git-commit-sha1" => "...",
        "some-other-info" => "helloworld",
    ),
)

@simonbyrne
Copy link
Contributor Author

that seems more complicated?

@simonbyrne
Copy link
Contributor Author

I decided against including git-tag-sha1, as it doesn't really add anything.

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

Successfully merging this pull request may close these issues.

None yet

2 participants