-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Run Pkg.precompile before tests in same julia setup as tests for correct caching #3281
Run Pkg.precompile before tests in same julia setup as tests for correct caching #3281
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
0fcae5b
to
02e1d2f
Compare
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks reasonable to me!
|
||
function gen_test_precompile_code(; coverage, julia_args::Cmd, test_args::Cmd) | ||
code = """ | ||
$(Base.load_path_setup_code(false)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get why this is needed. If the tests start with the correct project, why isn't just a Pkg.precompile
enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed that importing Pkg
into the test process might be breaking, so I left that untouched
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we say we needed to disable auto precompile on CI? Otherwise, you will precompile once when the deps are installed (which has the wrong flags) and then once before the tests (with different flags so will be a full re-precompile).
Correct. Note that it was that way already and this doesn't change that. |
Oh, I didn't know that. Nice :). Then I think this should be good. Would be good to confirm this whole PR by setting |
I think this shows it's working. All 19 dependencies had to be re-precompiled before tests ran.
@KristofferC I don't think |
I did however just realise that we used to respect whether the user wanted auto-precompilation here, so I've reinstated that |
ec37c0d
to
422da4a
Compare
If you look at https://github.com/JuliaLang/JuliaSyntax.jl/actions/runs/3703309958/jobs/6274600432 in the
That precompile will now be useless. So that's why I am suggesting disabling it on CI so that doesn't run. |
Ok, I follow now. Makes sense. Updated. I believe |
What CI platforms are there that set I think we should only assume that we are running on CI if |
Only a vague recollection. I've switched it to your suggestion. thanks |
On reflection, I'm a bit torn about whether Pkg should be so opinionated about when precompilation happens in CI.
|
41c9870
to
ca3364a
Compare
I propose I revert |
I think what we should do is disable automatic precompilation during |
Almost what I'm saying. There's no standard way to I'm proposing not precompiling during The rest is accurate |
In buildkite land I don't think we even manually instantiate (that's what I meant more than |
This reverts commit 476b368.
Cool. Ok, I'm going to go ahead with that plan. I guess we can adapt if needed |
Required to avoid double-precompilation when native code caching is enabled