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

Add log message for __precompile__(false) #30064

Merged
merged 3 commits into from
Jan 24, 2019
Merged

Conversation

NHDaly
Copy link
Member

@NHDaly NHDaly commented Nov 16, 2018

Add a log message that we're bailing on precompilation because we encountered __precompile__(false).

Also states that we're importing the package the "normal way" to help explain why this can still be slow.

Opened in response to #29467.

Add a log message that we're bailing on precompilation because we encountered `__precompile__(false)`.

Also states that we're importing the package the "normal way" to help explain why this can still be slow.
@NHDaly
Copy link
Member Author

NHDaly commented Nov 16, 2018

This isn't a perfect solution; ideally we would never print Precompiling $pkg at all, but it's not possible to know whether we'll end up finding a __precompile__(false) statement somewhere in the package until we've already finished precompiling!

So I think this is a decent workaround -- just letting the user know what's happening: 1. we've bailed on precompilation, and 2. now we're gonna import the package the regular way.

Help bikeshedding on the exact wording of this log message would be appreciated. :) Thanks!

@NHDaly
Copy link
Member Author

NHDaly commented Dec 28, 2018

@KristofferC can i bug you for a review of this? I'm just going back to clean up old PRs. :)

It's a small logging change, but i think a good usability improvement!

Copy link
Sponsor Member

@KristofferC KristofferC left a comment

Choose a reason for hiding this comment

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

Seems better than the status quo so if you have verified that it works correctly, LGTM.

base/loading.jl Outdated Show resolved Hide resolved
@NHDaly
Copy link
Member Author

NHDaly commented Jan 2, 2019

so if you have verified that it works correctly, LGTM.

Yes, it seems to work locally.

pkg> add StatPlots#v0.8.1
...

julia> using StatPlots
[ Info: Precompiling StatPlots [60ddc479-9b66-56df-82fc-76a74619b69c]
[ Info: Skipping precompilation since __precompile__(false). Importing StatPlots [60ddc479-9b66-56df-82fc-76a74619b69c].

julia> using StatPlots

julia>

And then the second time after restarting julia:

julia> using StatPlots
[ Info: Recompiling stale cache file /Users/nathan.daly/.julia/compiled/v1.2/StatPlots/iAmZm.ji for StatPlots [60ddc479-9b66-56df-82fc-76a74619b69c]
[ Info: Skipping precompilation since __precompile__(false). Importing StatPlots [60ddc479-9b66-56df-82fc-76a74619b69c].

It's better than nothing, and at least it gives you an understanding of why it's taking so long! :)

Thanks for the review.

@NHDaly
Copy link
Member Author

NHDaly commented Jan 24, 2019

Please take another look: I merged in the latest master, and the build now passes. :)

I think this is good to merge, and would be a useful change to prevent further confusion. :)

@KristofferC KristofferC merged commit 515c9ad into JuliaLang:master Jan 24, 2019
@KristofferC
Copy link
Sponsor Member

Thanks for the work here!

@NHDaly NHDaly deleted the patch-2 branch January 24, 2019 16:26
@NHDaly
Copy link
Member Author

NHDaly commented Jan 24, 2019

Thanks for the review, @KristofferC! :)

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.

None yet

3 participants