]> _ Git - alire.git/commit
Detect and use Alire metadata found in pinned directory (#450)
authorAlejandro R Mosteo <alejandro@mosteo.com>
Fri, 19 Jun 2020 19:09:09 +0000 (21:09 +0200)
committerGitHub <noreply@github.com>
Fri, 19 Jun 2020 19:09:09 +0000 (21:09 +0200)
commit0db9ca8c78370ebf7772023ad72c3fcff3c2b40b
tree0313b6b320f1a2b060ec7a61ce1cbd0ef1daf8ed
parent9a271f89f27c5b5869522a629df800c247dce8c3
Detect and use Alire metadata found in pinned directory (#450)

* Detect crate at linked dir and use its deps/paths

If a path given to with/pin --use contains a loadable alire workspace (i.e.,
for a crate manually initialized, or retrieved with `get`), the release found
there will be used to retrieve additional dependencies, and its project paths
will also be used.

* `with` directory with autodetection of crate

When adding a dependency as a pinned dir, and the target dir is a regular Alire
crate, we can autodetect the crate we are adding as dependency. In that case
the command becomes `alr with --use <path>`. This can also be useful in the
future for remote URLs that will also provide the crate being retrieved.

* Refactor --url to --use
23 files changed:
doc/user-changes.md
src/alire/alire-dependencies-states.adb
src/alire/alire-dependencies-states.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-workspace.adb
src/alr/alr-commands-pin.adb
src/alr/alr-commands-user_input.adb
src/alr/alr-commands-user_input.ads
src/alr/alr-commands-withing.adb
testsuite/tests/pin/dir-crate/test.py [new file with mode: 0644]
testsuite/tests/pin/dir-crate/test.yaml [new file with mode: 0644]
testsuite/tests/pin/dir-mismatch/test.py [new file with mode: 0644]
testsuite/tests/pin/dir-mismatch/test.yaml [new file with mode: 0644]
testsuite/tests/with/pin-dir-crate-autodetect/test.py [new file with mode: 0644]
testsuite/tests/with/pin-dir-crate-autodetect/test.yaml [new file with mode: 0644]
testsuite/tests/with/pin-dir-crate/test.py [new file with mode: 0644]
testsuite/tests/with/pin-dir-crate/test.yaml [new file with mode: 0644]
testsuite/tests/with/pin-dir-mismatch/test.py [new file with mode: 0644]
testsuite/tests/with/pin-dir-mismatch/test.yaml [new file with mode: 0644]