From ccaaf567e9e15d723165b3a9b0da42d335f73113 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Wed, 23 Dec 2020 23:12:02 -0600 Subject: [PATCH] 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 924484f2f00; just mentioning it in case there's an opportunity to squeeze out a bit more latency-reduction. --- stdlib/Artifacts/src/Artifacts.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/Artifacts/src/Artifacts.jl b/stdlib/Artifacts/src/Artifacts.jl index 2fa396491b570..fb59b4df82bb7 100644 --- a/stdlib/Artifacts/src/Artifacts.jl +++ b/stdlib/Artifacts/src/Artifacts.jl @@ -671,7 +671,7 @@ macro artifact_str(name, platform=nothing) platform = HostPlatform() artifact_name, artifact_path_tail, hash = artifact_slash_lookup(name, artifact_dict, artifacts_toml, platform) return quote - Base.invokelatest(_artifact_str, $(__module__), $(artifacts_toml), $(artifact_name), $(artifact_path_tail), $(artifact_dict), $(hash), $(platform), $(lazyartifacts)) + Base.invokelatest(_artifact_str, $(__module__), $(artifacts_toml), $(artifact_name), $(artifact_path_tail), $(artifact_dict), $(hash), $(platform), $(lazyartifacts))::String end else if platform === nothing @@ -680,7 +680,7 @@ macro artifact_str(name, platform=nothing) return quote local platform = $(esc(platform)) local artifact_name, artifact_path_tail, hash = artifact_slash_lookup($(esc(name)), $(artifact_dict), $(artifacts_toml), platform) - Base.invokelatest(_artifact_str, $(__module__), $(artifacts_toml), artifact_name, artifact_path_tail, $(artifact_dict), hash, platform, $(lazyartifacts)) + Base.invokelatest(_artifact_str, $(__module__), $(artifacts_toml), artifact_name, artifact_path_tail, $(artifact_dict), hash, platform, $(lazyartifacts))::String end end end