Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Unable to work with prerelease packages having dependencies on prerelease packages

Ouverte
#1,795 2 commentaires 3 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
32/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
powershell
Domaine
cli, tooling

Piste de recherche

Commencez par reproduire les cas de dépendances prerelease avec Publish-PSResource, Install-PSResource et Find-PSResource sur les dépôts NuGet v2 et v3 signalés. Comparez les métadonnées des dépendances et les requêtes adressées aux dépôts pour les packages A et B. La tâche est terminée lorsque les packages prerelease peuvent être publiés et installés avec leurs dépendances prerelease, sans dépendre de SkipDependenciesCheck.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Area-Publish Issue-Enhancement
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'm working with Powershell 7.5 on Windows 11 with PSResourceGet 1.1. For artifactory we are using Jfrog Artifactory 7.90.15

I'm trying to work with our Powershell modules - we have many of them so we have dependency tree on x levels.
To simplify I will describe simple case - I have package A 1.0.0-alpha1 that has dependency on package B 1.0.0-alpha1. I created prerelase version of package B with no problem and publish it using both PowerShellGetv2 and PSResourceGet. But problems started when I prepared package A

  1. First thing is that reading docs it is not clear how to reference prerelase - I just assume that I simply put 1.0.0 in RequiredModules and other tools should use prerelase when accurate (but it is not clear)
  2. When I tried to publish module A with Publish-PSResource there was a validation error that package B with version 1.0.0 is not found in repository (When use Find-PSResource with Prerelease flag I can see this module on repository). So only way to publish was to use SkipDependenciesCheck.
  3. For now trying to install package A with dependencies from feed in nuget v3 is not supported ("WARNING: Installing dependencies is not currently supported for V3 server protocol repositories. The package will be installed without installing dependencies") - You know this but I mentioning this to have whole picture. So using Install-PSResource or Find-PSResource is not usable for now.
  4. When tried on nuget v2 with Install-PSResource -Name "A" -Prerelease I get following error

Install-PSResource: 'Response status code does not indicate success: 500 (Internal Server Error).' Request sent: 'https://xxx/artifactory/api/nuget/yyy/FindPackagesById()?%24filter=NormalizedVersion+ge+%270.0.20%27+and+NormalizedVersion+le+%270.0.209%27&%24inlinecount=allpages&%24skip=0&%24orderby=NormalizedVersion+desc&id=%27B%27'

and the tried to access link given in error I get

{
  "errors" : [ {
    "status" : 500,
    "message" : "java.lang.NullPointerException: Cannot invoke \"java.lang.Comparable.compareTo(Object)\" because \"pair.lhs\" is null"
  } ]
}

Same error is when I tried Find-PSResource -Name A with -IncludeDependencies. I don't know how this breaks but old method Find-Module with dependencies is working OK.
5. Trying to install with old Install-Module with AllowPrerelease but it fails bocause Module B was not found (WARNING: Unable to find dependent module...)

After reading release notes from here https://devblogs.microsoft.com/powershell/psresourceget-is-generally-available/ - "There is now prerelease dependency support. Modules can now take dependencies directly on prerelease modules in the psd1. This includes a change in both publish, and install (note this isn’t backwards compatible, in the sense that the change has not been also made to install-module)". I'm little confused how to use prerelase dependencies. Maybe there is something I can do better but for now I don't know how to work with this. According to point 4 maybe this is something to raise ticket to Jfrog but I'm not sure is this a bug there or maybe you are sending something wrong :)

Expected behavior
I can publish and install prerelase packages depend on other prerelase packages
Actual behavior
Error described above
Error details
Details in description
Environment data
ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     1.1.0                 Microsoft.PowerShell.PSResourceGet  {Compress-PSResource, Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository…}

Key   : PSVersion
Value : 7.5.0
Name  : PSVersion


Key   : PSEdition
Value : Core
Name  : PSEdition


Key   : GitCommitId
Value : 7.5.0
Name  : GitCommitId


Key   : OS
Value : Microsoft Windows 10.0.19045
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

Langage dominant
C#
Étoiles
578
Forks
114
Merge moyen
14 h 27 min
PR mergées (30 j)
7

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de PowerShell/PSResourceGet

Toutes les issues de PowerShell/PSResourceGet

Issues similaires

Plus d'issues C#

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.