]> _ Git - alire.git/commit
Fix corner case when pinning to a not available version (#767)
authorAlejandro R Mosteo <alejandro@mosteo.com>
Fri, 2 Jul 2021 07:38:57 +0000 (09:38 +0200)
committerGitHub <noreply@github.com>
Fri, 2 Jul 2021 07:38:57 +0000 (09:38 +0200)
commitc12d28d9d3a69b403e99258e20f06f499dc4a5a3
tree9551c492fa0a2d43591f269193cb3fc865f6bfe1
parent1e8b397976227a77ab2db54303cfac703c38829f
Fix corner case when pinning to a not available version (#767)

* Less confusing user feedback for existing pin

* Typo in comment

* Fix for corner case in which no solution was found

The solution is impossible, but still an incomplete solution should be
returned. In essence, when the user requested an impossible situation by
applying a pin to a non-existent version for a crate already in the
dependencies, the solver reused the old version assuming it would succeed,
which was not the case if the pin is impossible.

* Better pin info separation

* Extra test case for pinning to unavailable version
13 files changed:
src/alire/alire-dependencies-states.ads
src/alire/alire-roots-editable.adb
src/alire/alire-roots-editable.ads
src/alire/alire-roots-optional.ads
src/alire/alire-roots.adb
src/alire/alire-roots.ads
src/alire/alire-solutions.adb
src/alire/alire-solutions.ads
src/alire/alire-solver.adb
src/alire/alire-solver.ads
testsuite/tests/pin/dir-mismatch/test.py
testsuite/tests/pin/version/test.py
testsuite/tests/with/pin-dir-mismatch/test.py