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

make precompile files writable #41614

Merged
merged 1 commit into from
Jul 20, 2021
Merged

make precompile files writable #41614

merged 1 commit into from
Jul 20, 2021

Conversation

KristofferC
Copy link
Sponsor Member

The combination of #34573 and JuliaLang/Pkg.jl#785 means that the precompile files are currently not writable. This means that our way of updating the use time of precompile filkes in

touch(path_to_try) # update timestamp of precompilation file

which is then used for sorting:

julia/base/loading.jl

Lines 739 to 742 in 2893de7

# allocating the sort vector is less expensive than using sort!(.. by=mtime), which would
# call the relatively slow mtime multiple times per path
p = sortperm(mtime.(paths), rev = true)
return paths[p]

is no longer functional.

Fix this by making sure the precompile file is writable.

@KristofferC KristofferC added domain:packages Package management and loading backport 1.6 Change should be backported to release-1.6 backport 1.7 labels Jul 16, 2021
@codecov
Copy link

codecov bot commented Jul 16, 2021

Codecov Report

Merging #41614 (2893de7) into master (2893de7) will not change coverage.
The diff coverage is n/a.

❗ Current head 2893de7 differs from pull request most recent head 7df3587. Consider uploading reports for the commit 7df3587 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master   #41614   +/-   ##
=======================================
  Coverage   81.84%   81.84%           
=======================================
  Files         350      350           
  Lines       73941    73941           
=======================================
  Hits        60520    60520           
  Misses      13421    13421           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2893de7...7df3587. Read the comment docs.

@IanButterworth
Copy link
Sponsor Member

Perhaps this could explain why some people see packages being precompiled again unexpectedly, if the sort was only respecting creation time, not last used time, and the wrong caches were being tidied up.

Also, this might speed things up a bit, with the sort doing the thing it was intended to do.

@KristofferC KristofferC merged commit 6d58068 into master Jul 20, 2021
@KristofferC KristofferC deleted the kc/prec_writable branch July 20, 2021 07:21
KristofferC added a commit that referenced this pull request Jul 26, 2021
KristofferC added a commit that referenced this pull request Jul 26, 2021
KristofferC added a commit that referenced this pull request Aug 31, 2021
KristofferC added a commit that referenced this pull request Sep 3, 2021
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label Sep 7, 2021
staticfloat pushed a commit that referenced this pull request Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:packages Package management and loading
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants