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

Precompile: Add precomp to Pkg.test #2335

Merged
merged 6 commits into from
Jan 15, 2021

Conversation

IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Jan 13, 2021

Auto-precompilation is currently not run during Pkg.test, which means if a CI test just relies on Pkg.test to install the deps it currently won't benefit from parallel precomp.

Now that error reporting in Pkg.precompile has improved to properly error and show stacktraces the issues around lack of information that led to it being disabled #2110 should have been cleared.

Things to note:

  • This precomp is done within the correct test sandbox context (not where it was previously done, as discussed in Automatic precompilation in testing #2110)
  • It can be disabled either by settting Pkg.test(... allow_autoprecomp = false) or ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0, and the kwarg could be exposed by the github action

@IanButterworth

This comment has been minimized.

@IanButterworth IanButterworth changed the title Precomp: Add allow_autoprecomp kwarg to Pkg.test to allow Pkg.precompile in test sandbox, which defaults to true Precompile: Add precomp to Pkg.test Jan 14, 2021
src/Operations.jl Outdated Show resolved Hide resolved
@IanButterworth
Copy link
Member Author

Working and printing locally now

(jl_ILAWVI) pkg> test CSV
     Testing CSV
  Progress [========================================>]  14/14
14 dependencies successfully precompiled in 9 seconds
Status `/private/var/folders/_6/1yf6sj0950vcg4t91m9ltb5w0000gn/T/jl_uuvOjz/Project.toml`
  [336ed68f] CSV v0.8.2
  [944b1d66] CodecZlib v0.7.0
...

@IanButterworth
Copy link
Member Author

Can I get approval on this?

src/Pkg.jl Outdated Show resolved Hide resolved
src/Pkg.jl Outdated Show resolved Hide resolved
@IanButterworth
Copy link
Member Author

@fredrikekre I realized that the precomp was happening before the status print.. which would make debugging package failure during the precomp stage much harder.

It's now after the status print

@IanButterworth IanButterworth merged commit fe759b2 into JuliaLang:master Jan 15, 2021
IanButterworth added a commit to IanButterworth/Pkg.jl that referenced this pull request Jan 15, 2021
* add option for `Pkg.test` to allow `Pkg.precompile` in test sandbox

* fix access to _auto_precompile

* restore IO after devnull

* make ENV read safe

* remove kwarg and move precomp to after status

* rm kwarg from docstring

(cherry picked from commit fe759b2)
IanButterworth added a commit that referenced this pull request Jan 15, 2021
* add option for `Pkg.test` to allow `Pkg.precompile` in test sandbox

* fix access to _auto_precompile

* restore IO after devnull

* make ENV read safe

* remove kwarg and move precomp to after status

* rm kwarg from docstring

(cherry picked from commit fe759b2)
@IanButterworth IanButterworth deleted the ib/test_precomp branch January 15, 2021 21:41
maleadt added a commit to JuliaCI/julia-test-buildkite-plugin that referenced this pull request Jan 20, 2021
It will happen during Pkg.Test: JuliaLang/Pkg.jl#2335.
On older versions of Julia it isn't parallel anyway, so doesn't matter.
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