Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use root module when determining UUID in @artifact_str #45392

Merged
merged 1 commit into from
May 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use root module when determining UUID in @artifact_str
Otherwise, overrides do not trigger when using `artifact"..."` inside a
submodule.
  • Loading branch information
zickgraf committed May 20, 2022
commit d2a9170c03cdb70280e50b29f51eb991d3d4a05c
5 changes: 3 additions & 2 deletions stdlib/Artifacts/src/Artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down