Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Unable to work with prerelease packages having dependencies on prerelease packages

Abierto
#1,795 2 comentarios 3 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
32/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
powershell
Área
cli, tooling

Línea de trabajo

Comienza reproduciendo los casos de dependencias prerelease con Publish-PSResource, Install-PSResource y Find-PSResource contra los repositorios NuGet v2 y v3 reportados. Compara los metadatos de dependencias y las consultas al repositorio para los paquetes A y B. Se considera terminado cuando los paquetes prerelease se pueden publicar e instalar con sus dependencias prerelease, sin depender de SkipDependenciesCheck.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
C#
Estrellas
577
Forks
114
Merge medio
23 h 17 min
PR fusionados (30 d)
8

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PowerShell/PSResourceGet

Todos los issues de PowerShell/PSResourceGet

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.