Skip to content

Commit eab6033

Browse files
committed
Print more informative error when failing to hit build cache
This most often happens when there's something wrong with one of the JLLs that constitute our toolchains, e.g. we try to deploy for a target we haven't built yet.
1 parent 3914049 commit eab6033

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/build_api/BuildConfig.jl

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -435,18 +435,22 @@ function build!(config::BuildConfig;
435435
# Hit our build cache and see if we've already done this exact build.
436436
if build_cache_enabled(meta) && !disable_cache && !isempty(extract_arg_hints)
437437
prepare(config; verbose)
438-
build_hash = content_hash(config)
439-
if all(haskey(meta.build_cache, build_hash, extract_content_hash(args...)) for args in extract_arg_hints)
440-
if verbose
441-
@info("Build cached", config, build_hash=content_hash(config))
442-
end
443-
try
444-
result = BuildResult_cached(config)
445-
meta.builds[config] = result
446-
return result
447-
catch exception
448-
@error("Error while reading from build cache", exception=(exception, catch_backtrace()))
438+
try
439+
build_hash = content_hash(config)
440+
if all(haskey(meta.build_cache, build_hash, extract_content_hash(args...)) for args in extract_arg_hints)
441+
if verbose
442+
@info("Build cached", config, build_hash=content_hash(config))
443+
end
444+
try
445+
result = BuildResult_cached(config)
446+
meta.builds[config] = result
447+
return result
448+
catch exception
449+
@error("Error while reading from build cache", exception=(exception, catch_backtrace()))
450+
end
449451
end
452+
catch e
453+
@error("Unable to hit build cache", exception=(e, catch_backtrace()))
450454
end
451455
end
452456

0 commit comments

Comments
 (0)