JunoLab / Weave.jl

Scientific reports/literate programming for Julia
http://weavejl.mpastell.com
MIT License
823 stars 94 forks source link

Make assets `PackageCompiler`-friendly #426

Closed MichaelHatherly closed 3 years ago

MichaelHatherly commented 3 years ago

As discussed briefly on slack yesterday. A possible solution to relocatablilty issues with the hardcoded paths.

Embeds the asset folder contents into the precompiled files. When the original folder isn't available (due to relocation) creates a scratchspace containing the original folder contents and uses that instead. Might be worth breaking this out into a small package if we actually go with this approach.

The other option is to just go with full artifacts for now until https://github.com/JuliaLang/julia/issues/38696 gives a more lightweight solution. It's a bit of a hassle to update them when things change though, hence why I've given this a try to see how it feels.

codecov-commenter commented 3 years ago

Codecov Report

Merging #426 (1dfb8d7) into master (48c99c7) will decrease coverage by 0.03%. The diff coverage is 71.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #426      +/-   ##
==========================================
- Coverage   74.03%   74.00%   -0.04%     
==========================================
  Files          26       27       +1     
  Lines        1352     1385      +33     
==========================================
+ Hits         1001     1025      +24     
- Misses        351      360       +9     
Flag Coverage Δ
unittests 74.00% <71.87%> (-0.04%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Weave.jl 52.17% <ø> (ø)
src/RelocatableFolders.jl 71.87% <71.87%> (ø)
src/run.jl 84.29% <0.00%> (+0.06%) :arrow_up:

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 48c99c7...1dfb8d7. Read the comment docs.

pfitzseb commented 3 years ago

LGTM, but I do feel like this should go into a separate package.

MichaelHatherly commented 3 years ago

JuliaPackaging org might be a decent home for it then, do you have access to that one @pfitzseb? (In the meantime I'll push to my personal account.)

pfitzseb commented 3 years ago

I don't. Maybe we can get @staticfloat to handle the transfer if you give him access?

staticfloat commented 3 years ago

Yeah, I can do that.

MichaelHatherly commented 3 years ago

Package is at https://github.com/MichaelHatherly/RelocatableFolders.jl and registration PR is https://github.com/JuliaRegistries/General/pull/38805. I'll give @staticfloat access to that repo, and we'll just need to update the registration PR to point to the right place as well.

staticfloat commented 3 years ago

I accepted the invitation, but I can't see the Settings tab, so I don't think I have high enough privileges.

MichaelHatherly commented 3 years ago

Looks like there can only be a single "owner" of a personal repo. I've tried instead to transfer ownership to JuliaPacking but that yielded a "You don’t have the permission to create public repositories on JuliaPackaging" error.

staticfloat commented 3 years ago

Try transferring it to me, and I'll transfer it to JuliaPackaging

staticfloat commented 3 years ago

done

MichaelHatherly commented 3 years ago

Bump.