PowerShell / PowerShell/PSResourceGet

[Find-PSResource] To a same module into a local repository and a webserver repository, the content of the property 'VersionRange' of the dependency is different

Open
#1,369 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Find Issue-Bug
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

When I search the same module into a local repository and a webserver repository, the property 'VersionRange' of the dependency is different. The packages are identical into the both repository
Packages.zip

C:\temp> Get-PSresourceRepository|select *|ft

Name        Uri                                                              Trusted Priority CredentialInfo ApiVersion
----        ---                                                              ------- -------- -------------- ----------
PSRepoLocal file:///C:/Users/Laurent/AppData/Local/Temp/PSRepoLocal             True       40                     local
DevOttoMatt https://www.myget.org/F/devottomatt/api/v2                          True       50                        v2
PSGallery   https://www.powershellgallery.com/api/v2                            True       50                        v2
RepoTestV3  https://nuget.cloudsmith.io/repopsresourceget/test/v3/index.json    True       50                        v3


C:\temp> $M=Find-PSResource 'string' -Repository PSRepoLocal -Version 1.0.0
C:\temp> $m

Name   Version Prerelease Repository  Description
----   ------- ---------- ----------  -----------
String 1.0.0              PSRepoLocal Module String


C:\temp> $m.Dependencies

Name      VersionRange
----      ------------
UpperCase [1.0.0, )

C:\temp> $M.Dependencies[0].VersionRange|select *


IsFloating             : False
MinVersion             : 1.0.0
MaxVersion             :
HasLowerBound          : True
IsMinInclusive         : True
HasUpperBound          : False
IsMaxInclusive         : False
HasLowerAndUpperBounds : False
Float                  :
OriginalString         :


C:\temp> $M2=Find-PSResource 'string' -Repository DevOttoMatt -Version 1.0.0
C:\temp> $M2

Name   Version Prerelease Repository  Description
----   ------- ---------- ----------  -----------
String 1.0.0              DevOttoMatt Module String


C:\temp> $M2.Dependencies

Name      VersionRange
----      ------------
UpperCase [1.0.0, 1.0.0]

C:\temp> $M2.Dependencies[0].VersionRange|select *

IsFloating             : False
MinVersion             : 1.0.0
MaxVersion             : 1.0.0
HasLowerBound          : True
IsMinInclusive         : True
HasUpperBound          : True
IsMaxInclusive         : True
HasLowerAndUpperBounds : True
Float                  :
OriginalString         : 1.0.0

Expected behavior
The contents of the 'VersionRange' property should be the same.
Actual behavior
Repo local :
VersionRange equal to '[1.0.0, )'

Repo web server
VersionRange equal to '[1.0.0, 1.0.0]'
Error details
no error
Environment data
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     0.5.24     Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceR...

Key   : PSVersion
Value : 5.1.19041.3031
Name  : PSVersion


Key   : PSEdition
Value : Desktop
Name  : PSEdition


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


Key   : BuildVersion
Value : 10.0.19041.3031
Name  : BuildVersion


Key   : CLRVersion
Value : 4.0.30319.42000
Name  : CLRVersion


Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion


Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion


Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion
Visuals

image

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 Find-PSResource results with the attached Packages.zip against the local and webserver repositories, then compare how each produces the dependency's VersionRange. Done means identical VersionRange contents for the same package and dependency in both repository types.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.