I am using these scripts for now:
#!/bin/bash
if [[ $(basename $(pwd)) == "bin" ]]; then
cd ..
fi
export JULIA_PKG_SERVER_REGISTRY_PREFERENCE=eager
julia --project -e 'include("bin/install.jl")'
And install.jl looks like this:
using Pkg
try
Pkg.instantiate()
catch
try
Pkg.resolve()
catch
Pkg.update()
end
end
The problem these scripts are supposed to solve are:
- after a new collegue checked out our project, it is not instantiated
- if you try to instantiate it, that might fail, it might be needed to call resolve
- resolve might fail, you might need to update
Is there a better way?