]> _ Git - alire.git/commit
Update automatically after manual manifest edition or missing dependency detection...
authorAlejandro R Mosteo <alejandro@mosteo.com>
Thu, 16 Jul 2020 08:47:19 +0000 (09:47 +0100)
committerGitHub <noreply@github.com>
Thu, 16 Jul 2020 08:47:19 +0000 (09:47 +0100)
commit90b05212e4576e3c82c874eae74ef43b8d843667
treea57615e4b37f917ed5fd76a07ee158d83d215bda
parentb1bfd7ca0c321c52111b5cc2d4e1b431201f3a5d
Update automatically after manual manifest edition or missing dependency detection (#472)

* Remove redundant parameter in Alire.Workspace

Environment can now be retrieved from Alire.Roots.Root.

* New Alire.Roots.Sync_Solution_And_Deps

This procedure verifies that the lockfile is not older than the manifest, and
that all dependencies in the solution exist on disk. Otherwise, dependencies
are redeployed.

* Refactor/cleanup paths from Alire.Paths

The dependency path is always used in the context of an Alire.Roots.Root, so it
is more meaningful being defined there.

Also removed the cache path that wasn't used anywhere.

* Checks against reexporting the same environment

* Refactor Alr.Commands.Requires_Full_Index into Alire

This way, the index loading can be triggered by logic in Alire that absolutely
requires the index to be loaded.

* Do not auto update before `alr update`

* Refactor Confirm_Solution_Changes into Alire

From Alr.Commands.User_Input into Alire.Utils.User_Input.

* Tests for the new sync features

- Test that a manually modified manifest results in an autosync
- Test that missing dependencies in the cache are redeployed

* Fix elaboration circularity
25 files changed:
src/alire/alire-environment.adb
src/alire/alire-features-index.adb
src/alire/alire-features-index.ads
src/alire/alire-index.ads
src/alire/alire-paths.ads
src/alire/alire-roots.adb
src/alire/alire-roots.ads
src/alire/alire-solutions-diffs.adb
src/alire/alire-solutions-diffs.ads
src/alire/alire-utils-user_input.adb
src/alire/alire-utils-user_input.ads
src/alire/alire-workspace.adb
src/alire/alire-workspace.ads
src/alr/alr-commands-get.adb
src/alr/alr-commands-pin.adb
src/alr/alr-commands-update.adb
src/alr/alr-commands-user_input.adb
src/alr/alr-commands-user_input.ads
src/alr/alr-commands-withing.adb
src/alr/alr-commands.adb
src/alr/alr-commands.ads
testsuite/tests/misc/sync-manual-edit/test.py [new file with mode: 0644]
testsuite/tests/misc/sync-manual-edit/test.yaml [new file with mode: 0644]
testsuite/tests/misc/sync-missing-deps/test.py [new file with mode: 0644]
testsuite/tests/misc/sync-missing-deps/test.yaml [new file with mode: 0644]