Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Feb 15, 2024
1 parent 00f7b3f commit 33d9e2a
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/extensions/circular/A/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name = "A"
uuid = "c8938445-7efa-411c-ba8f-721576f9f47a"
version = "0.1.0"

[deps]
B = "ef00b25e-dd85-47e0-9cd9-ed3c1ff51032"

[weakdeps]
C = "d95b043b-fbe6-48a2-93d2-75fba1b51518"
D = "64e66ba5-e914-4adb-a5f6-036ef0c801f3"

[extensions]
CExt = "C"
DExt = "D"
3 changes: 3 additions & 0 deletions test/extensions/circular/A/ext/CExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module CExt

end # module
3 changes: 3 additions & 0 deletions test/extensions/circular/A/ext/DExt.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module DExt

end # module
3 changes: 3 additions & 0 deletions test/extensions/circular/A/src/A.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module A

end # module
7 changes: 7 additions & 0 deletions test/extensions/circular/B/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name = "B"
uuid = "ef00b25e-dd85-47e0-9cd9-ed3c1ff51032"
version = "0.1.0"

[deps]
C = "d95b043b-fbe6-48a2-93d2-75fba1b51518"
D = "64e66ba5-e914-4adb-a5f6-036ef0c801f3"
3 changes: 3 additions & 0 deletions test/extensions/circular/B/src/B.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module B

end # module
3 changes: 3 additions & 0 deletions test/extensions/circular/C/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name = "C"
uuid = "d95b043b-fbe6-48a2-93d2-75fba1b51518"
version = "0.1.0"
3 changes: 3 additions & 0 deletions test/extensions/circular/C/src/C.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module C

end # module
3 changes: 3 additions & 0 deletions test/extensions/circular/D/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name = "D"
uuid = "64e66ba5-e914-4adb-a5f6-036ef0c801f3"
version = "0.1.0"
3 changes: 3 additions & 0 deletions test/extensions/circular/D/src/D.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module D

end # module
32 changes: 32 additions & 0 deletions test/extensions/circular/Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.11.0-DEV"
manifest_format = "2.0"
project_hash = "6c189c4d9e1e9194c4a4d7627740c379ecff4942"

[[deps.A]]
deps = ["B"]
path = "./A"
uuid = "c8938445-7efa-411c-ba8f-721576f9f47a"
version = "0.1.0"
weakdeps = ["C", "D"]

[deps.A.extensions]
CExt = "C"
DExt = "D"

[[deps.B]]
deps = ["C", "D"]
path = "./B"
uuid = "ef00b25e-dd85-47e0-9cd9-ed3c1ff51032"
version = "0.1.0"

[[deps.C]]
path = "./C"
uuid = "d95b043b-fbe6-48a2-93d2-75fba1b51518"
version = "0.1.0"

[[deps.D]]
path = "./D"
uuid = "64e66ba5-e914-4adb-a5f6-036ef0c801f3"
version = "0.1.0"
5 changes: 5 additions & 0 deletions test/extensions/circular/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
A = "c8938445-7efa-411c-ba8f-721576f9f47a"
B = "ef00b25e-dd85-47e0-9cd9-ed3c1ff51032"
C = "d95b043b-fbe6-48a2-93d2-75fba1b51518"
D = "64e66ba5-e914-4adb-a5f6-036ef0c801f3"
7 changes: 7 additions & 0 deletions test/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,13 @@ end
finally
copy!(LOAD_PATH, old_load_path)
end

# issue 53081
@testset "avoid circular precompilation deadlock through extensions" begin
testenv = joinpath(@__DIR__, "extensions", "circular")
s = read(`$(Base.julia_cmd()) --startup-file=no --project=$testenv -e 'using A'`, String)
@test !occursin("Error during loading of extension", s)
end
finally
try
rm(depot_path, force=true, recursive=true)
Expand Down

0 comments on commit 33d9e2a

Please sign in to comment.