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

Show more info on why package precompilation was needed #52619

Merged

Conversation

IanButterworth
Copy link
Sponsor Member

@IanButterworth IanButterworth commented Dec 23, 2023

Expands the precompiling log from e.g.

[ Info: Precompiling JET [c3a54625-cd67-489e-a8e7-0a5a0ff4e31b] 

to

[ Info: Precompiling JET [c3a54625-cd67-489e-a8e7-0a5a0ff4e31b] (cache misses: invalid header (10), wrong dep loaded (2), wrong julia version (6))

Hitting code load precompilation can happen for various unexpected reasons, and while JULIA_DEBUG=loading has nice verbose info to diagnose the issue, the issue is usually resolved by the precompilation job and so is hard to reproduce with debug on.

This PR is a rough idea of how we could expand on the standard messaging to give a little more insight without being overly verbose, but catch the one-off issues. I think including a bit more info in this log is ok because it's now a fall-back for when parallel precompilation didn't work.

Using the same example from #44329 (comment) which demonstrates issue #50070 (cc @topolarity)

% ./julia                    
┌ Info: Precompiling Revise [295af30f-e4ad-537b-8983-00126c2a3abe] (cache misses: wrong julia version (1))
└ @ Base loading.jl:2634

(@v1.11) pkg> activate --temp
  Activating new project at `/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_pPDv9H`

(jl_pPDv9H) pkg> add JET [email protected]
...
...
Precompiling project...
  ✓ JuliaInterpreter
  6 dependencies successfully precompiled in 28 seconds. 32 already precompiled.
  1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version

julia> using JET
[ Info: Precompiling JET [c3a54625-cd67-489e-a8e7-0a5a0ff4e31b] (cache misses: invalid header (10), wrong dep loaded (2), wrong julia version (6))

julia> 

@IanButterworth IanButterworth changed the title RFC: show more info on why package precompilation was needed Show more info on why package precompilation was needed Dec 28, 2023
@IanButterworth IanButterworth marked this pull request as ready for review December 28, 2023 07:49
@IanButterworth IanButterworth merged commit 26d0460 into JuliaLang:master Dec 28, 2023
9 checks passed
@IanButterworth IanButterworth deleted the ib/precompile_show_reasons branch December 28, 2023 07:52
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.

1 participant