PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

Update-Module: Dedupe modules

Open vbjay opened this issue 2 years ago • 1 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest released version
  • [X] Search the existing issues.

Steps to reproduce

I used ripgrep but any grep tool can be used

Update-Module  -Force -Verbose > .\update.log
rg -n Az\.Accounts.*version .\update.log > 'az accounts.txt'

az accounts.txt update.log

Expected behavior

Update each unique module/version combo and not have Az.Accounts.2.13.2 for example re-installed multiple times.  Dedupe the unique found versions.  Along with detect dependent vs root modules and only update the root modules and let the dependency functionality install the dependent modules.

Actual behavior

Az.Accounts.2.13.2 and other modules were re-installed multiple times instead of unique module/versions being installed once each.

Error details

No error.  Just unnecessary repetition.

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.0
PSEdition                      Core
GitCommitId                    7.4.0
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

vbjay avatar Nov 28 '23 21:11 vbjay

Thanks @vbjay this would be fixed forward with the dependency graph changes coming to PSResourceGet

SydneyhSmith avatar Dec 04 '23 19:12 SydneyhSmith