Skip to content

Add git-tree-{sha1,sha256} (but only for .tar.gz downloads)#64

Merged
DilumAluthge merged 2 commits into
JuliaLang:mainfrom
DilumAluthge-LLM:codex/tarball-git-tree-sha1
Apr 19, 2026
Merged

Add git-tree-{sha1,sha256} (but only for .tar.gz downloads)#64
DilumAluthge merged 2 commits into
JuliaLang:mainfrom
DilumAluthge-LLM:codex/tarball-git-tree-sha1

Conversation

@DilumAluthge-LLM
Copy link
Copy Markdown
Contributor

@DilumAluthge-LLM DilumAluthge-LLM commented Apr 6, 2026

This PR adds treehashes to versions.json.

  • Add treehashes (git-tree-sha1 and git-tree-sha256), but only for .tar.gz files.
  • In the schema, make both fields optional.
  • One old tarball (julia-0.7.0-alpha-linux-i686.tar.gz) is bad (can't be extracted), so we manually skip it.

Motivation

Julia releases (at least, the tar.gz files) are almost artifacts:

  1. They are tarballs (tar.gz).
  2. We have a URL from which the tarball file can be downloaded.
  3. We record the sha256 of the tarball file in versions.json.

The only thing missing is the git-tree-sha1, which this PR adds. (Also, I went ahead and added git-tree-sha256, to future-proof us.)

So, with this PR, I can treat a Julia release tarball as an artifact.

But even putting Artifacts aside, I think this is still useful to have, because it allows you to store Julia versions in a content-addressed way.

🤖 Generated by OpenAI Codex.

@DilumAluthge DilumAluthge changed the title [codex] Add tarball git-tree-sha1 metadata WIP: Add the treehash (git-tree-sha1), but only for tar.gz downloads Apr 6, 2026
Comment thread src/VersionsJSONUtil.jl
number_urls_success += 1
println(stdout, " ✓")

if endswith(filename, ".dmg")
Copy link
Copy Markdown
Member

@DilumAluthge DilumAluthge Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This content (lines 168 through 182) is not new. It used to exist on lines 199 through 213. We've just moved the existing content up (from line 199 to line 168).

We've moved it up so that we can use extension earlier.

Comment thread src/VersionsJSONUtil.jl
end

# Build up metadata about this file
if endswith(filename, ".dmg")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This content (lines 199 through 213) wasn't actually deleted. It was just moved up to line 168.

See also: #64 (comment)

@DilumAluthge-LLM DilumAluthge-LLM force-pushed the codex/tarball-git-tree-sha1 branch from 54d8e04 to ebde551 Compare April 7, 2026 02:43
@DilumAluthge-LLM DilumAluthge-LLM changed the title WIP: Add the treehash (git-tree-sha1), but only for tar.gz downloads Add tarball git-tree-sha1 metadata Apr 7, 2026
@DilumAluthge-LLM DilumAluthge-LLM changed the title Add tarball git-tree-sha1 metadata Add git-tree-sha1 (but only for .tar.gz downloads) Apr 7, 2026
@DilumAluthge-LLM DilumAluthge-LLM force-pushed the codex/tarball-git-tree-sha1 branch from ebde551 to fe6305f Compare April 7, 2026 04:08
@DilumAluthge DilumAluthge changed the title Add git-tree-sha1 (but only for .tar.gz downloads) Add git-tree-{sha1,sha256} (but only for .tar.gz downloads) Apr 7, 2026
@DilumAluthge-LLM DilumAluthge-LLM force-pushed the codex/tarball-git-tree-sha1 branch 3 times, most recently from eb0ec54 to e2550bf Compare April 7, 2026 04:54
@DilumAluthge DilumAluthge force-pushed the codex/tarball-git-tree-sha1 branch from e2550bf to a9e1141 Compare April 10, 2026 04:08
@DilumAluthge
Copy link
Copy Markdown
Member

I have manually reviewed the code in this PR.

@DilumAluthge DilumAluthge marked this pull request as ready for review April 14, 2026 07:21
@DilumAluthge
Copy link
Copy Markdown
Member

@IanButterworth or @fredrikekre Could you review this?

@DilumAluthge
Copy link
Copy Markdown
Member

I want to merge #66 before I merge this, so I'll mark this as draft just to prevent accidental merging, but this PR is indeed ready to be reviewed.

@DilumAluthge DilumAluthge marked this pull request as draft April 17, 2026 06:25
Comment thread src/VersionsJSONUtil.jl Outdated
@DilumAluthge DilumAluthge force-pushed the codex/tarball-git-tree-sha1 branch from 690d021 to 8b4dcae Compare April 18, 2026 19:30
@DilumAluthge DilumAluthge marked this pull request as ready for review April 18, 2026 23:27
@DilumAluthge DilumAluthge added this pull request to the merge queue Apr 18, 2026
@DilumAluthge DilumAluthge removed this pull request from the merge queue due to a manual request Apr 19, 2026
Co-authored-by: OpenAI Codex GPT-5 <codex@openai.com>
@DilumAluthge DilumAluthge force-pushed the codex/tarball-git-tree-sha1 branch from 8b4dcae to 55e3495 Compare April 19, 2026 04:50
@DilumAluthge DilumAluthge added this pull request to the merge queue Apr 19, 2026
Merged via the queue into JuliaLang:main with commit 7fb20f6 Apr 19, 2026
3 checks passed
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.

3 participants