JuliaLang / Pkg.jl

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

`Add` requires weakdeps to be accessible in the available registries #3766

Open agerlach opened 5 months ago

agerlach commented 5 months ago

Currently adding a package with a weakdep requires the weakdep to be present in an available registry. However, it seems reasonable that a package may have a weakdep that isn't available to all potential users or is a local dev package.

Example

I have PkgA on local registry A and PkgB on local registry B. Is it possible to make PkgB a weakdep to PkgA where a user of PkgA may not have access to registry B. I would think this should be possible but I get something like the following, where the UUID is for PkgB.

pkg> add PkgA
   Resolving package versions...
ERROR: cannot find name corresponding to UUID 5f2853af-5fcd-4df5-818b-ccf2a074bbd0 in a registry
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: macOS (x86_64-apple-darwin22.4.0)
  CPU: 12 × Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
  Threads: 14 on 12 virtual cores
Environment:
  JULIA_NUM_THREADS = 10
  JULIA_EDITOR = code

Julia installed via juliaup

KristofferC commented 5 months ago

Yeah, I think that should be allowed.