-
-
Notifications
You must be signed in to change notification settings - Fork 285
Description
The following has bitten me and colleagues many times: we want to install the latest version of a package (e.g. CxxWrap), so I do ] update CxxWrap, and I see this:
(v1.3) pkg> update CxxWrap
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `~/.julia/environments/v1.3/Project.toml`
[no changes]
Updating `~/.julia/environments/v1.3/Manifest.toml`
[no changes]
Odd, I wonder, nothing happened... Did I already have the latest version? Hm, let's check:
(v1.3) pkg> status CxxWrap
Status `~/.julia/environments/v1.3/Project.toml`
[b99e7846] BinaryProvider v0.5.8
[1f15a43c] CxxWrap v0.8.2
Oh no, that's not the latest. Which leads me to my first question:
- Is there any way to find out what the latest version of a package from the Julia REPL? Or get a list of all available package versions?
What's going on? Well, after some searching around, I may discover that some other package has a dependency on CxxWrap with an upper bound that prevents any newer version of CxxWrap installed. The only way I found to do that was to manually go through each installed/active package, and look at its dependencies. So my second question:
- Is there any way to get a list of active packages that depend on a given package?
And finally, the feature request from the headline of this issue:
- Would it be possible/acceptable/... to change the behavior of
updateto print a warning if a package is not updated to the latest due to a constraint?
I can simulate this by removing the package and then adding it back with a version constraint:
(v1.3) pkg> rm CxxWrap
Updating `~/.julia/environments/v1.3/Project.toml`
[1f15a43c] - CxxWrap v0.8.2
Updating `~/.julia/environments/v1.3/Manifest.toml`
[no changes]
(v1.3) pkg> add CxxWrap@0.9.0
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Singular [bcd08a7b]:
Singular [bcd08a7b] log:
├─possible versions are: 0.1.0 or uninstalled
├─restricted to versions 0.1.0 by an explicit requirement, leaving only versions 0.1.0
└─restricted by compatibility requirements with CxxWrap [1f15a43c] to versions: uninstalled — no versions left
└─CxxWrap [1f15a43c] log:
├─possible versions are: [0.7.0-0.7.4, 0.8.0-0.8.2, 0.9.0] or uninstalled
└─restricted to versions 0.9.0 by an explicit requirement, leaving only versions 0.9.0
But that requires me to know that a newer version is available (see question 1); I guess if there was a "pseudo version" to indicate the latest, that'd also work; something like add CxxWrape@latest ?
Also, it seems I have to remove the package first? At least I couldn't figure out a way to make a version specifier work with update; doing ]update CxxWrap@0.9.0 does the same as update CxxWrap.
CC @fieker