Skip to content

Commit 1dd4a45

Browse files
timholyvtjnashKristofferC
authored
Support PrecompileTools on nightly (#47)
xref JuliaLang/julia#57074 The old `Compiler.Timings` infrastructure is disabled, so here we leverage the same `newly_compiled` infrastructure used during precompilation. Because the implementation is so fundamentally different, this makes the upcoming Julia 1.12 the minimum required version for new development in this package. --------- Co-authored-by: Jameson Nash <[email protected]> Co-authored-by: Kristoffer <[email protected]>
1 parent e11b408 commit 1dd4a45

File tree

7 files changed

+269
-285
lines changed

7 files changed

+269
-285
lines changed

.github/workflows/CI.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
version:
21-
- '1.0'
22-
- '1.6'
23-
- '1'
21+
- '1.12-nightly' # FIXME change to 1.12 when released
2422
- 'nightly'
2523
os:
2624
- ubuntu-latest
@@ -49,7 +47,7 @@ jobs:
4947
- uses: actions/checkout@v4
5048
- uses: julia-actions/setup-julia@v2
5149
with:
52-
version: '1'
50+
version: 'nightly'
5351
- uses: julia-actions/julia-buildpkg@v1
5452
- uses: julia-actions/julia-docdeploy@v1
5553
env:

Project.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name = "PrecompileTools"
22
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
33
authors = ["Tim Holy <[email protected]>", "t-bltg <[email protected]>", "and contributors"]
4-
version = "1.2.1"
4+
version = "1.3.0"
55

66
[deps]
77
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
88

99
[compat]
1010
Preferences = "1"
11-
julia = "1"
11+
julia = "1.12"
1212

1313
[extras]
1414
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

docs/Manifest.toml

+88-52
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,41 @@
11
# This file is machine-generated - editing it directly is not advised
22

3-
julia_version = "1.10.0"
3+
julia_version = "1.13.0-DEV"
44
manifest_format = "2.0"
5-
project_hash = "6fd069b8f2a6f80151541100222c8411b19a2545"
5+
project_hash = "333a4266b4d44fdbc59a46e944e3f36458e24359"
66

77
[[deps.ANSIColoredPrinters]]
88
git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c"
99
uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9"
1010
version = "0.0.1"
1111

1212
[[deps.AbstractTrees]]
13-
git-tree-sha1 = "faa260e4cb5aba097a73fab382dd4b5819d8ec8c"
13+
git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177"
1414
uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
15-
version = "0.4.4"
15+
version = "0.4.5"
1616

1717
[[deps.ArgTools]]
1818
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
19-
version = "1.1.1"
19+
version = "1.1.2"
2020

2121
[[deps.Artifacts]]
2222
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
23+
version = "1.11.0"
2324

2425
[[deps.Base64]]
2526
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
27+
version = "1.11.0"
28+
29+
[[deps.CodecZlib]]
30+
deps = ["TranscodingStreams", "Zlib_jll"]
31+
git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9"
32+
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
33+
version = "0.7.8"
2634

2735
[[deps.Dates]]
2836
deps = ["Printf"]
2937
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
38+
version = "1.11.0"
3039

3140
[[deps.DocStringExtensions]]
3241
deps = ["LibGit2"]
@@ -35,136 +44,142 @@ uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
3544
version = "0.9.3"
3645

3746
[[deps.Documenter]]
38-
deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "Test", "Unicode"]
39-
git-tree-sha1 = "2613dbec8f4748273bbe30ba71fd5cb369966bac"
47+
deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"]
48+
git-tree-sha1 = "30f520c66490393bf4e4ff2bb144db65f569d974"
4049
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
41-
version = "1.2.1"
50+
version = "1.9.0"
4251

4352
[[deps.Downloads]]
4453
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
4554
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
46-
version = "1.6.0"
55+
version = "1.7.0"
4756

4857
[[deps.Expat_jll]]
4958
deps = ["Artifacts", "JLLWrappers", "Libdl"]
50-
git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c"
59+
git-tree-sha1 = "d55dffd9ae73ff72f1c0482454dcf2ec6c6c4a63"
5160
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
52-
version = "2.5.0+0"
61+
version = "2.6.5+0"
5362

5463
[[deps.FileWatching]]
5564
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
65+
version = "1.11.0"
5666

5767
[[deps.Git]]
5868
deps = ["Git_jll"]
59-
git-tree-sha1 = "51764e6c2e84c37055e846c516e9015b4a291c7d"
69+
git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e"
6070
uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
61-
version = "1.3.0"
71+
version = "1.3.1"
6272

6373
[[deps.Git_jll]]
6474
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"]
65-
git-tree-sha1 = "b30c473c97fcc1e1e44fab8f3e88fd1b89c9e9d1"
75+
git-tree-sha1 = "399f4a308c804b446ae4c91eeafadb2fe2c54ff9"
6676
uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
67-
version = "2.43.0+0"
77+
version = "2.47.1+0"
6878

6979
[[deps.IOCapture]]
7080
deps = ["Logging", "Random"]
71-
git-tree-sha1 = "8b72179abc660bfab5e28472e019392b97d0985c"
81+
git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770"
7282
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
73-
version = "0.2.4"
83+
version = "0.2.5"
7484

7585
[[deps.InteractiveUtils]]
7686
deps = ["Markdown"]
7787
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
88+
version = "1.11.0"
7889

7990
[[deps.JLLWrappers]]
8091
deps = ["Artifacts", "Preferences"]
81-
git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca"
92+
git-tree-sha1 = "a007feb38b422fbdab534406aeca1b86823cb4d6"
8293
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
83-
version = "1.5.0"
94+
version = "1.7.0"
8495

8596
[[deps.JSON]]
8697
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
8798
git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a"
8899
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
89100
version = "0.21.4"
90101

102+
[[deps.JuliaSyntaxHighlighting]]
103+
deps = ["StyledStrings"]
104+
uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011"
105+
version = "1.12.0"
106+
91107
[[deps.LazilyInitializedFields]]
92-
git-tree-sha1 = "8f7f3cabab0fd1800699663533b6d5cb3fc0e612"
108+
git-tree-sha1 = "0f2da712350b020bc3957f269c9caad516383ee0"
93109
uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf"
94-
version = "1.2.2"
110+
version = "1.3.0"
95111

96112
[[deps.LibCURL]]
97113
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
98114
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
99115
version = "0.6.4"
100116

101117
[[deps.LibCURL_jll]]
102-
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
118+
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"]
103119
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
104-
version = "8.4.0+0"
120+
version = "8.12.1+1"
105121

106122
[[deps.LibGit2]]
107-
deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"]
123+
deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"]
108124
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
125+
version = "1.11.0"
109126

110127
[[deps.LibGit2_jll]]
111-
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"]
128+
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"]
112129
uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5"
113-
version = "1.6.4+0"
130+
version = "1.9.0+0"
114131

115132
[[deps.LibSSH2_jll]]
116-
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
133+
deps = ["Artifacts", "Libdl", "OpenSSL_jll"]
117134
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
118-
version = "1.11.0+1"
135+
version = "1.11.3+1"
119136

120137
[[deps.Libdl]]
121138
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
139+
version = "1.11.0"
122140

123141
[[deps.Libiconv_jll]]
124142
deps = ["Artifacts", "JLLWrappers", "Libdl"]
125-
git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175"
143+
git-tree-sha1 = "be484f5c92fad0bd8acfef35fe017900b0b73809"
126144
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
127-
version = "1.17.0+0"
145+
version = "1.18.0+0"
128146

129147
[[deps.Logging]]
130148
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
149+
version = "1.11.0"
131150

132151
[[deps.Markdown]]
133-
deps = ["Base64"]
152+
deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"]
134153
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
154+
version = "1.11.0"
135155

136156
[[deps.MarkdownAST]]
137157
deps = ["AbstractTrees", "Markdown"]
138158
git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899"
139159
uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391"
140160
version = "0.1.2"
141161

142-
[[deps.MbedTLS_jll]]
143-
deps = ["Artifacts", "Libdl"]
144-
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
145-
version = "2.28.2+1"
146-
147162
[[deps.Mmap]]
148163
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
164+
version = "1.11.0"
149165

150166
[[deps.MozillaCACerts_jll]]
151167
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
152-
version = "2023.1.10"
168+
version = "2024.12.31"
153169

154170
[[deps.NetworkOptions]]
155171
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
156-
version = "1.2.0"
172+
version = "1.3.0"
157173

158174
[[deps.OpenSSL_jll]]
159-
deps = ["Artifacts", "JLLWrappers", "Libdl"]
160-
git-tree-sha1 = "60e3045590bd104a16fefb12836c00c0ef8c7f8c"
175+
deps = ["Artifacts", "Libdl"]
161176
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
162-
version = "3.0.13+0"
177+
version = "3.0.16+0"
163178

164179
[[deps.PCRE2_jll]]
165180
deps = ["Artifacts", "Libdl"]
166181
uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15"
167-
version = "10.42.0+1"
182+
version = "10.44.0+1"
168183

169184
[[deps.Parsers]]
170185
deps = ["Dates", "PrecompileTools", "UUIDs"]
@@ -173,33 +188,40 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
173188
version = "2.8.1"
174189

175190
[[deps.Pkg]]
176-
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
191+
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"]
177192
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
178-
version = "1.10.0"
193+
version = "1.12.0"
194+
weakdeps = ["REPL"]
195+
196+
[deps.Pkg.extensions]
197+
REPLExt = "REPL"
179198

180199
[[deps.PrecompileTools]]
181200
deps = ["Preferences"]
182-
path = ".."
201+
git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f"
183202
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
184-
version = "1.2.0"
203+
version = "1.2.1"
185204

186205
[[deps.Preferences]]
187206
deps = ["TOML"]
188-
git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e"
207+
git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6"
189208
uuid = "21216c6a-2e73-6563-6e65-726566657250"
190-
version = "1.4.1"
209+
version = "1.4.3"
191210

192211
[[deps.Printf]]
193212
deps = ["Unicode"]
194213
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
214+
version = "1.11.0"
195215

196216
[[deps.REPL]]
197-
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
217+
deps = ["InteractiveUtils", "JuliaSyntaxHighlighting", "Markdown", "Sockets", "StyledStrings", "Unicode"]
198218
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
219+
version = "1.11.0"
199220

200221
[[deps.Random]]
201222
deps = ["SHA"]
202223
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
224+
version = "1.11.0"
203225

204226
[[deps.RegistryInstances]]
205227
deps = ["LazilyInitializedFields", "Pkg", "TOML", "Tar"]
@@ -213,9 +235,15 @@ version = "0.7.0"
213235

214236
[[deps.Serialization]]
215237
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
238+
version = "1.11.0"
216239

217240
[[deps.Sockets]]
218241
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
242+
version = "1.11.0"
243+
244+
[[deps.StyledStrings]]
245+
uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b"
246+
version = "1.11.0"
219247

220248
[[deps.TOML]]
221249
deps = ["Dates"]
@@ -230,25 +258,33 @@ version = "1.10.0"
230258
[[deps.Test]]
231259
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
232260
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
261+
version = "1.11.0"
262+
263+
[[deps.TranscodingStreams]]
264+
git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742"
265+
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
266+
version = "0.11.3"
233267

234268
[[deps.UUIDs]]
235269
deps = ["Random", "SHA"]
236270
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
271+
version = "1.11.0"
237272

238273
[[deps.Unicode]]
239274
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
275+
version = "1.11.0"
240276

241277
[[deps.Zlib_jll]]
242278
deps = ["Libdl"]
243279
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
244-
version = "1.2.13+1"
280+
version = "1.3.1+2"
245281

246282
[[deps.nghttp2_jll]]
247283
deps = ["Artifacts", "Libdl"]
248284
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
249-
version = "1.52.0+1"
285+
version = "1.65.0+0"
250286

251287
[[deps.p7zip_jll]]
252288
deps = ["Artifacts", "Libdl"]
253289
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
254-
version = "17.4.0+2"
290+
version = "17.5.0+2"

src/PrecompileTools.jl

+5-14
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
module PrecompileTools
22

3-
if VERSION >= v"1.6"
4-
using Preferences
5-
end
3+
using Preferences
4+
65
export @setup_workload, @compile_workload, @recompile_invalidations
76

87
const verbose = Ref(false) # if true, prints all the precompiles
9-
const have_inference_tracking = isdefined(Core.Compiler, :__set_measure_typeinf)
10-
const have_force_compile = isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("#@force_compile"))
118

12-
function precompile_mi(mi)
13-
precompile(mi.specTypes) # TODO: Julia should allow one to pass `mi` directly (would handle `invoke` properly)
9+
function precompile_mi(mi::Core.MethodInstance)
10+
precompile(mi)
1411
verbose[] && println(mi)
1512
return
1613
end
1714

1815
include("workloads.jl")
19-
if VERSION >= v"1.9.0-rc2"
20-
include("invalidations.jl")
21-
else
22-
macro recompile_invalidations(ex::Expr)
23-
return esc(ex)
24-
end
25-
end
16+
include("invalidations.jl")
2617

2718
end

0 commit comments

Comments
 (0)