Skip to content

Commit 05fa7f9

Browse files
authored
Merge pull request #2387 from JuliaLang/fe/backports-release-1.6
Backports release 1.6.0
2 parents e7830b5 + e33538f commit 05fa7f9

File tree

6 files changed

+195
-65
lines changed

6 files changed

+195
-65
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ jobs:
3030
- os: macOS-latest
3131
julia-arch: x86
3232
steps:
33-
- uses: actions/[email protected]
33+
- name: Set git to use LF
34+
if: matrix.os == 'windows-latest'
35+
run: |
36+
git config --global core.autocrlf false
37+
git config --global core.eol lf
38+
- uses: actions/checkout@v2
3439
- uses: julia-actions/setup-julia@latest
3540
with:
3641
version: ${{ matrix.julia-version }}

ext/HistoricaStdlibGenerator/Manifest.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
7474
version = "1.0.15"
7575

7676
[[Pkg]]
77-
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs"]
77+
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
7878
path = "../.."
7979
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78e"
8080
version = "1.5.0"
@@ -134,3 +134,7 @@ uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
134134
[[nghttp2_jll]]
135135
deps = ["Artifacts", "Libdl"]
136136
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
137+
138+
[[p7zip_jll]]
139+
deps = ["Artifacts", "Libdl"]
140+
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"

ext/HistoricaStdlibGenerator/generate_historical_stdlibs.jl

Lines changed: 99 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,38 @@ function select_url_hash(data, host = HostPlatform())
3030
end
3131
version_urls = sort(select_url_hash.(values(versions)), by = pair -> pair[1])
3232

33-
function generate_nightly_url(major, minor, host = HostPlatform())
33+
function generate_nightly_url(jlver, host = HostPlatform())
3434
# Map arch
3535
arch_str = Dict("x86_64" => "x64", "i686" => "x86", "aarch64" => "aarch64", "armv7l" => "armv7l", "ppc64le" => "ppc64le")[arch(host)]
3636
# Map OS name
37-
os_str = Dict("linux" => "linux", "windows" => "winnt", "macos" => "macos", "freebsd" => "freebsd")[os(host)]
37+
os_str = Dict("linux" => "linux", "windows" => "winnt", "macos" => "mac", "freebsd" => "freebsd")[os(host)]
3838
# Map wordsize tag
3939
wordsize_str = Dict("x86_64" => "64", "i686" => "32", "aarch64" => "aarch64", "armv7l" => "armv7l", "ppc64le" => "ppc64")[arch(host)]
4040

41+
# If `jlver` is nothing, we don't namespace by version and just get the absolute latest version
42+
ver_str = ""
43+
if jlver !== nothing
44+
ver_str = string(jlver.major, ".", jlver.minor, "/")
45+
end
46+
4147
return string(
4248
"https://julialangnightlies-s3.julialang.org/bin/",
4349
# linux/
4450
os_str, "/",
4551
# x64/
4652
arch_str, "/",
47-
# 1.6/
48-
string(major), ".", string(minor), "/",
53+
# 1.6/ (or nothing, if `jlver === nothing`)
54+
ver_str,
4955
"julia-latest-",
5056
# linux64
51-
os(host), wordsize_str,
57+
os_str, wordsize_str,
5258
".tar.gz",
5359
)
5460
end
5561
highest_release = maximum(VersionNumber.(string.(keys(versions))))
56-
next_release_url = generate_nightly_url(highest_release.major, highest_release.minor + 1)
57-
push!(version_urls, (next_release_url, ""))
62+
next_release = VersionNumber(highest_release.major, highest_release.minor + 1, 0)
63+
push!(version_urls, (generate_nightly_url(next_release), ""))
64+
push!(version_urls, (generate_nightly_url(nothing), ""))
5865
@info("Identified $(length(version_urls)) versions to try...")
5966

6067
# Next, we're going to download each of these to a scratch space
@@ -68,20 +75,56 @@ function get_stdlibs(scratch_dir, julia_installer_name)
6875
installer_path = joinpath(scratch_dir, julia_installer_name)
6976
mktempdir() do dir
7077
@info("Extracting $(julia_installer_name)")
71-
run(`tar -C $(dir) --strip-components=1 -zxf $(installer_path)`)
72-
73-
jlexe = joinpath(dir, "bin", @static Sys.iswindows() ? "julia.exe" : "julia")
74-
jlflags = ["--startup-file=no", "-O0"]
75-
jlvers = VersionNumber(readchomp(`$(jlexe) $(jlflags) -e 'print(VERSION)'`))
76-
jlvers = VersionNumber(jlvers.major, jlvers.minor, jlvers.patch)
77-
@info("Auto-detected Julia version $(jlvers)")
78-
79-
if jlvers < v"1.1"
80-
stdlibs_str = readchomp(`$(jlexe) $(jlflags) -e 'import Pkg; println(repr(Pkg.Types.gather_stdlib_uuids()))'`)
81-
else
82-
stdlibs_str = readchomp(`$(jlexe) $(jlflags) -e 'import Pkg; println(repr(Pkg.Types.load_stdlib()))'`)
78+
mount_dir = joinpath(dir, "mount_dir")
79+
try
80+
if endswith(installer_path, ".dmg")
81+
mkdir(mount_dir)
82+
# Try to mount many times, as this seems to fail randomly
83+
mount_cmd = `hdiutil mount $(installer_path) -mountpoint $(mount_dir)`
84+
tries = 0
85+
while !success(mount_cmd)
86+
if tries > 10
87+
error("Unable to mount via hdiutil!")
88+
end
89+
sleep(0.1)
90+
tries += 1
91+
end
92+
#@show readdir(mount_dir; join=true)
93+
app_dir = first(filter(d -> startswith(basename(d), "Julia-"), readdir(mount_dir; join=true)))
94+
symlink(joinpath(app_dir, "Contents", "Resources", "julia", "bin"), joinpath(dir, "bin"))
95+
elseif endswith(installer_path, ".exe")
96+
error("This script doesn't work with `.exe` downloads")
97+
else
98+
run(`tar -C $(dir) --strip-components=1 -zxf $(installer_path)`)
99+
end
100+
101+
jlexe = joinpath(dir, "bin", @static Sys.iswindows() ? "julia.exe" : "julia")
102+
jlflags = ["--startup-file=no", "-O0"]
103+
jlvers = VersionNumber(readchomp(`$(jlexe) $(jlflags) -e 'print(VERSION)'`))
104+
jlvers = VersionNumber(jlvers.major, jlvers.minor, jlvers.patch)
105+
@info("Auto-detected Julia version $(jlvers)")
106+
107+
if jlvers < v"1.1"
108+
stdlibs_str = readchomp(`$(jlexe) $(jlflags) -e 'import Pkg; println(repr(Pkg.Types.gather_stdlib_uuids()))'`)
109+
else
110+
stdlibs_str = readchomp(`$(jlexe) $(jlflags) -e 'import Pkg; println(repr(Pkg.Types.load_stdlib()))'`)
111+
end
112+
113+
return (jlvers, stdlibs_str)
114+
finally
115+
# Clean up mounted directories
116+
if isdir(mount_dir)
117+
unmount_cmd = `hdiutil detach $(mount_dir)`
118+
tries = 0
119+
while !success(unmount_cmd)
120+
if tries > 10
121+
error("Unable to unmount $(mount_dir)")
122+
end
123+
sleep(0.1)
124+
tries += 1
125+
end
126+
end
83127
end
84-
return (jlvers, stdlibs_str)
85128
end
86129
end
87130

@@ -101,21 +144,37 @@ versions_dict = Dict()
101144
for _ in 1:num_concurrent_downloads
102145
@async begin
103146
for (url, hash) in jobs
104-
fname = joinpath(scratch_dir, basename(url))
105-
if !isfile(fname)
106-
@info("Downloading $(url)")
107-
Downloads.download(url, fname)
108-
end
147+
try
148+
# We might try to download two files that have the same basename
149+
url_tag = bytes2hex(sha256(url))
150+
fname = joinpath(scratch_dir, string(url_tag, "-", basename(url)))
151+
if !isfile(fname)
152+
@info("Downloading $(url)")
153+
Downloads.download(url, fname)
154+
end
109155

110-
if !isempty(hash)
111-
calc_hash = bytes2hex(open(io -> sha256(io), fname, "r"))
112-
if calc_hash != hash
113-
@error("Hash mismatch on $(fname)")
156+
if !isempty(hash)
157+
calc_hash = bytes2hex(open(io -> sha256(io), fname, "r"))
158+
if calc_hash != hash
159+
@error("Hash mismatch on $(fname); deleting and re-downloading")
160+
rm(fname; force=true)
161+
Downloads.download(url, fname)
162+
calc_hash = bytes2hex(open(io -> sha256(io), fname, "r"))
163+
if calc_hash != hash
164+
@error("Hash mismatch on $(fname); re-download failed!")
165+
continue
166+
end
167+
end
114168
end
115-
end
116169

117-
version, stdlibs = get_stdlibs(scratch_dir, basename(url))
118-
versions_dict[version] = eval(Meta.parse(stdlibs))
170+
version, stdlibs = get_stdlibs(scratch_dir, basename(fname))
171+
versions_dict[version] = eval(Meta.parse(stdlibs))
172+
catch e
173+
if isa(e, InterruptException)
174+
rethrow()
175+
end
176+
@error(e, exception=(e, catch_backtrace()))
177+
end
119178
end
120179
end
121180
end
@@ -145,12 +204,12 @@ unregistered_stdlibs = filter(all_stdlibs) do (uuid, name)
145204
end
146205

147206
# Helper function for getting these printed out in a nicely-sorted order
148-
function print_sorted(io::IO, d::Dict)
207+
function print_sorted(io::IO, d::Dict; indent::Int=0)
149208
println(io, "Dict(")
150209
for pair in sort(collect(d), by = kv-> kv[2])
151-
println(io, " ", pair, ",")
210+
println(io, " "^indent, pair, ",")
152211
end
153-
println(io, " ),")
212+
print(io, " "^(max(indent - 4, 0)), ")")
154213
end
155214

156215
output_fname = joinpath(dirname(dirname(@__DIR__)), "src", "HistoricalStdlibs.jl")
@@ -168,18 +227,16 @@ open(output_fname, "w") do io
168227
""")
169228
for v in sorted_versions
170229
print(io, " $(repr(v)) => ")
171-
print_sorted(io, versions_dict[v])
230+
print_sorted(io, versions_dict[v]; indent=8)
231+
println(io, ",")
172232
end
173233
println(io, "]")
174234

175235
print(io, """
176236
# Next, we also embed a list of stdlibs that must _always_ be treated as stdlibs,
177237
# because they cannot be resolved in the registry; they have only ever existed within
178238
# the Julia stdlib source tree, and because of that, trying to resolve them will fail.
179-
const UNREGISTERED_STDLIBS = Dict(
180-
""")
181-
for (uuid, name) in unregistered_stdlibs
182-
println(io, " $(repr(uuid)) => $(repr(name)),")
183-
end
184-
println(io, ")")
239+
const UNREGISTERED_STDLIBS = """)
240+
print_sorted(io, unregistered_stdlibs; indent=4)
241+
println(io)
185242
end

src/HistoricalStdlibs.jl

Lines changed: 79 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -95,37 +95,96 @@ const STDLIBS_BY_VERSION = [
9595
UUID("8e850ede-7688-5339-a07c-302acd2aaf8d") => "nghttp2_jll",
9696
UUID("3f19e933-33d8-53b3-aaab-bd5110c3b7a0") => "p7zip_jll",
9797
),
98+
v"1.7.0" => Dict(
99+
UUID("0dad84c5-d112-42e6-8d28-ef12dabb789f") => "ArgTools",
100+
UUID("56f22d72-fd6d-98f1-02f0-08ddc0907c33") => "Artifacts",
101+
UUID("2a0f44e3-6c83-55bd-87e4-b1978d98bd5f") => "Base64",
102+
UUID("8bf52ea8-c179-5cab-976a-9e18b702a9bc") => "CRC32c",
103+
UUID("e66e0078-7015-5450-92f7-15fbd957f2ae") => "CompilerSupportLibraries_jll",
104+
UUID("ade2ca70-3891-5945-98fb-dc099432e06a") => "Dates",
105+
UUID("8bb1440f-4735-579b-a4ab-409b98df4dab") => "DelimitedFiles",
106+
UUID("8ba89e20-285c-5b6f-9357-94700520ee1b") => "Distributed",
107+
UUID("f43a241f-c20a-4ad4-852c-f6b1247861c6") => "Downloads",
108+
UUID("7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee") => "FileWatching",
109+
UUID("9fa8497b-333b-5362-9e8d-4d0656e87820") => "Future",
110+
UUID("781609d7-10c4-51f6-84f2-b8444358ff6d") => "GMP_jll",
111+
UUID("b77e0a4c-d291-57a0-90e8-8db25a27a240") => "InteractiveUtils",
112+
UUID("47c5dbc3-30ba-59ef-96a6-123e260183d9") => "LLVMLibUnwind_jll",
113+
UUID("4af54fe1-eca0-43a8-85a7-787d91b784e3") => "LazyArtifacts",
114+
UUID("b27032c2-a3e7-50c8-80cd-2d36dbcbfd21") => "LibCURL",
115+
UUID("deac9b47-8bc7-5906-a0fe-35ac56dc84c0") => "LibCURL_jll",
116+
UUID("76f85450-5226-5b5a-8eaa-529ad045b433") => "LibGit2",
117+
UUID("e37daf67-58a4-590a-8e99-b0245dd2ffc5") => "LibGit2_jll",
118+
UUID("29816b5a-b9ab-546f-933c-edad1886dfa8") => "LibSSH2_jll",
119+
UUID("183b4373-6708-53ba-ad28-60e28bb38547") => "LibUV_jll",
120+
UUID("745a5e78-f969-53e9-954f-d19f2f74f4e3") => "LibUnwind_jll",
121+
UUID("8f399da3-3557-5675-b5ff-fb832c97cbdb") => "Libdl",
122+
UUID("37e2e46d-f89d-539d-b4ee-838fcccc9c8e") => "LinearAlgebra",
123+
UUID("56ddb016-857b-54e1-b83d-db4d58db5568") => "Logging",
124+
UUID("3a97d323-0669-5f0c-9066-3539efd106a3") => "MPFR_jll",
125+
UUID("d6f4376e-aef5-505a-96c1-9c027394607a") => "Markdown",
126+
UUID("c8ffd9c3-330d-5841-b78e-0817d7145fa1") => "MbedTLS_jll",
127+
UUID("a63ad114-7e13-5084-954f-fe012c677804") => "Mmap",
128+
UUID("14a3606d-f60d-562e-9121-12d972cd8159") => "MozillaCACerts_jll",
129+
UUID("ca575930-c2e3-43a9-ace4-1e988b2c1908") => "NetworkOptions",
130+
UUID("4536629a-c528-5b80-bd46-f80d51c5b363") => "OpenBLAS_jll",
131+
UUID("05823500-19ac-5b8b-9628-191a04bc5112") => "OpenLibm_jll",
132+
UUID("efcefdf7-47ab-520b-bdef-62a2eaa19f15") => "PCRE2_jll",
133+
UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f") => "Pkg",
134+
UUID("de0858da-6303-5e67-8744-51eddeeeb8d7") => "Printf",
135+
UUID("9abbd945-dff8-562f-b5e8-e1ebf5ef1b79") => "Profile",
136+
UUID("3fa0cd96-eef1-5676-8a61-b3b8758bbffb") => "REPL",
137+
UUID("9a3f8284-a2c9-5f02-9a11-845980a1fd5c") => "Random",
138+
UUID("ea8e919c-243c-51af-8825-aaa63cd721ce") => "SHA",
139+
UUID("9e88b42a-f829-5b0c-bbe9-9e923198166b") => "Serialization",
140+
UUID("1a1011a3-84de-559e-8e89-a11a2f7dc383") => "SharedArrays",
141+
UUID("6462fe0b-24de-5631-8697-dd941f90decc") => "Sockets",
142+
UUID("2f01184e-e22b-5df5-ae63-d93ebab69eaf") => "SparseArrays",
143+
UUID("10745b16-79ce-11e8-11f9-7d13ad32a3b2") => "Statistics",
144+
UUID("4607b0f0-06f3-5cda-b6b1-a6196a1729e9") => "SuiteSparse",
145+
UUID("bea87d4a-7f5b-5778-9afe-8cc45184846c") => "SuiteSparse_jll",
146+
UUID("fa267f1f-6049-4f14-aa54-33bafae1ed76") => "TOML",
147+
UUID("a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e") => "Tar",
148+
UUID("8dfed614-e22c-5e08-85e1-65c5234f0b40") => "Test",
149+
UUID("cf7118a7-6976-5b1a-9a39-7adc72f591a4") => "UUIDs",
150+
UUID("4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5") => "Unicode",
151+
UUID("83775a58-1f1d-513f-b197-d71354ab007a") => "Zlib_jll",
152+
UUID("05ff407c-b0c1-5878-9df8-858cc2e60c36") => "dSFMT_jll",
153+
UUID("8f36deef-c2a5-5394-99ed-8e07531fb29a") => "libLLVM_jll",
154+
UUID("8e850b90-86db-534c-a0d3-1478176c7d93") => "libblastrampoline_jll",
155+
UUID("8e850ede-7688-5339-a07c-302acd2aaf8d") => "nghttp2_jll",
156+
UUID("3f19e933-33d8-53b3-aaab-bd5110c3b7a0") => "p7zip_jll",
157+
),
98158
]
99159
# Next, we also embed a list of stdlibs that must _always_ be treated as stdlibs,
100160
# because they cannot be resolved in the registry; they have only ever existed within
101161
# the Julia stdlib source tree, and because of that, trying to resolve them will fail.
102162
const UNREGISTERED_STDLIBS = Dict(
103-
UUID("9a3f8284-a2c9-5f02-9a11-845980a1fd5c") => "Random",
104-
UUID("10745b16-79ce-11e8-11f9-7d13ad32a3b2") => "Statistics",
105-
UUID("8bb1440f-4735-579b-a4ab-409b98df4dab") => "DelimitedFiles",
106-
UUID("a63ad114-7e13-5084-954f-fe012c677804") => "Mmap",
107-
UUID("8f399da3-3557-5675-b5ff-fb832c97cbdb") => "Libdl",
163+
UUID("2a0f44e3-6c83-55bd-87e4-b1978d98bd5f") => "Base64",
108164
UUID("8bf52ea8-c179-5cab-976a-9e18b702a9bc") => "CRC32c",
165+
UUID("ade2ca70-3891-5945-98fb-dc099432e06a") => "Dates",
166+
UUID("8bb1440f-4735-579b-a4ab-409b98df4dab") => "DelimitedFiles",
167+
UUID("8ba89e20-285c-5b6f-9357-94700520ee1b") => "Distributed",
168+
UUID("7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee") => "FileWatching",
169+
UUID("9fa8497b-333b-5362-9e8d-4d0656e87820") => "Future",
109170
UUID("b77e0a4c-d291-57a0-90e8-8db25a27a240") => "InteractiveUtils",
110-
UUID("de0858da-6303-5e67-8744-51eddeeeb8d7") => "Printf",
171+
UUID("76f85450-5226-5b5a-8eaa-529ad045b433") => "LibGit2",
172+
UUID("8f399da3-3557-5675-b5ff-fb832c97cbdb") => "Libdl",
173+
UUID("37e2e46d-f89d-539d-b4ee-838fcccc9c8e") => "LinearAlgebra",
174+
UUID("56ddb016-857b-54e1-b83d-db4d58db5568") => "Logging",
111175
UUID("d6f4376e-aef5-505a-96c1-9c027394607a") => "Markdown",
112-
UUID("4af54fe1-eca0-43a8-85a7-787d91b784e3") => "LazyArtifacts",
113-
UUID("3fa0cd96-eef1-5676-8a61-b3b8758bbffb") => "REPL",
114-
UUID("6462fe0b-24de-5631-8697-dd941f90decc") => "Sockets",
176+
UUID("a63ad114-7e13-5084-954f-fe012c677804") => "Mmap",
115177
UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f") => "Pkg",
116-
UUID("37e2e46d-f89d-539d-b4ee-838fcccc9c8e") => "LinearAlgebra",
178+
UUID("de0858da-6303-5e67-8744-51eddeeeb8d7") => "Printf",
117179
UUID("9abbd945-dff8-562f-b5e8-e1ebf5ef1b79") => "Profile",
118-
UUID("2a0f44e3-6c83-55bd-87e4-b1978d98bd5f") => "Base64",
119-
UUID("7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee") => "FileWatching",
180+
UUID("3fa0cd96-eef1-5676-8a61-b3b8758bbffb") => "REPL",
181+
UUID("9a3f8284-a2c9-5f02-9a11-845980a1fd5c") => "Random",
120182
UUID("9e88b42a-f829-5b0c-bbe9-9e923198166b") => "Serialization",
121-
UUID("56ddb016-857b-54e1-b83d-db4d58db5568") => "Logging",
183+
UUID("1a1011a3-84de-559e-8e89-a11a2f7dc383") => "SharedArrays",
184+
UUID("6462fe0b-24de-5631-8697-dd941f90decc") => "Sockets",
185+
UUID("2f01184e-e22b-5df5-ae63-d93ebab69eaf") => "SparseArrays",
186+
UUID("10745b16-79ce-11e8-11f9-7d13ad32a3b2") => "Statistics",
187+
UUID("8dfed614-e22c-5e08-85e1-65c5234f0b40") => "Test",
122188
UUID("cf7118a7-6976-5b1a-9a39-7adc72f591a4") => "UUIDs",
123-
UUID("ade2ca70-3891-5945-98fb-dc099432e06a") => "Dates",
124189
UUID("4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5") => "Unicode",
125-
UUID("8dfed614-e22c-5e08-85e1-65c5234f0b40") => "Test",
126-
UUID("9fa8497b-333b-5362-9e8d-4d0656e87820") => "Future",
127-
UUID("76f85450-5226-5b5a-8eaa-529ad045b433") => "LibGit2",
128-
UUID("2f01184e-e22b-5df5-ae63-d93ebab69eaf") => "SparseArrays",
129-
UUID("1a1011a3-84de-559e-8e89-a11a2f7dc383") => "SharedArrays",
130-
UUID("8ba89e20-285c-5b6f-9357-94700520ee1b") => "Distributed",
131190
)

src/Pkg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ in the vector.
457457
Many functions that take a `PackageSpec` or a `Vector{PackageSpec}` can be called with a more concise notation with `NamedTuple`s.
458458
For example, `Pkg.add` can be called either as the explicit or concise versions as:
459459
460-
| Explicit | Concise
460+
| Explicit | Concise |
461461
|:--------------------------------------------------------------------|:-----------------------------------------------|
462462
| `Pkg.add(PackageSpec(name="Package))` | `Pkg.add(name = "Package")` |
463463
| `Pkg.add(PackageSpec(url="www.myhost.com/MyPkg")))` | `Pkg.add(name = "Package")` |

src/Types.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,11 @@ is_stdlib(uuid::UUID) = uuid in keys(stdlibs())
365365

366366
# Allow asking if something is an stdlib for a particular version of Julia
367367
function is_stdlib(uuid::UUID, julia_version::Union{VersionNumber, Nothing})
368+
# Only use the cache if we are asking for stdlibs in a custom Julia version
369+
if julia_version == VERSION
370+
return is_stdlib(uuid)
371+
end
372+
368373
# If this UUID is known to be unregistered, always return `true`
369374
if haskey(UNREGISTERED_STDLIBS, uuid)
370375
return true

0 commit comments

Comments
 (0)