Skip to content

Commit

Permalink
Precompilation workload: restore the original depot and load paths (#…
Browse files Browse the repository at this point in the history
…3668)

* Precompilation workload: restore the original depot and load paths

* Update src/precompile.jl

Co-authored-by: Valentin Churavy <[email protected]>

---------

Co-authored-by: Kristoffer Carlsson <[email protected]>
Co-authored-by: Valentin Churavy <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2023
1 parent b39ba05 commit af5392d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ function _run_precompilation_script_setup()
end

function pkg_precompile()
original_depot_path = copy(DEPOT_PATH)
original_load_path = copy(LOAD_PATH)

Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true
# Default 30 sec grace period means we hang 30 seconds before precompiling finishes
DEFAULT_IO[] = UnstableIO(devnull)
Expand Down Expand Up @@ -107,6 +110,9 @@ function pkg_precompile()
# end
# end
end
copy!(DEPOT_PATH, original_depot_path)
copy!(LOAD_PATH, original_load_path)
return nothing
end

pkg_precompile()
Expand Down

0 comments on commit af5392d

Please sign in to comment.