InstantiateFromURL.jl
InstantiateFromURL.jl copied to clipboard
Only instantiate/precompile from master if the hash has changed
Of course, it needs to be downloaded and unzipped each time, but a small improvement would be to only run the instantitate; precompile on master if things have changed.
I think this can be done with the pax_global_header. To see this, I:
- downloaded
https://github.com/arnavs/InstantiationTest/archive/master.tar.gzwhich was pointing at https://github.com/arnavs/InstantiationTest/commit/ce2ed6a98f2b67999fb015f670b270ea3dbec0ab at the time - unziped and opened the
pax_global_header, which had the text
52 comment=ce2ed6a98f2b67999fb015f670b270ea3dbec0ab
- I don't know what the
52 commentis, or if it changes, but the rest of it is the commit hash!
So, the change could be as follows:
- When they call the funciton, as long as
force = false, you download and expand the tarball as usual, then check if the newpax_global_header(or at least the text after thecomment=is identical to the existing one. If it is, then just activate instead of instantiaate/precompile - Anytime that it is instantiated/preocmpiled, you put the
pax_global_headerinside of the directory, or replace it
Perfect, will look into using this information. The 52 comment looks like it's just defining a field named comment that's 52 chars long: https://github.com/ntruessel/etar/wiki/Header-Formats