PowerShell / PowerShell/PSResourceGet

Support v3 dependencies for pwsh packages

Open
#1,575 17 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Dependencies feature_request
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
  1. Register an authenticated Azure DevOps Artifacts PSResourceRepository that has the PowerShell Gallery configured as an upstream source. Use the Microsoft.PowerShell.SecureVault module as the source of credentials.
  2. Unregister the PowerShell Gallery resource repository.
  3. Install-PSResource PSWindowsUpdate
Expected behavior
The `PSWindowsUpdate` module and any dependencies are installed.
Actual behavior
The install appears to work, but the following warning is shown:

> WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies.
Error details

No response

Environment data
PS C:\temp> Get-Module Microsoft.PowerShell.PSResourceGet; $PSVersionTable

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     1.0.2                 Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Get-PSScriptFileInfo…}

Key   : PSVersion
Value : 7.4.0
Name  : PSVersion


Key   : PSEdition
Value : Core
Name  : PSEdition


Key   : GitCommitId
Value : 7.4.0
Name  : GitCommitId


Key   : OS
Value : Microsoft Windows 10.0.19044
Name  : OS


Key   : Platform
Value : Win32NT
Name  : Platform


Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0…}
Name  : PSCompatibleVersions


Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion


Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion


Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion
Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the authenticated Azure DevOps PSResourceRepository scenario with Install-PSResource PSWindowsUpdate on the reported PSResourceGet and PowerShell versions. Trace the V3 repository dependency-installation path and its warning; done means the module and its dependencies install without that warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, shell
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.