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
ENVcommands 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
activatecommands, is the first command used to “dump” temporary downloaded files and build artifacts in a/tmpdirectory whereas the second command makes the built module accessible for theusingcommand?
As for the secondactivatecommand, 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?