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

[release-1.10] switch cache tracking from mtime to fsize & hash #52728

Conversation

IanButterworth
Copy link
Member

Fixup version of @fatteneder's patch here #50918 (comment)

Caching /compiled in CI works great in 1.11 because of #49866 which moved away from mtime tracking to fsize and file hash tracking.

1.10 is in the awkward position of having more stdlibs out of the sysimage and still using mtime, so it's actually a noticeable regression in CI cache effectiveness julia-actions/cache#85

Note that this also removes the current special casing check skip for stdlibs. i.e. Skipping mtime check for file $f used by $cachefile, since it is a stdlib

For this to be a viable patch backport it needs to be very safe.

Related #50667

Co-Authored-By: Florian <26469701+fatteneder@users.noreply.github.com>
@@ -2491,7 +2496,8 @@ end
struct CacheHeaderIncludes
id::PkgId
filename::String
mtime::Float64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch from #50918 (comment) removed mtime, but we later added it again, because otherwise we break how people use include_dependency. I think we need to restore here too.

Also see #52161 for a discussion.

@fatteneder
Copy link
Member

This here was not included in the original patch, but should also be included (line nr 2509/2515)

> totbytes = read(f, Int64) # total bytes for file dependencies + preferences
totbytes = Int64(read(f, UInt64)) # total bytes for file dependencies + preferences

@IanButterworth
Copy link
Member Author

We can avoid needing to do this because https://github.com/julia-actions/setup-julia/releases/tag/v1.9.5 closed #50667

@IanButterworth IanButterworth deleted the ib/stdlib_mtime_fix branch January 5, 2024 18:58
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