-
-
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.
[backports-release-1.11] Allow ext → ext dependency if triggers are a…
… strict superset (#56368) This is an effort at a proper workaround (feature?) to resolve #56204. For example: ```toml [extensions] PlottingExt = "Plots" StatisticsPlottingExt = ["Plots", "Statistics"] ``` Here `StatisticsPlottingExt` is allowed to depend on `PlottingExt` This provides a way to declare `ext → ext` dependencies while still avoiding any extension cycles. The same trick can also be used to make an extension in one package depend on an extension provided in another. We'll also need to land #49891, so that we guarantee these load in the right order.
- Loading branch information
1 parent
23cb128
commit bf5675b
Showing
22 changed files
with
297 additions
and
50 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
32 changes: 32 additions & 0 deletions
32
test/project/Extensions/CrossPackageExtToExtDependency/Manifest.toml
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,32 @@ | ||
# This file is machine-generated - editing it directly is not advised | ||
|
||
julia_version = "1.11.1" | ||
manifest_format = "2.0" | ||
project_hash = "dc35c2cf8c6b82fb5b9624c9713c2df34ca30499" | ||
|
||
[[deps.CyclicExtensions]] | ||
deps = ["ExtDep"] | ||
path = "../CyclicExtensions" | ||
uuid = "17d4f0df-b55c-4714-ac4b-55fa23f7355c" | ||
version = "0.1.0" | ||
weakdeps = ["SomePackage"] | ||
|
||
[deps.CyclicExtensions.extensions] | ||
ExtA = ["SomePackage"] | ||
ExtB = ["SomePackage"] | ||
|
||
[[deps.ExtDep]] | ||
deps = ["SomeOtherPackage", "SomePackage"] | ||
path = "../ExtDep.jl" | ||
uuid = "fa069be4-f60b-4d4c-8b95-f8008775090c" | ||
version = "0.1.0" | ||
|
||
[[deps.SomeOtherPackage]] | ||
path = "../SomeOtherPackage" | ||
uuid = "178f68a2-4498-45ee-a775-452b36359b63" | ||
version = "0.1.0" | ||
|
||
[[deps.SomePackage]] | ||
path = "../SomePackage" | ||
uuid = "678608ae-7bb3-42c7-98b1-82102067a3d8" | ||
version = "0.1.0" |
12 changes: 12 additions & 0 deletions
12
test/project/Extensions/CrossPackageExtToExtDependency/Project.toml
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,12 @@ | ||
name = "CrossPackageExtToExtDependency" | ||
uuid = "30f07f2e-c47e-40db-93a2-cbc4d1b301cc" | ||
version = "0.1.0" | ||
|
||
[deps] | ||
CyclicExtensions = "17d4f0df-b55c-4714-ac4b-55fa23f7355c" | ||
|
||
[weakdeps] | ||
SomePackage = "678608ae-7bb3-42c7-98b1-82102067a3d8" | ||
|
||
[extensions] | ||
ExtAB = ["CyclicExtensions", "SomePackage"] |
12 changes: 12 additions & 0 deletions
12
test/project/Extensions/CrossPackageExtToExtDependency/ext/ExtAB.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,12 @@ | ||
module ExtAB | ||
|
||
using CrossPackageExtToExtDependency | ||
using SomePackage | ||
using CyclicExtensions | ||
|
||
const ExtA = Base.get_extension(CyclicExtensions, :ExtA) | ||
if !(ExtA isa Module) | ||
error("expected extension to load") | ||
end | ||
|
||
end |
Oops, something went wrong.
bf5675b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nanosoldier
runtests(["PackageCompiler"])
bf5675b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package evaluation job you requested has completed - possible issues were detected.
The full report is available.