Skip to content

Commit 21f2503

Browse files
authored
Update the gen folder (#379)
1 parent f67725b commit 21f2503

File tree

5 files changed

+100
-17
lines changed

5 files changed

+100
-17
lines changed

gen/Manifest.toml

Lines changed: 86 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
julia_version = "1.10.0-DEV"
44
manifest_format = "2.0"
5-
project_hash = "61c6ad9feab9227ef7d89383b05c518b03764044"
5+
project_hash = "7e3329f56df8cd3b8f22c6784358383ddf5c57b0"
66

77
[[deps.ArgTools]]
88
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
@@ -19,6 +19,12 @@ git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90"
1919
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
2020
version = "0.4.2"
2121

22+
[[deps.CSTParser]]
23+
deps = ["Tokenize"]
24+
git-tree-sha1 = "3ddd48d200eb8ddf9cb3e0189fc059fd49b97c1f"
25+
uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f"
26+
version = "3.3.6"
27+
2228
[[deps.Clang]]
2329
deps = ["CEnum", "Clang_jll", "Downloads", "Pkg", "TOML"]
2430
git-tree-sha1 = "ac81f3ea7c53b20d64ad1609a0298d9731fbdcf8"
@@ -31,6 +37,36 @@ git-tree-sha1 = "b88c99c9093f9db49a40d0715ea0e3ae5bbd91f7"
3137
uuid = "0ee61d77-7f21-5576-8119-9fcc46b10100"
3238
version = "14.0.6+2"
3339

40+
[[deps.CommonMark]]
41+
deps = ["Crayons", "JSON", "SnoopPrecompile", "URIs"]
42+
git-tree-sha1 = "e2f4627b0d3f2c1876360e0b242a7c23923b469d"
43+
uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6"
44+
version = "0.8.10"
45+
46+
[[deps.Compat]]
47+
deps = ["UUIDs"]
48+
git-tree-sha1 = "7a60c856b9fa189eb34f5f8a6f6b5529b7942957"
49+
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
50+
version = "4.6.1"
51+
52+
[deps.Compat.extensions]
53+
CompatLinearAlgebraExt = "LinearAlgebra"
54+
55+
[deps.Compat.weakdeps]
56+
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
57+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
58+
59+
[[deps.Crayons]]
60+
git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15"
61+
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
62+
version = "4.1.1"
63+
64+
[[deps.DataStructures]]
65+
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
66+
git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0"
67+
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
68+
version = "0.18.13"
69+
3470
[[deps.Dates]]
3571
deps = ["Printf"]
3672
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
@@ -43,6 +79,11 @@ version = "1.6.0"
4379
[[deps.FileWatching]]
4480
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
4581

82+
[[deps.Glob]]
83+
git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496"
84+
uuid = "c27321d9-0574-5035-807b-f59d2c89b15c"
85+
version = "1.3.1"
86+
4687
[[deps.InteractiveUtils]]
4788
deps = ["Markdown"]
4889
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
@@ -53,6 +94,18 @@ git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1"
5394
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
5495
version = "1.4.1"
5596

97+
[[deps.JSON]]
98+
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
99+
git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e"
100+
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
101+
version = "0.21.3"
102+
103+
[[deps.JuliaFormatter]]
104+
deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "Pkg", "SnoopPrecompile", "Tokenize"]
105+
git-tree-sha1 = "0f6545dd63fec03d0cfe0c1d28f851e2d804e942"
106+
uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
107+
version = "1.0.25"
108+
56109
[[deps.LibCURL]]
57110
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
58111
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
@@ -61,7 +114,7 @@ version = "0.6.3"
61114
[[deps.LibCURL_jll]]
62115
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
63116
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
64-
version = "7.88.1+0"
117+
version = "8.0.1+0"
65118

66119
[[deps.LibGit2]]
67120
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
@@ -87,6 +140,9 @@ deps = ["Artifacts", "Libdl"]
87140
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
88141
version = "2.28.2+0"
89142

143+
[[deps.Mmap]]
144+
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
145+
90146
[[deps.MozillaCACerts_jll]]
91147
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
92148
version = "2023.1.10"
@@ -95,6 +151,17 @@ version = "2023.1.10"
95151
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
96152
version = "1.2.0"
97153

154+
[[deps.OrderedCollections]]
155+
git-tree-sha1 = "d321bf2de576bf25ec4d3e4360faca399afca282"
156+
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
157+
version = "1.6.0"
158+
159+
[[deps.Parsers]]
160+
deps = ["Dates", "SnoopPrecompile"]
161+
git-tree-sha1 = "478ac6c952fddd4399e71d4779797c538d0ff2bf"
162+
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
163+
version = "2.5.8"
164+
98165
[[deps.Pkg]]
99166
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
100167
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
@@ -125,13 +192,19 @@ version = "0.7.0"
125192
[[deps.Serialization]]
126193
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
127194

195+
[[deps.SnoopPrecompile]]
196+
deps = ["Preferences"]
197+
git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c"
198+
uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c"
199+
version = "1.0.3"
200+
128201
[[deps.Sockets]]
129202
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
130203

131204
[[deps.SuiteSparse_jll]]
132205
deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"]
133206
uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
134-
version = "7.0.1+0"
207+
version = "7.0.1+3"
135208

136209
[[deps.TOML]]
137210
deps = ["Dates"]
@@ -143,6 +216,16 @@ deps = ["ArgTools", "SHA"]
143216
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
144217
version = "1.10.0"
145218

219+
[[deps.Tokenize]]
220+
git-tree-sha1 = "90538bf898832b6ebd900fa40f223e695970e3a5"
221+
uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624"
222+
version = "0.5.25"
223+
224+
[[deps.URIs]]
225+
git-tree-sha1 = "074f993b0ca030848b897beff716d93aca60f06a"
226+
uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
227+
version = "1.4.2"
228+
146229
[[deps.UUIDs]]
147230
deps = ["Random", "SHA"]
148231
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

gen/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[deps]
22
Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31"
33
SuiteSparse_jll = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
4+
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"

gen/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
## How to upgrade Clang.jl
77

88
1. `cd` to this directory
9-
2. run `julia --project` and then in the Julia REPL, run `pkg> up`
9+
2. run `julia --project` and then in the Julia REPL, run `pkg> up`

gen/generator.jl

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ using Pkg.Artifacts
44
using Clang.Generators
55
using Clang.Generators.JLLEnvs
66
using SuiteSparse_jll
7+
using JuliaFormatter
78

89
cd(@__DIR__)
910

1011
# headers
1112
include_dir = joinpath(SuiteSparse_jll.artifact_dir, "include") |> normpath
13+
1214
cholmod_h = joinpath(include_dir, "cholmod.h")
1315
@assert isfile(cholmod_h)
1416

@@ -18,15 +20,6 @@ SuiteSparseQR_C_h = joinpath(include_dir, "SuiteSparseQR_C.h")
1820
umfpack_h = joinpath(include_dir, "umfpack.h")
1921
@assert isfile(umfpack_h)
2022

21-
amd_h = joinpath(include_dir, "amd.h")
22-
@assert isfile(amd_h)
23-
24-
colamd_h = joinpath(include_dir, "colamd.h")
25-
@assert isfile(colamd_h)
26-
27-
ccolamd_h = joinpath(include_dir, "ccolamd.h")
28-
@assert isfile(ccolamd_h)
29-
3023
# load common option
3124
options = load_options(joinpath(@__DIR__, "generator.toml"))
3225

@@ -39,9 +32,12 @@ for target in JLLEnvs.JLL_ENV_TRIPLES
3932
args = get_default_args(target)
4033
push!(args, "-I$include_dir")
4134

42-
header_files = [cholmod_h, SuiteSparseQR_C_h, amd_h, colamd_h, ccolamd_h, umfpack_h]
35+
header_files = [cholmod_h, SuiteSparseQR_C_h, umfpack_h]
4336

4437
ctx = create_context(header_files, args, options)
4538

4639
build!(ctx)
40+
41+
path = options["general"]["output_file_path"]
42+
format_file(path, YASStyle())
4743
end

gen/generator.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
[general]
2-
library_name = "libcholmod"
3-
library_names = { "SuiteSparseQR_C.h" = "libspqr", "umfpack.*.h" = "libumfpack", "amd.h" = "libamd", "colamd.h" = "libcolamd", "ccolamd.h" = "libccolamd", "cholmod_camd.h" = "libcholmod"}
2+
library_names = {"SuiteSparseQR_C.h" = "libspqr", "umfpack.h" = "libumfpack", "cholmod.h" = "libcholmod"}
43

54
use_julia_native_enum_type = true
65
use_deterministic_symbol = true
76
auto_mutability = true
87

98
output_ignorelist = [
109
# Clang.jl cannot handle these macro correctly, skip for now.
10+
"UMFPACK_COPYRIGHT",
11+
"UMFPACK_LICENSE_PART1",
12+
"UMFPACK_LICENSE_PART2",
13+
"UMFPACK_LICENSE_PART3",
1114
"SuiteSparse_long",
1215
"SuiteSparse_long_max",
1316
"SuiteSparse_long_id",
@@ -63,4 +66,4 @@ functionlike_macro_includelist = [
6366
"KLU_VERSION_CODE",
6467
"BTF_VERSION_CODE",
6568
"CCOLAMD_VERSION_CODE"
66-
]
69+
]

0 commit comments

Comments
 (0)