JuliaLang / Pkg.jl

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

Adding a package doesn't always provide the most up-to-date dependencies #3757

Closed jariji closed 8 months ago

jariji commented 8 months ago

New Julia 1.10 session, new environment. Why didn't I get the most up to date TypedSyntax automatically? The default tiered rule says

tiered Use the tier that will preserve the most version information while
allowing version resolution to succeed (this is the default)

but since the environment is new, there is nothing to preserve; no information would be lost by installing the newest TypedSyntax, so I would expect TypedSyntax 1.2.4 to be installed but I get 1.2.3. I guess maybe 1.2.3 had been pre-installed in a different environment in a different session?

julia> import Pkg

julia> Pkg.activate(;temp=true)
  Activating new project at `/tmp/jl_yFtciR`

julia> Pkg.add("Cthulhu")
   Resolving package versions...
  [f68482b8] + Cthulhu v2.10.0
    Updating `/tmp/jl_yFtciR/Manifest.toml`
  [1520ce14] + AbstractTrees v0.4.4
  [da1fd8a2] + CodeTracking v1.3.5
  [f68482b8] + Cthulhu v2.10.0
  [1eca21be] + FoldingTrees v1.2.1
  [70703baa] + JuliaSyntax v0.4.8
  [aea7be01] + PrecompileTools v1.2.0
  [21216c6a] + Preferences v1.4.1
⌃ [d265eb64] + TypedSyntax v1.2.3
  [b8c1c048] + WidthLimitedIO v1.0.1
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [b77e0a4c] + InteractiveUtils
  [d6f4376e] + Markdown
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [6462fe0b] + Sockets
  [fa267f1f] + TOML v1.0.3
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
        Info Packages marked with ⌃ have new versions available and may be upgradable.
IanButterworth commented 8 months ago

Please include the output of versioninfo to show which env vars are set

jariji commented 8 months ago

julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 24 × AMD Ryzen 9 3900XT 12-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver2)
  Threads: 17 on 24 virtual cores
Environment:
  JULIA_NUM_THREADS = 12
  JULIA_PKG_PRESERVE_TIERED_INSTALLED = true