Add Julia Pkg server support#117
Open
andrew wants to merge 1 commit into
Open
Conversation
- Implement /julia/* handler for the Pkg server protocol (registries, registry, package, artifact, meta) - Resolve package UUIDs to names by parsing Registry.toml from the General registry tarball, with a hash-guarded background refresh on registry updates - Wire into router, ecosystem list, install page, badge styles - Update README and architecture docs
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #116.
Adds a
/julia/*handler implementing the Julia Pkg server protocol so the proxy can sit behindJULIA_PKG_SERVER. The protocol is small and almost entirely content-addressed:/registries(and.eager/.conservative) is the only mutable endpoint and goes through the metadata cache./registry/{uuid}/{hash},/package/{uuid}/{hash}and/artifact/{hash}are immutable gzip tarballs and are stored as artifacts./metais passed through.Packages are identified on the wire by UUID and git tree hash rather than name and version. To keep the cache and dashboard readable the handler lazily downloads the General registry tarball, parses the
[packages]table fromRegistry.toml, and stores packages under their human name (pkg:julia/Plots@<tree-sha>). The map is held in memory, refreshed in the background whenever a client fetches a newer registry hash, and skipped when the hash is unchanged. Unknown UUIDs fall back to the UUID string.BurntSushi/tomlwas already an indirect dependency and is now direct.Verified locally against Julia 1.12.6 with a fresh depot:
Pkg.add(["JSON3","Zstd_jll"])installs through the proxy including the Zstd binary artifact, and a second install from a wiped depot is served entirely from cache.Cooldown is not supported since the protocol carries no publish timestamps. The name map is in-memory only, so a cold restart while upstream is unreachable will fall back to UUIDs until
/registriesis reachable again; both could be follow-ups if anyone needs them.Docs updated: README ecosystem table, usage section and endpoint list, the dashboard
/installpage, ecosystem filter and badge, and the architecture diagram count.