This change saves PowerShell modules used in the Azure Pipelines to a
cache, and loads them when required. This is intended to prevent random
failures when the PowerShell Gallery fails to provide the requested
modules. These failures occur at random, possibly as a result of a
backpressure mechanism.
This change will also speed up all Windows Azure Pipelines jobs, since
downloads from the PowerShell Gallery will no longer be necessary.
This prevents `list-*` from printing any module whose uncompressed size
is 40 bytes or less.
I have found a couple of modules that are exactly 40 bytes, and they
include no files, only empty directories. If any user tries to install
these modules, they will think that aqt failed to install the module
without printing any error message. I prefer to avoid this issue
by preventing `aqt list-*` from printing them.
`aqt install-*` is unaffected by this change, and it can still install
modules that contain no files. It is likely that we will need to print
a warning when this occurs.
If any user disagrees with the threshold value of 40 bytes, they are
free to adjust that value to their liking in `settings.ini`.
Previously, the Azure Pipeline build for `install-example` tried to install the module
`qtlottie`, which consists of an empty archive.
This change replaces the `qtlottie` module with `qtcharts`, which consists of a small
but non-empty archive.
This allows a user to turn on `--keep` every time they run the program,
and to set the default archive destination when `--keep` is turned on.
Using `--archive-dest` overrides the archive destination in setting.ini.
This adds the parameter `archive_dest` to `run_installer`, which will
control where `helper.downloadBinaryFile` will download files, and sets
it to "." by default.
For convenience/readability, this will also turn any reference to the
downloaded file into a `pathlib.Path` object. This makes it easier to
ensure that the file ends up in the right location.
This changes the CLI so that the `target` parameter for `install-src`,
`install-doc`, and `install-example` is now ignored, and "desktop" is
substituted for anything the user inputs. The only valid option here
is "desktop" anyway, so the user should be forgiven for trying to input
anything else.
It may be better to remove `target` from the parameter list, but that's
a big change to the interface that could break a lot of dependent code.
This updates CI and unit tests to monitor behavior of
`install-src/doc/example`, now that the `target` parameter has been
deprecated. This makes sure that the `target` parameter is optional,
and that the CLI warns the user that `target` is deprecated when a user
uses it.
[CI tests]:
This adds a test to `install-src/doc/example` Azure Pipeline jobs to
ensure that the desired files are installed, using `ls`.
This also changes some of the archives installed to `qtlottie`, which
is a particularly small file.
This also adds a build job for `install-example`.
[Unit tests]:
This adds tests for `install-src`, with and without the `target`
parameter.
It also fixes existing tests for `install-doc`, to account for
changes to the `target` parameter.
The current CI test for QtIFW assumes that QtIFW will always be version 4.1.
The last run of the Azure Pipeline demonstrated what happens when the Qt repo
updates QtIFW to the next version: The test fails.
This change should make the CI test resilient to version updates.