JuliaLang / Pkg.jl

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

proposal: distinguish explicitly vs implicitly added registries #3880

Open StefanKarpinski opened 2 months ago

StefanKarpinski commented 2 months ago

Right now we don't distinguish between whether a registry was added explicitly by the user via registry add X or it was automatically/implicitly added because the user didn't have any registries added and the package server offers it. This leads to various confusions:

Instead, I would propose that we have two kinds of registries:

  1. Explicitly added registries, which are always considered until the user explicitly removes them.
  2. Implicitly added registries, which are only considered if the current package server offers them.

We could consider gc'ing implicitly added registries if they haven't been offered in a long time, so we may want to keep track of the last time we talked to a package server that offered an implicitly added registry. This would alleviate the above issues:

Thoughts on this approach. Spurred by having long wanted this and conversation with @KristofferC and @keno.

johnnychen94 commented 2 months ago

FYI, #3503 is a concrete example for this.