fredrikekre / jlpkg

A command line interface (CLI) for Pkg, Julia's package manager.
MIT License
92 stars 4 forks source link

Avoid name collision on Julia nightly #15

Closed tribut closed 4 years ago

tribut commented 4 years ago

jlpkg fails on julia-nightly (1.5.0-DEV.360, Commit 012b270df6):

$ jlpkg status
ERROR: LoadError: cannot assign a value to variable Base.LOAD_PATH from module Main
Stacktrace:
 [1] top-level scope at /home/felix/.local/bin/global/jlpkg:135
 [2] include(::Function, ::Module, ::String) at ./Base.jl:380
 [3] include(::Module, ::String) at ./Base.jl:368
 [4] exec_options(::Base.JLOptions) at ./client.jl:288
 [5] _start() at ./client.jl:490
in expression starting at /home/felix/.local/bin/global/jlpkg:135

Looking at the changes since 1.4.0-rc2, it appears to be caused by https://github.com/JuliaLang/julia/commit/ef0e0f2923. This PR simply renames LOAD_PATH to ORIG_LOAD_PATH to avoid the name collision.

fredrikekre commented 4 years ago

Thanks for the PR.

Looks like it was https://github.com/JuliaLang/julia/commit/3f05b0d3534af3657a93b662be0030410d1ba1d6 actually, see https://github.com/JuliaLang/julia/issues/34924

Given that that commit was just merged, lets see if there will be a quick fix, otherwise we can of course merge this PR.

tribut commented 4 years ago

Thanks for checking. Sorry I mixed up the commits.