Skip to content

Commit 2e18a90

Browse files
committed
Fix test to ignore XMLJSONExt for julia version 1.9
1 parent 03d66e3 commit 2e18a90

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

Project.toml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ version = "0.3.4"
77
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
88
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
99

10-
[weakdeps]
11-
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
10+
[compat]
11+
JSON = "0.21"
12+
OrderedCollections = "1.4, 1.5, 1.6"
13+
julia = "1.6"
1214

1315
[extensions]
1416
XMLJSONExt = ["JSON"]
1517

16-
[compat]
17-
JSON = "0.21"
18-
OrderedCollections = "1.4, 1.5"
19-
julia = "1.6"
18+
[extras]
19+
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
20+
21+
[weakdeps]
22+
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"

ext/XMLJSONExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module XMLJSONExt
22

3-
using JSON
3+
isdefined(Base, :get_extension) ? (using JSON) : (using ..JSON)
44
using OrderedCollections
55
using XML
66

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,4 +225,6 @@ end
225225
@test collect(keys(attributes(xyz))) == string.(collect('a':'z'))
226226
end
227227

228-
include("JSONExt.jl")
228+
if isdefined(Base, :get_extension)
229+
include("JSONExt.jl")
230+
end

0 commit comments

Comments
 (0)