]> _ Git - alire.git/commit
Automatically narrow down dependencies given as "any" (#675)
authorAlejandro R Mosteo <alejandro@mosteo.com>
Wed, 3 Feb 2021 10:55:10 +0000 (11:55 +0100)
committerGitHub <noreply@github.com>
Wed, 3 Feb 2021 10:55:10 +0000 (11:55 +0100)
commita689ee3db955cebbb161189ee927475f84ce8b91
tree5c04406fb156fb9a7e38c2257c0375184cb9c3a0
parentab52bbe6f145bff4d38f723d3efe8b3bec504ff1
Automatically narrow down dependencies given as "any" (#675)

* Implement narrowing down of new "any" dependencies

Instead of adding just a foo* dependency, check how it was solved and use that
version to add a more precise (and usually wanted) dependency; e.g., foo^1.2,
foo~0.1

* Fix case of dependency removal

* New test and fixed other tests to new behavior

Many tests explicitly check the added dependencies, so this is extra assurance
about this change.

* Recognize the wildcard as "any" version

* Document user-visible changes

* Add option to disable new behavior
27 files changed:
doc/user-changes.md
src/alire/alire-conditional.ads
src/alire/alire-config-edit.ads
src/alire/alire-config.ads
src/alire/alire-milestones.adb
src/alire/alire-solutions.adb
src/alire/alire-solutions.ads
src/alr/alr-commands-withing.adb
testsuite/tests/pin/change-type/test.py
testsuite/tests/pin/downgrade/test.py
testsuite/tests/pin/missing-version/test.py
testsuite/tests/pin/pin-dir/test.py
testsuite/tests/solver/one-dep-two-constraints/test.py
testsuite/tests/update/missing-deps/test.py
testsuite/tests/update/pinned/test.py
testsuite/tests/update/selective/test.py
testsuite/tests/with/add-several/test.py
testsuite/tests/with/changes-info/test.py
testsuite/tests/with/dynamic-dependencies/test.py
testsuite/tests/with/narrow-pre1/my_index/index/he/hello1/hello1-0.1.2.toml [new file with mode: 0644]
testsuite/tests/with/narrow-pre1/my_index/index/he/hello2/hello2-1.2.3.toml [new file with mode: 0644]
testsuite/tests/with/narrow-pre1/my_index/index/index.toml [new file with mode: 0644]
testsuite/tests/with/narrow-pre1/test.py [new file with mode: 0644]
testsuite/tests/with/narrow-pre1/test.yaml [new file with mode: 0644]
testsuite/tests/with/no-double-add/test.py
testsuite/tests/with/tree-switch/test.py
testsuite/tests/workflows/init-with-pin/test.py