Skip to content

add commit hash information to registry#97

Open
simonbyrne wants to merge 5 commits into
JuliaRegistries:masterfrom
simonbyrne:sb/commit-hash
Open

add commit hash information to registry#97
simonbyrne wants to merge 5 commits into
JuliaRegistries:masterfrom
simonbyrne:sb/commit-hash

Conversation

@simonbyrne

@simonbyrne simonbyrne commented Dec 31, 2023

Copy link
Copy Markdown
Contributor

First part of JuliaLang/Pkg.jl#3718.

This adds 3 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

Comment thread src/register.jl Outdated
@DilumAluthge

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

that seems more complicated?

@simonbyrne

Copy link
Copy Markdown
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.

2 participants