Drop WebCacheUtilities (and Lazy, TimeZones) - #106
Open
KristofferC wants to merge 3 commits into
Open
Conversation
VersionsJSONUtil used exactly two functions from WebCacheUtilities: download_to_cache and hit_file_cache, a ~30-line mtime-TTL file cache. That dependency pulled in Plots, StatsPlots, DataFrames, CSV, Gumbo and friends -- the Manifest shrinks from 253 packages to 51 (fixes #105). The TTL cache was also an active bug in CI: it stores its data inside the installed package directory, which julia-actions/cache snapshots into the depot cache, so a julia_tags.json cached in an earlier run survives into later runs. A workflow_dispatch with only-version=1.10.12 today failed with "1.10.12 is not a tag" because the restored tag list predated the tag push. get_tags() now always fetches fresh, and file downloads go to a plain mktempdir() -- caching bought nothing in CI anyway, since every run starts on a fresh runner. Also replaced Lazy's @forward with a small @eval loop (its only use) and removed TimeZones, which was not referenced in the source at all. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| "https://api.github.com/repos/JuliaLang/julia/git/refs/tags", | ||
| ) | ||
| JSON.parse(String(read(tags_json_path))) | ||
| response = HTTP.get("https://api.github.com/repos/JuliaLang/julia/git/refs/tags") |
Member
There was a problem hiding this comment.
- It would be nice to have the ability to authenticate this GitHub API call with a read-only token. We could use GitHub.jl, or do it manually.
- How does pagination work here? What if the list of tags is too long to fit into one page?
Member
Author
There was a problem hiding this comment.
-
Added (but using HTTP.jl)
-
This endpoint is not paginated.
Co-authored-by: Dilum Aluthge <5619885+DilumAluthge@users.noreply.github.com>
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 #105.
VersionsJSONUtil used exactly two functions from WebCacheUtilities —
download_to_cacheandhit_file_cache, a ~30-line mtime-TTL file cache — but that dependency pulls in Plots, StatsPlots, DataFrames, CSV, Gumbo and friends. With it gone (along withLazy, used only for three@forwardmacros, andTimeZones, which was not referenced in the source at all), the Manifest shrinks from 253 packages to 51.The TTL cache was also an active bug in CI, not just bloat: it stores its data inside the installed package directory, which
julia-actions/cachesnapshots into the depot cache, so ajulia_tags.jsoncached in one run survives into later runs and is trusted for 24h of mtime. Today'sworkflow_dispatchwithonly-version=1.10.12failed with1.10.12 is not a tag in the JuliaLang/julia repository(run) because the restored tag list predated the tag push; it only succeeded after manually deleting the Actions caches.Changes:
get_tags()now always fetches the tag list fresh (one API call per run).mktempdir(); the sha256/tree-hash results are computed directly instead of being cached to files. Caching bought nothing in CI anyway — every run starts on a fresh runner, and the depot cache preserving it across runs is exactly the failure mode above.Lazy.@forwardreplaced by a small@evalloop.Tests pass locally (51/51 on Julia 1.10), plus a manual smoke test of
get_tags()(sees v1.10.12),download_file(success + non-200 throws), and the wrappertriplet/archforwarding.🤖 Generated with Claude Code