JuliaLang / Pkg.jl

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

Resolve should notice when you are being version bound to require something apparently not released yet (due to registry being out of date) #3713

Open oxinabox opened 9 months ago

oxinabox commented 9 months ago

If my registry is out of date, but I close a project that someone else has been working on (perhaps with a manifest), then I can have a (direct or indirect) dependency that resolve thinks it can't satisfy due to it being a larger version number than anything in the registry.

For example

(MyProject) pkg> resolve
ERROR: Unsatisfiable requirements detected for package MathTeXEngine [0a4f8689]:
 MathTeXEngine [0a4f8689] log:
 ├─possible versions are: 0.1.0 - 0.5.6 or uninstalled
 └─restricted to versions 0.5.7 by an explicit requirement — no versions left

The solution in this case is to update the registry, either directly via registry update or via something like up which will trigger an update. Pkg could notice this and prompt you to update registry, that would be clearer than this error.

Technically there are 4 ways I know this can occur

  1. Out of date registry (as described above)
  2. Direct dependency, which is supposed to be deved to a version that has the update in its Project.toml (love that feature that that works)
  3. the release has been made but it is in a registry you don't have installed
  4. there was a mistake in the [compat] section of the Project.toml

I think 1 is the most likely so we could have a helpful message suggesting that as a first thing to try?

oxinabox commented 8 months ago

Arguably this is a duplicate of https://github.com/JuliaLang/Pkg.jl/issues/3649