diff --git a/src/project.jl b/src/project.jl index 8682177c00..406de614c1 100644 --- a/src/project.jl +++ b/src/project.jl @@ -179,8 +179,7 @@ function destructure(project::Project)::Dict entry!("uuid", project.uuid) entry!("version", project.version) entry!("manifest", project.manifest) - merge!(project.deps, project._deps_weak) - entry!("deps", project.deps) + entry!("deps", merge(project.deps, project._deps_weak)) entry!("weakdeps", project.weakdeps) entry!("extras", project.extras) entry!("compat", Dict(name => x.str for (name, x) in project.compat)) diff --git a/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/Manifest.toml b/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/Manifest.toml index e7908cbab3..f73c87bf50 100644 --- a/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/Manifest.toml +++ b/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/Manifest.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.0-DEV" +julia_version = "1.11.0-DEV" manifest_format = "2.0" -project_hash = "51e63007fdb8e0cae2b36f0e7b2acebf7b7432a5" +project_hash = "c0b34a2f360e3789aa008772cc2c162a8e9d9850" [[deps.Adapt]] deps = ["LinearAlgebra"] @@ -16,7 +16,7 @@ uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.1+0" +version = "1.0.5+1" [[deps.Example]] git-tree-sha1 = "46e44e869b4d90b96bd8ed1fdcf32244fddfb6cc" @@ -28,11 +28,17 @@ deps = ["Example"] path = "../HasExtensions.jl" uuid = "4d3288b3-3afc-4bb6-85f3-489fffe514c8" version = "0.1.0" -weakdeps = ["OffsetArrays"] +weakdeps = ["IndirectArrays", "OffsetArrays"] [deps.HasExtensions.extensions] + IndirectArraysExt = "IndirectArrays" OffsetArraysExt = "OffsetArrays" +[[deps.IndirectArrays]] +git-tree-sha1 = "012e604e1c7458645cb8b436f8fba789a51b257f" +uuid = "9b13fd28-a010-5f03-acff-a1bbcff69959" +version = "1.0.0" + [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -49,9 +55,9 @@ version = "1.12.8" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+0" +version = "0.3.23+2" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.2.0+0" +version = "5.8.0+1" diff --git a/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/Project.toml b/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/Project.toml index 0e84d99671..1ef6ebe016 100644 --- a/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/Project.toml +++ b/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/Project.toml @@ -4,10 +4,12 @@ version = "0.1.0" [deps] HasExtensions = "4d3288b3-3afc-4bb6-85f3-489fffe514c8" +IndirectArrays = "9b13fd28-a010-5f03-acff-a1bbcff69959" OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" [compat] HasExtensions = "0.1" +IndirectArrays = "1.0" OffsetArrays = "1.12" [extras] diff --git a/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/src/HasDepWithExtensions.jl b/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/src/HasDepWithExtensions.jl index e643e637e9..1f4d5790e1 100644 --- a/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/src/HasDepWithExtensions.jl +++ b/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/src/HasDepWithExtensions.jl @@ -2,14 +2,20 @@ module HasDepWithExtensions using HasExtensions using OffsetArrays: OffsetArray -# Loading OffsetArrays makes the extesion "OffsetArraysExt" to load +# Loading OffsetArrays makes the extesion "OffsetArraysExt" load + +using IndirectArrays: IndirectArray +# Loading IndirectArrays makes the extesion "IndirectArraysExt" load function do_something() - # @info "First do something with the basic array support in B" + # @info "First do something with the basic array support" HasExtensions.foo(rand(Float64, 2)) == 1 || error("Unexpected value") - # @info "Now do something with extended OffsetArray support in B" + # @info "Now do something with extended OffsetArray support" HasExtensions.foo(OffsetArray(rand(Float64, 2), 0:1)) == 2 || error("Unexpected value") + + # @info "Now do something with extended IndirectArray support" + HasExtensions.foo(IndirectArray(rand(1:6, 32, 32), 1:6)) == 3 || error("Unexpected value") end end # module diff --git a/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/test/runtests.jl b/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/test/runtests.jl index 3830320b01..b86eac0bd4 100644 --- a/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/test/runtests.jl +++ b/test/test_packages/ExtensionExamples/HasDepWithExtensions.jl/test/runtests.jl @@ -2,4 +2,5 @@ using HasDepWithExtensions using Test @test HasDepWithExtensions.HasExtensions.offsetarrays_loaded +@test HasDepWithExtensions.HasExtensions.indirectarrays_loaded HasDepWithExtensions.do_something() diff --git a/test/test_packages/ExtensionExamples/HasExtensions.jl/Manifest.toml b/test/test_packages/ExtensionExamples/HasExtensions.jl/Manifest.toml index f9461df371..99d0e0394c 100644 --- a/test/test_packages/ExtensionExamples/HasExtensions.jl/Manifest.toml +++ b/test/test_packages/ExtensionExamples/HasExtensions.jl/Manifest.toml @@ -2,7 +2,7 @@ julia_version = "1.10.0-DEV" manifest_format = "2.0" -project_hash = "549efd0c32255f4b8717f50f49778e183bcc0e36" +project_hash = "8e0de0086d647967f02f7aba44b17d73156d2fee" [[deps.Example]] git-tree-sha1 = "46e44e869b4d90b96bd8ed1fdcf32244fddfb6cc" diff --git a/test/test_packages/ExtensionExamples/HasExtensions.jl/Project.toml b/test/test_packages/ExtensionExamples/HasExtensions.jl/Project.toml index 0687e1fed8..0ee2288bc1 100644 --- a/test/test_packages/ExtensionExamples/HasExtensions.jl/Project.toml +++ b/test/test_packages/ExtensionExamples/HasExtensions.jl/Project.toml @@ -4,19 +4,23 @@ version = "0.1.0" [deps] Example = "7876af07-990d-54b4-ab0e-23690620f79a" +IndirectArrays = "9b13fd28-a010-5f03-acff-a1bbcff69959" [weakdeps] +IndirectArrays = "9b13fd28-a010-5f03-acff-a1bbcff69959" OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" [extensions] +IndirectArraysExt = "IndirectArrays" OffsetArraysExt = "OffsetArrays" [compat] Example = "0.5" +IndirectArrays = "1.0" OffsetArrays = "1.12" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["OffsetArrays", "Test"] +test = ["IndirectArrays", "OffsetArrays", "Test"] diff --git a/test/test_packages/ExtensionExamples/HasExtensions.jl/ext/IndirectArraysExt.jl b/test/test_packages/ExtensionExamples/HasExtensions.jl/ext/IndirectArraysExt.jl new file mode 100644 index 0000000000..9f9611e533 --- /dev/null +++ b/test/test_packages/ExtensionExamples/HasExtensions.jl/ext/IndirectArraysExt.jl @@ -0,0 +1,14 @@ +module IndirectArraysExt + +using HasExtensions, IndirectArrays +import HasExtensions: foo + +function foo(::IndirectArray) + return 3 +end + +function __init__() + HasExtensions.indirectarrays_loaded = true +end + +end diff --git a/test/test_packages/ExtensionExamples/HasExtensions.jl/src/HasExtensions.jl b/test/test_packages/ExtensionExamples/HasExtensions.jl/src/HasExtensions.jl index 4ab13b1327..09587ce997 100644 --- a/test/test_packages/ExtensionExamples/HasExtensions.jl/src/HasExtensions.jl +++ b/test/test_packages/ExtensionExamples/HasExtensions.jl/src/HasExtensions.jl @@ -6,6 +6,7 @@ function foo(::AbstractArray) return 1 end +indirectarrays_loaded = false offsetarrays_loaded = false end # module diff --git a/test/test_packages/ExtensionExamples/HasExtensions.jl/test/runtests.jl b/test/test_packages/ExtensionExamples/HasExtensions.jl/test/runtests.jl index 8889422a90..9c854d32eb 100644 --- a/test/test_packages/ExtensionExamples/HasExtensions.jl/test/runtests.jl +++ b/test/test_packages/ExtensionExamples/HasExtensions.jl/test/runtests.jl @@ -8,3 +8,8 @@ using OffsetArrays @test HasExtensions.offsetarrays_loaded @test HasExtensions.foo(OffsetArray(rand(Float64, 2), 0:1)) == 2 + +using IndirectArrays + +@test HasExtensions.indirectarrays_loaded +@test HasExtensions.foo(IndirectArray(rand(1:6, 32, 32), 1:6)) == 3