Description
In #1376, @GeorgianaElena and I did some digging and concluded that a bug in julia<1.4.1
was the reason for the addition of a call to resolve()
(https://github.com/fonsp/repo2docker/blob/239c4f57f5a40f7241bb4b4746019eb173475ed8/repo2docker/buildpacks/julia/julia_project.py#L180).
At the time of that PR (#879), the julia command was:
julia --project=${REPO_DIR} -e 'using Pkg; Pkg.instantiate(); pkg"precompile"'
Our reading of this is that at the time, instantiate
did not precompile, and resolve()
call was then added in #879 to address a bug for missing dependencies.
julia --project=${REPO_DIR} -e 'using Pkg; Pkg.instantiate(); Pkg.resolve(); pkg"precompile"'
Later, in #1376, the call to precompile
was changed to instantiate()
, to eliminate this warning:
julia --project=${REPO_DIR} -e 'using Pkg; Pkg.instantiate(); Pkg.resolve(); Pkg.instantiate()'
It would appear that for newer Julia versions, the call to resolve()
is not necessary, leaving us with
julia --project=${REPO_DIR} -e 'using Pkg; Pkg.instantiate(); Pkg.instantiate()'
Furthermore, the double instantiate()
seems superfluous.
Therefore, for newer Julia versions, it would seem that we can remove both resolve()
and the second instantiate()
. However, we are not familiar enough with repo2docker to make a judgement on whether it is better to leave redundant code, or introduce a julia-version-sensitive branch.
Next steps for this are to test a reproducer for the original #879 to ensure that both #879 and #1736 are solved by simply:
julia --project=${REPO_DIR} -e 'using Pkg; Pkg.instantiate();'
And if so, a maintainer should make a decision about whether we should introduce this simplification through a branch dependent upon the Julia version.
Activity