JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
622 stars 268 forks source link

environments not isolated #994

Closed bjarthur closed 5 years ago

bjarthur commented 5 years ago

i have two environments with some packages in common. when i using one of the common packages in one environment, it has to be recompiled after i activate the other environment and using it there.

here i activate screen and using Images which leads to a precompilation. this is fine.

$ ~/src/julia/usr/bin/julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.2.0-DEV.148 (2019-01-11)
 _/ |\__'_|_|_|\__'_|  |  Commit 919cd62 (3 days old master)
|__/                   |

(v1.2) pkg> activate projects/genie/screen

(screen) pkg> st
    Status `~/projects/genie/screen/Project.toml`
  [159f3aea] + Cairo v0.5.6
  [5ae59095] + Colors v0.9.5
  [a81c6b42] + Compose v0.7.2+ [`~/.julia/dev/Compose`]
  [d38c429a] + Contour v0.5.1
  [717857b8] + DSP v0.5.2
  [a93c6f00] + DataFrames v0.16.0
  [31c24e10] + Distributions v0.16.4
  [5789e2e9] + FileIO v1.0.4
  [186bb1d3] + Fontconfig v0.2.0
  [663a7486] + FreeTypeAbstraction v0.4.1
  [c91e804a] + Gadfly v1.0.1+ [`~/.julia/dev/Gadfly`]
  [f67ccb44] + HDF5 v0.10.3
  [09f84164] + HypothesisTests v0.8.0
  [6218d12a] + ImageMagick v0.7.1
  [916415d5] + Images v0.17.0
  [a98d9a8b] + Interpolations v0.11.1
  [033835bb] + JLD2 v0.1.2
  [682c06a0] + JSON v0.20.0
  [5ab0869b] + KernelDensity v0.5.1
  [2fda8390] + LsqFit v0.6.0
  [23992714] + MAT v0.4.0+ [`~/.julia/dev/MAT`]
  [e1d29d7a] + Missings v0.3.1
  [429524aa] + Optim v0.16.0
  [bac558e1] + OrderedCollections v1.0.2
  [f27b6e38] + Polynomials v0.5.1
  [92933f4c] + ProgressMeter v0.9.0
  [2913bbd2] + StatsBase v0.27.0
  [dc548174] + TerminalMenus v0.1.0
    Status `~/projects/genie/screen/Manifest.toml`
  [159f3aea] + Cairo v0.5.6
  [5ae59095] + Colors v0.9.5
  [a81c6b42] + Compose v0.7.2+ [`~/.julia/dev/Compose`]
  [d38c429a] + Contour v0.5.1
  [717857b8] + DSP v0.5.2
  [a93c6f00] + DataFrames v0.16.0
  [31c24e10] + Distributions v0.16.4
  [5789e2e9] + FileIO v1.0.4
  [186bb1d3] + Fontconfig v0.2.0
  [663a7486] + FreeTypeAbstraction v0.4.1
  [c91e804a] + Gadfly v1.0.1+ [`~/.julia/dev/Gadfly`]
  [f67ccb44] + HDF5 v0.10.3
  [09f84164] + HypothesisTests v0.8.0
  [6218d12a] + ImageMagick v0.7.1
  [916415d5] + Images v0.17.0
  [a98d9a8b] + Interpolations v0.11.1
  [033835bb] + JLD2 v0.1.2
  [682c06a0] + JSON v0.20.0
  [5ab0869b] + KernelDensity v0.5.1
  [2fda8390] + LsqFit v0.6.0
  [23992714] + MAT v0.4.0+ [`~/.julia/dev/MAT`]
  [e1d29d7a] + Missings v0.3.1
  [429524aa] + Optim v0.16.0
  [bac558e1] + OrderedCollections v1.0.2
  [f27b6e38] + Polynomials v0.5.1
  [92933f4c] + ProgressMeter v0.9.0
  [2913bbd2] + StatsBase v0.27.0
  [dc548174] + TerminalMenus v0.1.0

julia> using Images
[ Info: Recompiling stale cache file /home/arthurb/.julia/compiled/v1.2/Images/H8Vxc.ji for Images [916415d5-f1e6-5110-898d-aaa5f9f070e0]

julia> 

in a fresh julia session, i activate render. Images should already be precompiled from above, yet it does so again when i using it. why?

$ ~/src/julia/usr/bin/julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.2.0-DEV.148 (2019-01-11)
 _/ |\__'_|_|_|\__'_|  |  Commit 919cd62 (3 days old master)
|__/                   |

(v1.2) pkg> activate projects/mouselight/src/render

(render) pkg> st
    Status `~/projects/mouselight/src/render/Project.toml`
  [159f3aea] + Cairo v0.5.6
  [5ae59095] + Colors v0.9.5
  [c91e804a] + Gadfly v1.0.1
  [f67ccb44] + HDF5 v0.10.4
  [6218d12a] + ImageMagick v0.7.1+ [`~/.julia/dev/ImageMagick`]
  [916415d5] + Images v0.17.0
  [033835bb] + JLD2 v0.1.2
  [2a6d852e] + Morton v0.0.1+ [`~/.julia/dev/Morton`]
  [ddb6d928] + YAML v0.3.2+ [`~/.julia/dev/YAML`]
    Status `~/projects/mouselight/src/render/Manifest.toml`
  [159f3aea] + Cairo v0.5.6
  [5ae59095] + Colors v0.9.5
  [c91e804a] + Gadfly v1.0.1
  [f67ccb44] + HDF5 v0.10.4
  [6218d12a] + ImageMagick v0.7.1+ [`~/.julia/dev/ImageMagick`]
  [916415d5] + Images v0.17.0
  [033835bb] + JLD2 v0.1.2
  [2a6d852e] + Morton v0.0.1+ [`~/.julia/dev/Morton`]
  [ddb6d928] + YAML v0.3.2+ [`~/.julia/dev/YAML`]

julia> using Images
[ Info: Recompiling stale cache file /home/arthurb/.julia/compiled/v1.2/Images/H8Vxc.ji for Images [916415d5-f1e6-5110-898d-aaa5f9f070e0]

julia> 

here i start a fresh julia again and activate render again-- the same environment that was most recently activate. using Images now results in no re-compilation. great!

$ ~/src/julia/usr/bin/julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.2.0-DEV.148 (2019-01-11)
 _/ |\__'_|_|_|\__'_|  |  Commit 919cd62 (3 days old master)
|__/                   |

(v1.2) pkg> activate projects/mouselight/src/render

julia> using Images

julia> 

but in a fresh julia start if i activate screen, which was used before but not most recently, a using Images results in a re-compilation. how frusterating!

$ ~/src/julia/usr/bin/julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.2.0-DEV.148 (2019-01-11)
 _/ |\__'_|_|_|\__'_|  |  Commit 919cd62 (3 days old master)
|__/                   |

(v1.2) pkg> activate projects/genie/screen

julia> using Images
[ Info: Recompiling stale cache file /home/arthurb/.julia/compiled/v1.2/Images/H8Vxc.ji for Images [916415d5-f1e6-5110-898d-aaa5f9f070e0]

julia> 
fredrikekre commented 5 years ago

Duplicate of https://github.com/JuliaLang/julia/issues/27418