JuliaLang / Pkg.jl

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

No red marker when package is missing in activated environment #2918

Closed roflmaostc closed 2 years ago

roflmaostc commented 2 years ago

Hi!

When I download a big repo and activate it, it doesn't display the missing packages.

julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 4

I also observed that on 1.6.2, 1.6.0 and 1.6.5

╭─fxw@earth /tmp  
╰─➤  git clone https://github.com/SciML/DifferentialEquations.jl
Cloning into 'DifferentialEquations.jl'...
remote: Enumerating objects: 10712, done.
remote: Counting objects: 100% (146/146), done.
remote: Compressing objects: 100% (70/70), done.
remote: Total 10712 (delta 74), reused 130 (delta 73), pack-reused 10566
Receiving objects: 100% (10712/10712), 173.24 MiB | 9.28 MiB/s, done.
Resolving deltas: 100% (7080/7080), done.

╭─fxw@earth /tmp  
╰─➤  cd DifferentialEquations.jl                          [4-01-22 | 5:09:39]

╭─fxw@earth /tmp/DifferentialEquations.jl  ‹master› 
╰─➤  julia                                                [4-01-22 | 5:09:44]
At startup Revise.jl and OhMyREPL.jl loaded               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.1 (2021-12-22)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.7) pkg> activate .
  Activating project at `/tmp/DifferentialEquations.jl`

(DifferentialEquations) pkg> st
     Project DifferentialEquations v7.0.0
      Status `/tmp/DifferentialEquations.jl/Project.toml`
  [764a87c0] BoundaryValueDiffEq
  [bcd4f6db] DelayDiffEq
  [2b5f629d] DiffEqBase
  [459566f4] DiffEqCallbacks
  [c894b116] DiffEqJump
  [77a26b50] DiffEqNoiseProcess
  [7ed4a6bd] LinearSolve
  [1dea7af3] OrdinaryDiffEq
  [731186ca] RecursiveArrayTools
  [189a3867] Reexport
  [9672c7b4] SteadyStateDiffEq
  [789caeaf] StochasticDiffEq
  [c3572dad] Sundials
  [37e2e46d] LinearAlgebra
  [9a3f8284] Random

julia> using Diff
DiffEqBase            DiffEqJump             DifferentialEquations
DiffEqCallbacks       DiffEqNoiseProcess
julia> using DifferentialEquations
[ Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]
ERROR: LoadError: ArgumentError: Package DiffEqBase [2b5f629d-d688-5b77-993f-72d75c75574e] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

Stacktrace:
 [1] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1089
 [2] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [3] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997
 [4] include
   @ ./Base.jl:418 [inlined]
 [5] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
   @ Base ./loading.jl:1318
 [6] top-level scope
   @ none:1
 [7] eval
   @ ./boot.jl:373 [inlined]
 [8] eval(x::Expr)
   @ Base.MainInclude ./client.jl:453
 [9] top-level scope
   @ none:1
in expression starting at /tmp/DifferentialEquations.jl/src/DifferentialEquations.jl:1
ERROR: Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to /home/fxw/.julia/compiled/v1.7/DifferentialEquations/jl_GXNkxl.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997

(DifferentialEquations) pkg> instantiate
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Installed StrideArraysCore ─────── v0.2.9
   Installed ExponentialUtilities ─── v1.10.2
   Installed DiffEqBase ───────────── v6.79.0
   Installed BandedMatrices ───────── v0.16.11
   Installed Sundials ─────────────── v4.9.0
   Installed VectorizationBase ────── v0.21.23
   Installed SciMLBase ────────────── v1.24.0
   Installed StochasticDiffEq ─────── v6.43.0
   Installed NLsolve ──────────────── v4.5.1
   Installed NonlinearSolve ───────── v0.3.12
   Installed LinearSolve ──────────── v1.2.5
   Installed DiffEqCallbacks ──────── v2.19.0
   Installed Setfield ─────────────── v0.8.1
   Installed DiffEqNoiseProcess ───── v5.9.0
   Installed VertexSafeGraphs ─────── v0.2.0
   Installed DEDataArrays ─────────── v0.2.0
   Installed LabelledArrays ───────── v1.6.7
   Installed DelayDiffEq ──────────── v5.32.4
   Installed LoopVectorization ────── v0.12.100
   Installed IterativeSolvers ─────── v0.9.2
   Installed Polyester ────────────── v0.5.5
   Installed Sundials_jll ─────────── v5.2.1+0
   Installed FastClosures ─────────── v0.3.2
   Installed DiffEqJump ───────────── v8.0.0
   Installed ResettableStacks ─────── v1.1.1
   Installed ThreadingUtilities ───── v0.4.7
   Installed TriangularSolve ──────── v0.1.8
   Installed RecursiveArrayTools ──── v2.22.0
   Installed OrdinaryDiffEq ───────── v6.0.3
   Installed CommonSolve ──────────── v0.2.0
   Installed FastBroadcast ────────── v0.1.12
   Installed BoundaryValueDiffEq ──── v2.7.1
   Installed RecursiveFactorization ─ v0.2.6
   Installed PreallocationTools ───── v0.2.1
   Installed SparseDiffTools ──────── v1.19.3
   Installed KLU ──────────────────── v0.2.3
   Installed Krylov ───────────────── v0.7.9
   Installed SteadyStateDiffEq ────── v1.6.6
   Installed KrylovKit ────────────── v0.5.3
  Downloaded artifact: Sundials
    Updating `/tmp/DifferentialEquations.jl/Project.toml`
  [764a87c0] + BoundaryValueDiffEq v2.7.1
  [bcd4f6db] + DelayDiffEq v5.32.4
  [2b5f629d] + DiffEqBase v6.79.0
  [459566f4] + DiffEqCallbacks v2.19.0
  [c894b116] + DiffEqJump v8.0.0
  [77a26b50] + DiffEqNoiseProcess v5.9.0
  [7ed4a6bd] + LinearSolve v1.2.5
  [1dea7af3] + OrdinaryDiffEq v6.0.3
  [731186ca] + RecursiveArrayTools v2.22.0
  [189a3867] + Reexport v1.2.2
  [9672c7b4] + SteadyStateDiffEq v1.6.6
  [789caeaf] + StochasticDiffEq v6.43.0
  [c3572dad] + Sundials v4.9.0
    Updating `/tmp/DifferentialEquations.jl/Manifest.toml`
  [79e6a3ab] + Adapt v3.3.2
  [ec485272] + ArnoldiMethod v0.2.0
  [4fba245c] + ArrayInterface v3.2.2
  [4c555306] + ArrayLayouts v0.7.8
  [aae01518] + BandedMatrices v0.16.11
  [62783981] + BitTwiddlingConvenienceFunctions v0.1.1
  [764a87c0] + BoundaryValueDiffEq v2.7.1
  [fa961155] + CEnum v0.4.1
  [2a0fbf3d] + CPUSummary v0.1.6
  [d360d2e6] + ChainRulesCore v1.11.3
  [9e997f8a] + ChangesOfVariables v0.1.2
  [fb6a15b2] + CloseOpenIntervals v0.1.4
  [38540f10] + CommonSolve v0.2.0
  [bbf7d656] + CommonSubexpressions v0.3.0
  [34da2185] + Compat v3.41.0
  [187b0558] + ConstructionBase v1.3.0
  [754358af] + DEDataArrays v0.2.0
  [9a962f9c] + DataAPI v1.9.0
  [864edb3b] + DataStructures v0.18.11
  [e2d170a0] + DataValueInterfaces v1.0.0
  [bcd4f6db] + DelayDiffEq v5.32.4
  [b429d917] + DensityInterface v0.4.0
  [2b5f629d] + DiffEqBase v6.79.0
  [459566f4] + DiffEqCallbacks v2.19.0
  [c894b116] + DiffEqJump v8.0.0
  [77a26b50] + DiffEqNoiseProcess v5.9.0
  [163ba53b] + DiffResults v1.0.3
  [b552c78f] + DiffRules v1.9.0
  [b4f34e82] + Distances v0.10.7
  [31c24e10] + Distributions v0.25.37
  [ffbed154] + DocStringExtensions v0.8.6
  [d4d017d3] + ExponentialUtilities v1.10.2
  [7034ab61] + FastBroadcast v0.1.12
  [9aa1b823] + FastClosures v0.3.2
  [1a297f60] + FillArrays v0.12.7
  [6a86dc24] + FiniteDiff v2.8.1
  [f6369f11] + ForwardDiff v0.10.24
  [069b7b12] + FunctionWrappers v1.1.2
  [86223c79] + Graphs v1.4.1
  [3e5b6fbb] + HostCPUFeatures v0.1.5
  [0e44f5e4] + Hwloc v2.0.0
  [615f187c] + IfElse v0.1.1
  [d25df0c9] + Inflate v0.1.2
  [3587e190] + InverseFunctions v0.1.2
  [92d709cd] + IrrationalConstants v0.1.1
  [42fd0dbc] + IterativeSolvers v0.9.2
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [692b3bcd] + JLLWrappers v1.3.0
  [ef3ab10e] + KLU v0.2.3
  [ba0b0d4f] + Krylov v0.7.9
  [0b1a1467] + KrylovKit v0.5.3
  [2ee39098] + LabelledArrays v1.6.7
  [10f19ff3] + LayoutPointers v0.1.4
  [d3d80556] + LineSearches v7.1.1
  [7ed4a6bd] + LinearSolve v1.2.5
  [2ab3a3ac] + LogExpFunctions v0.3.6
  [bdcacae8] + LoopVectorization v0.12.100
  [1914dd2f] + MacroTools v0.5.9
  [d125e4d3] + ManualMemory v0.1.6
  [e1d29d7a] + Missings v1.0.2
  [46d2c3a1] + MuladdMacro v0.2.2
  [d41bc354] + NLSolversBase v7.8.2
  [2774e3e8] + NLsolve v4.5.1
  [77ba4419] + NaNMath v0.3.6
  [8913a72c] + NonlinearSolve v0.3.12
  [6fe1bfb0] + OffsetArrays v1.10.8
  [429524aa] + Optim v1.6.0
  [bac558e1] + OrderedCollections v1.4.1
  [1dea7af3] + OrdinaryDiffEq v6.0.3
  [90014a1f] + PDMats v0.11.5
  [d96e819e] + Parameters v0.12.3
  [e409e4f3] + PoissonRandom v0.4.0
  [f517fe37] + Polyester v0.5.5
  [1d0040c9] + PolyesterWeave v0.1.2
  [85a6dd25] + PositiveFactorizations v0.2.4
  [d236fae5] + PreallocationTools v0.2.1
  [21216c6a] + Preferences v1.2.3
  [1fd47b50] + QuadGK v2.4.2
  [74087812] + Random123 v1.4.2
  [e6cf234a] + RandomNumbers v1.5.3
  [3cdcf5f2] + RecipesBase v1.2.1
  [731186ca] + RecursiveArrayTools v2.22.0
  [f2c3362d] + RecursiveFactorization v0.2.6
  [189a3867] + Reexport v1.2.2
  [ae029012] + Requires v1.2.0
  [ae5879a3] + ResettableStacks v1.1.1
  [79098fc4] + Rmath v0.7.0
  [3cdde19b] + SIMDDualNumbers v0.1.0
  [94e857df] + SIMDTypes v0.1.0
  [476501e8] + SLEEFPirates v0.6.28
  [0bca4576] + SciMLBase v1.24.0
  [efcf1570] + Setfield v0.8.1
  [699a6c99] + SimpleTraits v0.9.4
  [a2af1166] + SortingAlgorithms v1.0.1
  [47a9eef4] + SparseDiffTools v1.19.3
  [276daf66] + SpecialFunctions v2.0.0
  [aedffcd0] + Static v0.4.1
  [90137ffa] + StaticArrays v1.3.0
  [82ae8749] + StatsAPI v1.2.0
  [2913bbd2] + StatsBase v0.33.14
  [4c63d2b9] + StatsFuns v0.9.14
  [9672c7b4] + SteadyStateDiffEq v1.6.6
  [789caeaf] + StochasticDiffEq v6.43.0
  [7792a7ef] + StrideArraysCore v0.2.9
  [c3572dad] + Sundials v4.9.0
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.6.1
  [8290d209] + ThreadingUtilities v0.4.7
  [a2a6695c] + TreeViews v0.3.0
  [d5829a12] + TriangularSolve v0.1.8
  [3a884ed6] + UnPack v1.0.2
  [3d5dd08c] + VectorizationBase v0.21.23
  [19fa3120] + VertexSafeGraphs v0.2.0
  [700de1a5] + ZygoteRules v0.2.2
  [e33a78d0] + Hwloc_jll v2.5.0+0
  [efe28fd5] + OpenSpecFun_jll v0.5.5+0
  [f50d1b31] + Rmath_jll v0.3.0+0
  [fb77eaff] + Sundials_jll v5.2.1+0
  [0dad84c5] + ArgTools
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [8ba89e20] + Distributed
  [f43a241f] + Downloads
  [9fa8497b] + Future
  [b77e0a4c] + InteractiveUtils
  [b27032c2] + LibCURL
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [1a1011a3] + SharedArrays
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [4607b0f0] + SuiteSparse
  [fa267f1f] + TOML
  [a4e569a6] + Tar
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll
  [deac9b47] + LibCURL_jll
  [29816b5a] + LibSSH2_jll
  [c8ffd9c3] + MbedTLS_jll
  [14a3606d] + MozillaCACerts_jll
  [4536629a] + OpenBLAS_jll
  [05823500] + OpenLibm_jll
  [bea87d4a] + SuiteSparse_jll
  [83775a58] + Zlib_jll
  [8e850b90] + libblastrampoline_jll
  [8e850ede] + nghttp2_jll
  [3f19e933] + p7zip_jll

julia> using Diff
ERROR: ArgumentError: Package Diff not found in current path:
- Run `import Pkg; Pkg.add("Diff")` to install the Diff package.

Stacktrace:
 [1] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:967

julia> using DifferentialEquations
[ Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]

However, minimal example of @IanButterworth works:

(@v1.7) pkg> activate --temp
  Activating new project at `/tmp/jl_Cx0fcj`

(jl_Cx0fcj) pkg> add Example
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
   Installed Example ─ v0.5.3
    Updating `/tmp/jl_Cx0fcj/Project.toml`
  [7876af07] + Example v0.5.3
    Updating `/tmp/jl_Cx0fcj/Manifest.toml`
  [7876af07] + Example v0.5.3
Precompiling project...
  1 dependency successfully precompiled in 0 seconds

(jl_Cx0fcj) pkg> st
      Status `/tmp/jl_Cx0fcj/Project.toml`
  [7876af07] Example v0.5.3

shell> rm -rf ~/.julia/packages/Example

(jl_Cx0fcj) pkg> st
      Status `/tmp/jl_Cx0fcj/Project.toml`
→ [7876af07] Example v0.5.3
        Info packages marked with → not downloaded, use `instantiate` to download
KristofferC commented 2 years ago

The reason for this is that there is no manifest in your example. There are therefore no versions to check against.