Closed christianacca closed 1 year ago
Hello, indeed the original version implicitly saved dependencies and fetched modules from a single repository. Version 5.0 tests did not cover this scenario and this version now allows searching in multiple repositories which causes some issues in some scenarios. I plan to correct this defect this month.
Hi, as I took the time to study the different cases, I think fixing the management of dependencies this month. Sorry for the delay.
Awesome thanks 😊
On Fri, 2 Jun 2023, 14:13 Laurent Dardenne, @.***> wrote:
Hi, as I took the time to study the different cases, I think fixing the management of dependencies this month. Sorry for the delay.
— Reply to this email directly, view it on GitHub https://github.com/potatoqualitee/psmodulecache/issues/50#issuecomment-1573715926, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGYOPXD5FZP75QQEPTLKZ3XJHRIHANCNFSM6AAAAAAXR5R2Y4 . You are receiving this because you authored the thread.Message ID: @.***>
I didn't forget, sorry for the wait.
I think fixing the management of dependencies this mont
The result with the next version (macOS) :
If a module and its requested version is already installed in the runner, we save it on disk and in the cache. Restoring the cache may therefore have generated warnings in the logs.
A module can be delivered in each runner but its version can be different. Each new version of a runner can upgrade the 'Az' module. An object cache is used by n runners of different OS. The 'standard GitHub-hosted runner' only contains stable versions of a module.
So if your code uses a specific version of the AZ module this involves using -Requiredversion when calling Import-Module.
Finally, the Module 'AZ' has dependencies using the same module (Az.Accounts) but with different versions. In this case Find-module -IncludeDependencies returns this module several times.
Works like a charm. Thank you very much
On Mon, 6 Nov 2023, 10:39 Laurent Dardenne, @.***> wrote:
Closed #50 https://github.com/potatoqualitee/psmodulecache/issues/50 as completed via d307360 https://github.com/potatoqualitee/psmodulecache/commit/d307360c9ba807f31c8315e35f14efe79fddd8a2 .
— Reply to this email directly, view it on GitHub https://github.com/potatoqualitee/psmodulecache/issues/50#event-10870902777, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGYOPWPUQWZQZHLXUQJE4LYDC44VAVCNFSM6AAAAAAXR5R2Y6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQHA3TAOJQGI3TONY . You are receiving this because you authored the thread.Message ID: @.***>
As of version 5.1, it appears only those modules directly referenced in the
modules-to-cache
list are cached, the module dependencies are no longer cached.This was not the case with v4.5 which cached not only the modules listed in
modules-to-cache
, but also the dependencies of those modules.Take the following usage of v4.5:
The above produces a cache that I believe includes the dependencies of the
Az
module (egAz.Accounts
). Note the size of the cache:On a subsequent execution of the workflow that includes the caching step, the cache is resolved and the workflow is able to import the powershell modules that it needs.
Take the following usage of v5.3:
The above produces a cache that I believe does NOT include the dependencies of the
Az
module (egAz.Accounts
). Note the size of the cache which is much smaller than the same cache when using v4.5:On a subsequent execution of the workflow that includes the caching step, the cache is resolved but the workflow fails to import one of the dependent powershell modules that it needs (see below screenshot). The ONLY difference between the example above and this example, is the version of potatoqualitee/psmodulecache