Cut short extension load cycles during precompilation #53112
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on
Builds on #53111
Fixes #53081
Cuts the cycle short and highlights when two or more extensions are each triggered during the precompilation of eachother, which causes a dependency cycle in nested precompilation that was seen in #53081.
Note if this is considered safe, the
@warn
s could just be@debug
s and the user doesn't need to be notified.i.e. on master this confusing error occurs, and it's actually coming from a double nested precompile worker precompiling
SymbolicsForwardDiffExt
but trying to loadSymbolicsPreallocationToolsExt
which the parent worker is in the process of precompilingWith this PR
The cycle issue being this strong dependency branch
triggers both of these Symbolics extensions without the need for any further packages present.
So they both get triggered during the precompilation job of the other one.
Note that
FillArraysPDMatsExt
doesn't error on master likeSymbolicsPreallocationToolsExt
does. Not sure why not.cc. @ChrisRackauckas