JuliaLang / Juleps

Julia Enhancement Proposals
Other
67 stars 24 forks source link

Pkg3: default pkg/depot precedence clarification #19

Closed rofinn closed 7 years ago

rofinn commented 7 years ago

Hi folks,

The Pkg3 julep looks really good so far! I was a little confused about the language describing pkg precedence across the union of depots.

Some environment and/or Julia variable – DEPOT_PATH maybe? – will control the set of depots visible to a Julia process. The registries, libraries, packages, and environments visible to Julia are the union across all depots in the depot path ... The set of installed library versions is the union across depots. If the same library version occurs multiple times in the depot path, the first occurance is used – different instances of the same library version may be different depending on how they are configured and installed. The set of installed package versions is the union across depots. If the same package version occurs multiple times in the depot path, the first occurance is used

Does this mean that the ordering of the depot paths in the DEPOT_PATH environment variable determines pkg precedence? For example, if we have something like JULIA_DEPOT_PATH=/home/Julia/.julia:/usr/local/share/julia/system:/usr/local/share/julia/standard then user packages would take precedence over system packages and so on?

StefanKarpinski commented 7 years ago

If the same version is installed in multiple depots, then the first one would take precedence, like in the PATH – so yes, the user copy would be used in preference to the system copy. However, since the set of available versions is a union across depots, you wouldn't generally install a user copy if the system already has that version installed. There's going to have to be a pkg> gc function that looks for and removes unused package versions, which could also (optionally) remove user copies of packages that exactly match system copies, to avoid having multiples.

rofinn commented 7 years ago

Okay, thanks for clarifying. On a separate point, is there a better platform for asking these minor questions? Opening an issue just feels a little noisy.

StefanKarpinski commented 7 years ago

No, this is ok. I guess we could use discourse too.