JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.62k stars 5.48k forks source link

project location when user home `~/.julia` doesn't have env #45167

Open Moelf opened 2 years ago

Moelf commented 2 years ago
julia> ENV["JULIA_DEPOT_PATH"]
":/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Tue/x86_64-centos7-gcc10-opt/share/julia"

julia> ENV["JULIA_LOAD_PATH"]
":/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Tue/x86_64-centos7-gcc10-opt/share/julia/environments/v1.7"

(v1.7) pkg> st
      Status `/cvmfs/sft-nightlies.cern.ch/lcg/latest/jl_ijulia/1.23.2-1fdc8/x86_64-centos7-gcc10-opt/share/julia/environments/v1.7/Project.toml`
  [7073ff75] IJulia v1.23.2

(v1.7) pkg> add Example
   Resolving package versions...
   Installed Example ─ v0.5.3
ERROR: SystemError: opening file "/cvmfs/sft-nightlies.cern.ch/lcg/latest/jl_ijulia/1.23.2-1fdc8/x86_64-centos7-gcc10-opt/share/julia/environments/v1.7/Project.toml": Read-only file system

when user first opens Julia without a ~/.julia, this is a bit annoying because the project path is read-only, despite the fact that : is the first in JULIA_DEPOT_PATH.

in fact, this is still the case even if ~/.julia exists and the only fix seems to be manually creating a environment somehow

KristofferC commented 2 years ago

So what do you suggest should be done here?

Moelf commented 2 years ago

when therer's :, simply put ~/.julia/environments/v@ as the depot?

fredrikekre commented 1 year ago

Probably Pkg should not accept an environment from lower depots if the intention is to modify it (e.g. in add).