JuliaPy / Conda.jl

Conda managing Julia binary dependencies
Other
172 stars 57 forks source link

Storing the ROOTENV in deps.jl leads to problems #183

Open mmaeusezahl opened 4 years ago

mmaeusezahl commented 4 years ago

I confess this is really an edge case, but I'm still reporting this, since this package was the only Julia package on my PC that responded incorrectly(? -> not sure if this is documented behavior anyways ;) ).

I had to change the location of JULIA_DEPOT_PATH (Windows PC, would be the same on Linux I'm sure). This was due to storage space limitations in the previous location. What I did:

  1. Moved the whole C:\oldPath\.julia to the new location D:\newPath\.julia
  2. Set the JULIA_DEPOT_PATH environment variable to be D:\newPath\.julia
  3. Continues using Julia

Everything worked fine except, that after a while I noticed that Conda (and only Conda) started to write into C:\oldPath\.julia\conda (and weirdly also in D:\newPath\.julia\conda)

I traced that problem down to the deps.jl file(s) which I of course also copied over, and which still contained the the old const ROOTENV = "C:\\oldPath\\.julia\\conda\\3".

The solution for me was to delete the deps.jl files and rebuild Conda.

I still think that no package should store information / assumptions about where JULIA_DEPOT is located, but much rather respond dynamically to its location whenever it gets loaded. But I'm pretty certain this is undocumented behavior.

(OT: Would be happy to fix and open a PR, but I wanted to hear what you'd expect to happen in such a case anyways)

mmaeusezahl commented 3 years ago

This issue also affects other people: https://discourse.julialang.org/t/conda-rootenv-path-wrong/45186

stevengj commented 3 years ago

We should really use the new Pkg preferences mechanism…