Pkg.jl: bypass registry sync when handling stdlib packages

Created on 18 Nov 2020  路  6Comments  路  Source: JuliaLang/Pkg.jl

General does not record state for stdlib packages AFAIK. In that case, maybe it shouldn't be required to sync with the general registry when adding a stdlib to a project.

位 julia -q --project=@.
(Si1Client) pkg> add Dates
   Updating registry at `D:\Users\FNORO\.julia\registries\General`

I remember this discussion before, but I couldn't find an issue. I'm sorry if this is something already settled or if there is already a solution that I'm not aware of.

Most helpful comment

Hm, I still think there is some value doing it sometimes on add. Just so it doesn't drift too far off.

All 6 comments

Instead, maybe we should just update the registry a bit more seldom on add. One time per session is perhaps excessive..

If you wanna go on that direction, I would suggest to never sync to registry during an add command. For that we have the update. It would be a bit less user-friendly, but helpful in a few corner-case situations.

Hm, I still think there is some value doing it sometimes on add. Just so it doesn't drift too far off.

We used to (pre-1.0) not update the registry on add, only on up and it was very, very confusing to people.

Maybe it should just bypass registry sync when the set of package names that the command receives contains only stdlib packages.

Seems like a micro-optimization thats probalby not worth it. We could consider updating more seldom, but I don't think it is a good idea to base that on whether you work with stdlibs or not.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timholy picture timholy  路  4Comments

GregPlowman picture GregPlowman  路  3Comments

dpsanders picture dpsanders  路  3Comments

jebej picture jebej  路  3Comments

KristofferC picture KristofferC  路  4Comments