]> _ Git - alire.git/commit
Refactor the expression loader (#702)
authorAlejandro R Mosteo <alejandro@mosteo.com>
Tue, 9 Mar 2021 18:36:29 +0000 (19:36 +0100)
committerGitHub <noreply@github.com>
Tue, 9 Mar 2021 18:36:29 +0000 (19:36 +0100)
commit556c9b8b136ac4c84f1b4a1db73f8370d7628c1f
treedad097b5c4a849ff6cb3a78402d59b921f581b3f
parent9e9aa4769067db19d349f510d7f112d16715596b
Refactor the expression loader (#702)

* Pseudotypes specs

* Preparations to replace the generics mesh

* Buildable with the new design, still unimplemented

Only stub bodies

* New expression loader complete, pending ptypes

* Renamed packages Pseudotypes.* to Expressions.*

* Alire.Expressions.* implementation complete

* All functionality complete, tests missing

* System externals now reuse dynamic loaders

* Fixes found by the testsuite, and output tweaks

There is a functional difference that affects the output for some tests:
before, all enum cases received a value, even if it came from an "others"
clause. This meant that all cases were explicitly listed. Now, the "others" is
stored as is, and the output reproduces the contents of the TOML structure. A
few tests had to be adjusted for this.

* Fixes found testing the current stable index

* Remove obsolete documentation

* Implement and test 'x|y' expressions

* Improve output of `alr show` for system packages

* Fixes found during self-review: comments, dead code

* Fix for system externals report

* Alternative implementation for older GNATs
64 files changed:
doc/catalog-format-spec.md
src/alire/alire-conditional.ads
src/alire/alire-conditional_trees-case_nodes.adb [new file with mode: 0644]
src/alire/alire-conditional_trees-case_nodes.ads [new file with mode: 0644]
src/alire/alire-conditional_trees-cases.adb [deleted file]
src/alire/alire-conditional_trees-cases.ads [deleted file]
src/alire/alire-conditional_trees-toml_load.adb [new file with mode: 0644]
src/alire/alire-conditional_trees-toml_load.ads [new file with mode: 0644]
src/alire/alire-conditional_trees.adb
src/alire/alire-conditional_trees.ads
src/alire/alire-crates.adb
src/alire/alire-crates.ads
src/alire/alire-dependencies-states.adb
src/alire/alire-expressions-enums.adb [new file with mode: 0644]
src/alire/alire-expressions-enums.ads [new file with mode: 0644]
src/alire/alire-expressions-maps.adb [new file with mode: 0644]
src/alire/alire-expressions-maps.ads [new file with mode: 0644]
src/alire/alire-expressions.adb [new file with mode: 0644]
src/alire/alire-expressions.ads [new file with mode: 0644]
src/alire/alire-externals-from_system.adb
src/alire/alire-externals-from_system.ads
src/alire/alire-externals.adb
src/alire/alire-externals.ads
src/alire/alire-features-index.adb
src/alire/alire-features-index.ads
src/alire/alire-index_on_disk.adb
src/alire/alire-index_on_disk.ads
src/alire/alire-manifest.adb
src/alire/alire-platforms.ads
src/alire/alire-properties-from_toml.adb
src/alire/alire-properties-from_toml.ads
src/alire/alire-properties-labeled.adb
src/alire/alire-properties-labeled.ads
src/alire/alire-publish.adb
src/alire/alire-releases.adb
src/alire/alire-releases.ads
src/alire/alire-roots-optional.adb
src/alire/alire-toml_adapters.adb
src/alire/alire-toml_adapters.ads
src/alire/alire-toml_expressions-cases.adb [deleted file]
src/alire/alire-toml_expressions-cases.ads [deleted file]
src/alire/alire-toml_expressions.adb [deleted file]
src/alire/alire-toml_expressions.ads [deleted file]
src/alire/alire-toml_index.adb
src/alire/alire-toml_index.ads
src/alire/alire-toml_keys.ads
src/alire/alire-toml_load.adb
src/alire/alire-toml_load.ads
src/alire/alire-utils.adb
src/alire/alire-utils.ads
src/alr/alr-commands-index.adb
src/alr/alr-commands-show.adb
src/alr/alr-commands-withing.adb
src/alr/alr-commands.adb
src/alr/alr-commands.ads
testsuite/fixtures/cases_index/he/hello/hello-0.9.0.toml [new file with mode: 0644]
testsuite/fixtures/cases_index/he/hello/hello-1.0.1.toml
testsuite/fixtures/cases_index/li/libhello/libhello-1.0.0-linuxonly.toml
testsuite/tests/index/case-expressions/test.py
testsuite/tests/index/environment/test.py
testsuite/tests/index/external-available/test.py
testsuite/tests/index/origin-filesystem-bad-path/test.py
testsuite/tests/index/too-long-short-description/test.py
testsuite/tests/with/dynamic-dependencies/test.py