]> _ Git - alire.git/commit
Lazy index loading (2/2) (#1086)
authorAlejandro R Mosteo <amosteo@unizar.es>
Wed, 20 Jul 2022 10:52:54 +0000 (12:52 +0200)
committerGitHub <noreply@github.com>
Wed, 20 Jul 2022 10:52:54 +0000 (12:52 +0200)
commitcce020a5078c6158f0c20b12807270b7c32858eb
tree76420a11c3b0347e27139778732e5720b19009d5
parentd645482c65a245e96431758fe0d6dfb054af1a9e
Lazy index loading (2/2) (#1086)

* Index queries autoload crates if required

* Avoid infinite recursion when no indexes configured

* Remove references to Requires_Full_Index

* Fixed issues pending "provides" redo

* Generate and use a providers cache file

This cache file, which is common to all indexes, tells us in advance which
crates have to be loaded because they provide some another crate. E.g., if
"gnat" is requested to be loaded, we need to load all gnat_native, and
x-compilers.

If this file doesn't exist, we can only be sure by loading the full index, at
which time the file is regenerated for future use.

* Fix bug where all crates with same prefix were loaded

E.g. we were loading all gn* when only gnat_native needed to be loaded

* Fix providers generation when no index configured

* Add spinner during index load

* Remove the now redundant external aliases collection

* Removed last instances of forced index loading

* Fix for older compilers

* Test for the generated metadata file

* publishing.md: note about private indexes and "provides"

* Post-merge fix

Co-authored-by: GHA <actions@github.com>
17 files changed:
doc/publishing.md
src/alire/alire-containers.ads
src/alire/alire-crates.adb
src/alire/alire-index.adb
src/alire/alire-index.ads
src/alire/alire-index_on_disk-loading.adb
src/alire/alire-index_on_disk.ads
src/alire/alire-provides.adb
src/alire/alire-provides.ads
src/alire/alire-shared.adb
src/alire/alire-solver.adb
src/alire/alire-toml_index.adb
src/alr/alr-commands-show.adb
testsuite/tests/provides/metadata/my_index/index/cr/crate/crate-1.0.0.toml [new file with mode: 0644]
testsuite/tests/provides/metadata/my_index/index/index.toml [new file with mode: 0644]
testsuite/tests/provides/metadata/test.py [new file with mode: 0644]
testsuite/tests/provides/metadata/test.yaml [new file with mode: 0644]