Comments (2)
Thank you very much for taking this up. One possible solution I see is to not cache source files at the time of loading, but at the time of modification for all non-dev
'd packages. This would require a strong assumption that package files are not modified except through Pkg.jl operations. But then staleness could be verified by loading a single file with the precomputed crc32 hashes and comparing them against the pkgimage files' crc32s.
from julia.
I think your proposal is close to a custom CAS system.
Regarding the restriction:
At least on my system all pkg code inside ~/.julia/packages/...
is already read-only. However, I vaguely remember having seen an issue about this not being the case on all platforms, but I can't find it at the moment. Anyways, I think this makes sense, because the source files are released code that can be frozen.
Regarding keeping hashes in a separate file:
This requires perfect synchronization with the sources, and is susceptible to cases where someone (for some reason) swaps out source files.
Another solution would work with a virtual filesystem that stores the hash alongside the inode data. This would solve the synchronization issue, but it also requires more work for support on all platforms.
And yet another solution could use the LLVM CAS library.
These thoughts raise the questions:
- How foolproof does the solution have to be?
- Is it enough to put out a disclaimer saying that altering the
~/.julia/packages
folder comes at the user's own risk for malfunction? - How likely is it that people tinker with this data?
from julia.
Related Issues (20)
- `x < min(x, y)` HOT 11
- Illegal instruction on 1.10.2 but not 1.11+ HOT 3
- Unreachable reached at 0x7b92c0862a74 / Illegal instruction
- Illegal instruction crash
- Defining `==` for `ComposedFunction` by comparing `inner` and `outer` HOT 1
- the GenericMemory doc string isn't included in the docs HOT 3
- Add `mul_hi` HOT 10
- Building from fresh clone with `USECCACHE=1` fails
- `Base.FastMath.pow_fast(a::Float64, i::Int)` fails for huge `i` HOT 6
- Parallel precompile shows stacktrace into precompilation code when a package fails to precompile
- Parallel precompile now seems to fail precompiling the package itself HOT 9
- Broadcasts over `StepRange` of `Date/DateTime` materialize to vectors
- BUG: `^(::Float64, ::Union{Int, Float64})` incorrect for very large negative exponents HOT 10
- REPL: path completion hints shouldn't expand `~` to user dir HOT 1
- Loading test "relocatable upgrades" fails locally HOT 3
- generic method for `top_set_bit` gives wrong result HOT 3
- at-atomic fields with at-kwdef and field defaults doesn't work HOT 1
- Implementation of `(first|last)(::OrdinalRange)` is not generic
- ASAN throwing heap-buffer-overflow errors during precompilation HOT 4
- Disallow size zero memory HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from julia.