From d2a9170c03cdb70280e50b29f51eb991d3d4a05c Mon Sep 17 00:00:00 2001 From: Fabian Zickgraf Date: Fri, 20 May 2022 15:47:57 +0200 Subject: [PATCH] Use root module when determining UUID in @artifact_str Otherwise, overrides do not trigger when using `artifact"..."` inside a submodule. --- stdlib/Artifacts/src/Artifacts.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stdlib/Artifacts/src/Artifacts.jl b/stdlib/Artifacts/src/Artifacts.jl index 6d3bdb5fb674b..27e352be59270 100644 --- a/stdlib/Artifacts/src/Artifacts.jl +++ b/stdlib/Artifacts/src/Artifacts.jl @@ -524,9 +524,10 @@ function jointail(dir, tail) end function _artifact_str(__module__, artifacts_toml, name, path_tail, artifact_dict, hash, platform, @nospecialize(lazyartifacts)) - if haskey(Base.module_keys, __module__) + moduleroot = Base.moduleroot(__module__) + if haskey(Base.module_keys, moduleroot) # Process overrides for this UUID, if we know what it is - process_overrides(artifact_dict, Base.module_keys[__module__].uuid) + process_overrides(artifact_dict, Base.module_keys[moduleroot].uuid) end # If the artifact exists, we're in the happy path and we can immediately