Skip to content

Commit 327f632

Browse files
timholystaticfloat
authored andcommitted
Assert that _artifact_str returns a String (#38975)
I have no idea whether this is important, but I noticed this while investigating triggers for inference in a package. Feel free to close if you think this is irrelevant. Incidentally, `_artifact_str` is a ~60ms precompile (that's just the inference, not the codegen). I see that its precompile was commented out in 924484f; just mentioning it in case there's an opportunity to squeeze out a bit more latency-reduction. (cherry picked from commit ccaaf56)
1 parent c4298e1 commit 327f632

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/Artifacts/src/Artifacts.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ macro artifact_str(name, platform=nothing)
671671
platform = HostPlatform()
672672
artifact_name, artifact_path_tail, hash = artifact_slash_lookup(name, artifact_dict, artifacts_toml, platform)
673673
return quote
674-
Base.invokelatest(_artifact_str, $(__module__), $(artifacts_toml), $(artifact_name), $(artifact_path_tail), $(artifact_dict), $(hash), $(platform), $(lazyartifacts))
674+
Base.invokelatest(_artifact_str, $(__module__), $(artifacts_toml), $(artifact_name), $(artifact_path_tail), $(artifact_dict), $(hash), $(platform), $(lazyartifacts))::String
675675
end
676676
else
677677
if platform === nothing
@@ -680,7 +680,7 @@ macro artifact_str(name, platform=nothing)
680680
return quote
681681
local platform = $(esc(platform))
682682
local artifact_name, artifact_path_tail, hash = artifact_slash_lookup($(esc(name)), $(artifact_dict), $(artifacts_toml), platform)
683-
Base.invokelatest(_artifact_str, $(__module__), $(artifacts_toml), artifact_name, artifact_path_tail, $(artifact_dict), hash, platform, $(lazyartifacts))
683+
Base.invokelatest(_artifact_str, $(__module__), $(artifacts_toml), artifact_name, artifact_path_tail, $(artifact_dict), hash, platform, $(lazyartifacts))::String
684684
end
685685
end
686686
end

0 commit comments

Comments
 (0)