-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prevent loading other extensions when precompiling an extension (#55589)
The current way of loading extensions when precompiling an extension very easily leads to cycles. For example, if you have more than one extension and you happen to transitively depend on the triggers of one of your extensions you will immediately hit a cycle where the extensions will try to load each other indefinitely. This is an issue because you cannot directly influence your transitive dependency graph so from this p.o.v the current system of loading extension is "unsound". The test added here checks this scenario and we can now precompile and load it without any warnings or issues. Would have made #55517 a non issue. Fixes #55557 --------- Co-authored-by: KristofferC <[email protected]>
- Loading branch information
1 parent
17445fe
commit 4da0671
Showing
8 changed files
with
76 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This file is machine-generated - editing it directly is not advised | ||
|
||
julia_version = "1.10.4" | ||
manifest_format = "2.0" | ||
project_hash = "ec25ff8df3a5e2212a173c3de2c7d716cc47cd36" | ||
|
||
[[deps.ExtDep]] | ||
deps = ["SomePackage"] | ||
path = "../ExtDep.jl" | ||
uuid = "fa069be4-f60b-4d4c-8b95-f8008775090c" | ||
version = "0.1.0" | ||
|
||
[[deps.ExtDep2]] | ||
path = "../ExtDep2" | ||
uuid = "55982ee5-2ad5-4c40-8cfe-5e9e1b01500d" | ||
version = "0.1.0" | ||
|
||
[[deps.SomePackage]] | ||
path = "../SomePackage" | ||
uuid = "678608ae-7bb3-42c7-98b1-82102067a3d8" | ||
version = "0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name = "CyclicExtensions" | ||
uuid = "17d4f0df-b55c-4714-ac4b-55fa23f7355c" | ||
version = "0.1.0" | ||
|
||
[deps] | ||
ExtDep = "fa069be4-f60b-4d4c-8b95-f8008775090c" | ||
|
||
[weakdeps] | ||
SomePackage = "678608ae-7bb3-42c7-98b1-82102067a3d8" | ||
|
||
[extensions] | ||
ExtA = ["SomePackage"] | ||
ExtB = ["SomePackage"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module ExtA | ||
|
||
using CyclicExtensions | ||
using SomePackage | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module ExtB | ||
|
||
using CyclicExtensions | ||
using SomePackage | ||
|
||
end |
7 changes: 7 additions & 0 deletions
7
test/project/Extensions/CyclicExtensions/src/CyclicExtensions.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module CyclicExtensions | ||
|
||
using ExtDep | ||
|
||
greet() = print("Hello Cycles!") | ||
|
||
end # module CyclicExtensions |