From 8bb1e36a2f7e75df2d7f7f81f22359711131cd2d Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Fri, 17 Apr 2026 00:23:10 -0400 Subject: [PATCH 1/7] When writing the JSON file, print dict keys in a deterministic order (by using `OrderedDict`), and customize the sort order --- src/VersionsJSONUtil.jl | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/src/VersionsJSONUtil.jl b/src/VersionsJSONUtil.jl index 837d348..db8d61d 100644 --- a/src/VersionsJSONUtil.jl +++ b/src/VersionsJSONUtil.jl @@ -2,6 +2,7 @@ module VersionsJSONUtil using HTTP, JSON, Pkg.BinaryPlatforms, WebCacheUtilities, SHA, Lazy import Pkg.BinaryPlatforms: triplet, arch +using OrderedCollections: OrderedDict "Wrapper types to define three jlext methods for portable, tarball and installer Windows" struct WindowsPortable @@ -84,7 +85,7 @@ end # We're going to collect the combinatorial explosion of version/os-arch possible downloads. # We don't have a nice, neat list of what is or is not available, and so we're just going to # try and download each file, and if it exists, yay. Otherwise, bleh. -julia_platforms = [ +const julia_platforms = [ # *-linux-gnu Linux(:x86_64; libc = :glibc), Linux(:i686; libc = :glibc), @@ -135,8 +136,10 @@ end function main(out_path) tags = get_tags() tag_versions = filter(x -> x !== nothing, [vnum_maybe(basename(t["ref"])) for t in tags]) + unique!(tag_versions) + sort!(tag_versions) - meta = Dict() + meta = OrderedDict() number_urls_tried = 0 number_urls_success = 0 for version in tag_versions @@ -171,10 +174,10 @@ function main(out_path) # Initialize overall version key, if needed if !haskey(meta, version) - meta[version] = Dict( - "stable" => is_stable(version), - "files" => Vector{Dict}(), - ) + meta[version] = OrderedDict() + meta[version]["stable"] = is_stable(version) + meta[version]["files"] = Vector{OrderedDict}() + sort!(meta[version]) end # Test to see if there is an asc signature: @@ -211,29 +214,31 @@ function main(out_path) else error("Unsupported file extension in filename: $(filename)") end - file_dict = Dict( - "triplet" => triplet(platform), - "os" => meta_os(platform), - "arch" => string(arch(platform)), - "version" => string(version), - "sha256" => tarball_hash, - "size" => filesize(filepath), - "kind" => kind, - "extension" => extension, - "url" => url, - ) + file_dict = OrderedDict() + file_dict["triplet"] = triplet(platform) + file_dict["os"] = meta_os(platform) + file_dict["arch"] = string(arch(platform)) + file_dict["version"] = string(version) + file_dict["sha256"] = tarball_hash + file_dict["size"] = filesize(filepath) + file_dict["kind"] = kind + file_dict["extension"] = extension + file_dict["url"] = url # Add in `.asc` signature content, if applicable if asc_signature !== nothing file_dict["asc"] = asc_signature end + # Explicitly sort the file_dict + sort!(file_dict) + # Right now, all we have are archives, but let's be forward-thinking # and make this an array of dictionaries that is easy to extensibly match push!(meta[version]["files"], file_dict) # Write out new versions of our versions.json as we go open(out_path, "w") do io - JSON.print(io, meta, 2) + JSON.print(io, meta; pretty_print = true, sort_keys = false) end # Delete downloaded file From 826340615b7bce9d6f2f2c591d3c73bbac6d6180 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 16 Apr 2026 23:53:38 -0400 Subject: [PATCH 2/7] `Project.toml`: Change the version number from `0.1.0` to `0.1.0-DEV` We haven't actually registered the package, so VersionsJSONUtil.jl v0.1.0 doesn't actually exist as a registered version of the package. --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 9269b03..4b690c8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "VersionsJSONUtil" uuid = "a00667fb-7e89-46d8-a4ce-9a732f2f8be9" authors = ["Elliot Saba ", "Sascha Mann "] -version = "0.1.0" +version = "0.1.0-DEV" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" From 676b4e1efdda938b728d6aaba4d28da120c16cdd Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Fri, 17 Apr 2026 00:02:37 -0400 Subject: [PATCH 3/7] `Project.toml`: Add `[compat]` entries for all non-stdlib direct deps --- Project.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Project.toml b/Project.toml index 4b690c8..52a133e 100644 --- a/Project.toml +++ b/Project.toml @@ -14,6 +14,12 @@ TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53" WebCacheUtilities = "0c1c26de-fc5f-47ff-87a8-a157289a9bac" [compat] +HTTP = "1" +JSON = "1" +Lazy = "0.15" +OrderedCollections = "1" +TimeZones = "1" +WebCacheUtilities = "0.1" julia = "1.6" [extras] From 0cf9f2537b47aacec4930de71e673a2c492dba19 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Fri, 17 Apr 2026 00:31:08 -0400 Subject: [PATCH 4/7] Add a very basic Makefile so that we can just do `make versions.json` This is really just for convenience --- .github/workflows/CI.yml | 6 +----- Makefile | 11 +++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 Makefile diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 15643e0..8ff1090 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -76,11 +76,7 @@ jobs: - run: rm -f versions.json - name: Build versions.json - run: | - using VersionsJSONUtil - - VersionsJSONUtil.main("versions.json") - shell: julia --project {0} + run: make versions.json - name: Validate versions.json against schema run: npx -p ajv-cli@3.3.0 ajv -s schema.json -d versions.json diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..aaeabe9 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +# Usage: make versions.json + +JULIA ?= julia +1.10 + +# This is the default target: +# It's a phony target because you might want to re-build versions.json even if none of the +# files in this repo have changed. +.PHONY: versions.json +versions.json: + JULIA_LOAD_PATH='@:@stdlib' $(JULIA) --startup-file=no --project -e 'import Pkg; Pkg.instantiate(); Pkg.precompile()' + JULIA_LOAD_PATH='@' $(JULIA) --startup-file=no --project -e 'import VersionsJSONUtil; VersionsJSONUtil.main("versions.json")' From 8a5bad50746043b97c6720686cd6fa95afda43ea Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Fri, 17 Apr 2026 00:05:54 -0400 Subject: [PATCH 5/7] Remove all uses of implicit imports; use explicit imports instead --- src/VersionsJSONUtil.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/VersionsJSONUtil.jl b/src/VersionsJSONUtil.jl index db8d61d..a1bbc30 100644 --- a/src/VersionsJSONUtil.jl +++ b/src/VersionsJSONUtil.jl @@ -1,6 +1,13 @@ module VersionsJSONUtil -using HTTP, JSON, Pkg.BinaryPlatforms, WebCacheUtilities, SHA, Lazy +using HTTP: HTTP +using JSON: JSON +using Lazy: Lazy, @forward +using Pkg.BinaryPlatforms: Windows, MacOS, Linux, FreeBSD, libc, wordsize +using SHA: SHA, sha256 +using WebCacheUtilities: WebCacheUtilities, hit_file_cache + +# These two need to be `import` (not `using`), because we add methods to them: import Pkg.BinaryPlatforms: triplet, arch using OrderedCollections: OrderedDict From 924ff292b9e5d16c13cc90ac9f7574a28cfc89a6 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 16 Apr 2026 23:52:17 -0400 Subject: [PATCH 6/7] Do a full `Pkg.update()` and check-in the updated `Manifest.toml` --- Manifest.toml | 56 +++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index e2d74f2..eb077f2 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -22,9 +22,9 @@ version = "0.4.5" [[deps.Adapt]] deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "35ea197a51ce46fcd01c4a44befce0578a1aaeca" +git-tree-sha1 = "0761717147821d696c9470a7a86364b2fbd22fd8" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "4.5.0" +version = "4.5.2" weakdeps = ["SparseArrays", "StaticArrays"] [deps.Adapt.extensions] @@ -193,9 +193,9 @@ version = "1.16.0" [[deps.DataFrames]] deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] -git-tree-sha1 = "d8928e9169ff76c6281f39a659f9bca3a573f24c" +git-tree-sha1 = "5fab31e2e01e70ad66e3e24c968c264d1cf166d6" uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -version = "1.8.1" +version = "1.8.2" [[deps.DataStructures]] deps = ["OrderedCollections"] @@ -241,9 +241,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[deps.Distributions]] deps = ["AliasTables", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "fbcc7610f6d8348428f722ecbe0e6cfe22e672c6" +git-tree-sha1 = "12184a8cf11c7cbd90a4db8b2cb2f7b6f057cc46" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.123" +version = "0.25.124" [deps.Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" @@ -368,9 +368,9 @@ uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" [[deps.GLFW_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll", "libdecor_jll", "xkbcommon_jll"] -git-tree-sha1 = "b7bfd56fa66616138dfe5237da4dc13bbd83c67f" +git-tree-sha1 = "9e0fb9e54594c47f278d75063980e43066e26e20" uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" -version = "3.4.1+0" +version = "3.4.1+1" [[deps.GR]] deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Preferences", "Printf", "Qt6Wayland_jll", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "p7zip_jll"] @@ -526,9 +526,9 @@ version = "1.5.0" [[deps.JpegTurbo_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "b6893345fd6658c8e475d40155789f4860ac3b21" +git-tree-sha1 = "c0c9b76f3520863909825cbecdef58cd63de705a" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" -version = "3.1.4+0" +version = "3.1.5+0" [[deps.JuliaInterpreter]] deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] @@ -550,9 +550,9 @@ version = "3.100.3+0" [[deps.LERC_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "aaafe88dccbd957a8d82f7d05be9b69172e0cee3" +git-tree-sha1 = "17b94ecafcfa45e8360a4fc9ca6b583b049e4e37" uuid = "88015f11-f218-50d7-93a8-a6af411a945d" -version = "4.0.1+0" +version = "4.1.0+0" [[deps.LLVMOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -636,9 +636,9 @@ version = "1.18.0+0" [[deps.Libmount_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "97bbca976196f2a1eb9607131cb108c69ec3f8a6" +git-tree-sha1 = "cc3ad4faf30015a3e8094c9b5b7f19e85bdf2386" uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" -version = "2.41.3+0" +version = "2.42.0+0" [[deps.Libtiff_jll]] deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] @@ -648,9 +648,9 @@ version = "4.7.2+0" [[deps.Libuuid_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "d0205286d9eceadc518742860bf23f703779a3d6" +git-tree-sha1 = "d620582b1f0cbe2c72dd1d5bd195a9ce73370ab1" uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" -version = "2.41.3+0" +version = "2.42.0+0" [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] @@ -796,9 +796,9 @@ version = "1.6.1" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "c9cbeda6aceffc52d8a0017e71db27c7a7c0beaf" +git-tree-sha1 = "2ac022577e5eac7da040de17776d51bb770cd895" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.5.5+0" +version = "3.5.6+0" [[deps.OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] @@ -1023,9 +1023,9 @@ version = "1.3.1" [[deps.Revise]] deps = ["CodeTracking", "FileWatching", "InteractiveUtils", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Preferences", "REPL", "UUIDs"] -git-tree-sha1 = "a44fc6ab46efc588f122ee71d6e2ca83b8645ff7" +git-tree-sha1 = "5f4f629c085b87e71125eec6773f5f872c74a47a" uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" -version = "3.14.1" +version = "3.14.2" weakdeps = ["Distributed"] [deps.Revise.extensions] @@ -1168,9 +1168,9 @@ version = "0.4.4" [[deps.StructUtils]] deps = ["Dates", "UUIDs"] -git-tree-sha1 = "fa95b3b097bcef5845c142ea2e085f1b2591e92c" +git-tree-sha1 = "aab80fbf866600f3299dd7f6656d80e7be177cfe" uuid = "ec057cc2-7a8d-4b58-b3b3-92acb9f63b42" -version = "2.7.1" +version = "2.7.2" [deps.StructUtils.extensions] StructUtilsMeasurementsExt = ["Measurements"] @@ -1318,9 +1318,9 @@ version = "1.6.1" [[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "9cce64c0fdd1960b597ba7ecda2950b5ed957438" +git-tree-sha1 = "b29c22e245d092b8b4e8d3c09ad7baa586d9f573" uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" -version = "5.8.2+0" +version = "5.8.3+0" [[deps.Xorg_libICE_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1491,9 +1491,9 @@ version = "0.61.1+0" [[deps.libaom_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "371cc681c00a3ccc3fbc5c0fb91f58ba9bec1ecf" +git-tree-sha1 = "850b06095ee71f0135d644ffd8a52850699581ed" uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" -version = "3.13.1+0" +version = "3.13.3+0" [[deps.libass_jll]] deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Zlib_jll"] @@ -1538,9 +1538,9 @@ version = "1.28.1+0" [[deps.libpng_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] -git-tree-sha1 = "e2a7072fc0cdd7949528c1455a3e5da4122e1153" +git-tree-sha1 = "e51150d5ab85cee6fc36726850f0e627ad2e4aba" uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" -version = "1.6.56+0" +version = "1.6.58+0" [[deps.libva_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll", "Xorg_libXfixes_jll", "libdrm_jll"] From 51876ee1e9a625c1626f1dffd8c44b09198a4439 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 16 Apr 2026 23:55:13 -0400 Subject: [PATCH 7/7] Add OrderedCollections.jl as a direct dependency --- Manifest.toml | 2 +- Project.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Manifest.toml b/Manifest.toml index eb077f2..b0b26a4 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.10.11" manifest_format = "2.0" -project_hash = "55efac5eb5e37942e9cd8fef54ac706b62080e7c" +project_hash = "cd1e7f27b424fe3225fdd0934f3bacdc1278b230" [[deps.AbstractFFTs]] deps = ["LinearAlgebra"] diff --git a/Project.toml b/Project.toml index 52a133e..d6c3e34 100644 --- a/Project.toml +++ b/Project.toml @@ -8,6 +8,7 @@ Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3" JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" Lazy = "50d2b5c4-7a5e-59d5-8109-a42b560f39c0" +OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53"