Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a failed extension load throw an error during pre-compilation #56668

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

topolarity
Copy link
Member

Without this change the tests added in #56666 pass (even w/o that PR applied), because the failure to load ExtAB is just ignored.

I think we should tighten that up (w/o a backport, so that we don't break folks depending on this). The stab I've taken here might be the wrong approach since I'm not sure how it interacts with any locks, etc., but I wanted to get the ball rolling.

Comment on lines 1588 to +1594
errs = current_exceptions()
@error "Error during loading of extension $(extid.id.name) of $(extid.parentid.name), \
use `Base.retry_load_extensions()` to retry." exception=errs
if JLOptions().incremental != 0
# during incremental precompilation, this should be fail-fast
throw(PrecompilableError())
end
Copy link
Member

@IanButterworth IanButterworth Nov 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PrecompileableError is special for indicating a package doesn't want to be precompiled.
This should be a regular throw.

However I'm not sure how clear the error would be with this. Worth checking.

Suggested change
errs = current_exceptions()
@error "Error during loading of extension $(extid.id.name) of $(extid.parentid.name), \
use `Base.retry_load_extensions()` to retry." exception=errs
if JLOptions().incremental != 0
# during incremental precompilation, this should be fail-fast
throw(PrecompilableError())
end
if JLOptions().incremental != 0
# during incremental precompilation, this should be fail-fast
rethrow()
else
errs = current_exceptions()
@error "Error during loading of extension $(extid.id.name) of $(extid.parentid.name), \
use `Base.retry_load_extensions()` to retry." exception=errs
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants