From 3d2e2bd0b61e498cb8f9fc3ccc029026504dce10 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Mon, 29 Jan 2024 21:51:19 -0500 Subject: [PATCH] add warning if cycle detected in extensions --- base/loading.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/loading.jl b/base/loading.jl index 5d5b6e69449240..b22e8855b282df 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1392,6 +1392,10 @@ function run_extension_callbacks(pkgid::PkgId) extids = pop!(EXT_DORMITORY, pkgid, nothing) extids === nothing && return for extid in extids + if in(extid.id.name, precompilation_stack) && !isprecompiled(extid.id) + @warn "Dependency cycle detected in extension precompilation: $(join(precompilation_stack, " > ")) > $(extid.id.name)" + continue + end if extid.ntriggers > 0 # indicate pkgid is loaded extid.ntriggers -= 1