Skip to content

Commit 9b106ad

Browse files
author
Fabian Zickgraf
authored
Use root module when determining UUID in @artifact_str (#45392)
Otherwise, overrides do not trigger when using `artifact"..."` inside a submodule.
1 parent 88def1a commit 9b106ad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stdlib/Artifacts/src/Artifacts.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,10 @@ function jointail(dir, tail)
524524
end
525525

526526
function _artifact_str(__module__, artifacts_toml, name, path_tail, artifact_dict, hash, platform, @nospecialize(lazyartifacts))
527-
if haskey(Base.module_keys, __module__)
527+
moduleroot = Base.moduleroot(__module__)
528+
if haskey(Base.module_keys, moduleroot)
528529
# Process overrides for this UUID, if we know what it is
529-
process_overrides(artifact_dict, Base.module_keys[__module__].uuid)
530+
process_overrides(artifact_dict, Base.module_keys[moduleroot].uuid)
530531
end
531532

532533
# If the artifact exists, we're in the happy path and we can immediately

0 commit comments

Comments
 (0)