A recent workshop (on MLJ) began with the following instructions for adding a module for the workshop:
ENV["JULIA_PKG_PRECOMPILE_AUTO"]=0
using Pkg
Pkg.activate(temp=true)
Pkg.develop(url="https://github.com/ablaom/HelloJulia.jl")
Pkg.activate(joinpath(Pkg.devdir(), "HelloJulia"))
Pkg.instantiate()
ENV["JULIA_PKG_PRECOMPILE_AUTO"]=1
using HelloJulia
Please clarify a couple of points:
- Do the two
ENV
commands prevent precompilation of the module’s dependencies, meaning that the necessary dependencies would be compiled as needed, saving time on startup? - As for the double
activate
commands, is the first command used to “dump” temporary downloaded files and build artifacts in a/tmp
directory whereas the second command makes the built module accessible for theusing
command?
As for the secondactivate
command, what is the purpose of thedevdir()
? I don’t see anything there
Lastly, if this sequence of commands is the recommended way to develop/debug a downloaded module, shouldn’t it be added as a command (or option) to Pkg
?