PowerShell / PowerShell/PSResourceGet
Update-Module: Dedupe modules
Open
Nobody has claimed this yet.
Area-Update
Issue-Enhancement
- Dominant language
- C#
- Stars
- 576
- Forks
- 114
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- 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'
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing Update-Module -Force -Verbose with the provided ripgrep command and inspect update.log, especially the repeated Az.Accounts entries. Read the Update-Module implementation and its dependency handling; done means each unique module/version is installed once and dependent modules are handled through dependency resolution rather than root-module updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100