Giter VIP home page Giter VIP logo

Comments (2)

sloede avatar sloede commented on August 16, 2024

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.

fatteneder avatar fatteneder commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.