PowerShell / PowerShell/PSResourceGet

Install-Package support

Abierto
#487 7 comentarios 3 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

feature_request
Lenguaje dominante
C#
Estrellas
576
Forks
114
Merge medio
1 d 2 h
PR fusionados (30 d)
7

Descripción

Summary of the new feature / enhancement

From what I understated this module suppose to eventually replace PackageManagement and PowerShellGetv2
In https://github.com/OneGet/oneget it states that This module is currently not in development. The PowerShell/PowerShellGet repository is actively in development as the new PowerShell package manager.

So what are the replacements for *-Package Cmdlets? I tried the following:

Register-PSResourceRepository -Name 'nuget.org' -URL 'http://www.nuget.org/api/v2'

Find-PSResource -Name MailKit -Repository nuget.org
# Returns package info like MailKit 2.15.0.0 etc.

Install-PSResource -Name Microsoft.NETCore.Platforms -Repository nuget.org -Verbose
# [Error] Install-PSResource: Module manifest file: ...\Microsoft.NETCore.Platforms.psd1 does not exist. This is not a valid PowerShell module.

So repository installed and searched successfully but installing is blocked.

The other problem is the "dependency loop"
As reported here https://github.com/OneGet/oneget/issues/475 Install-Package cannot actually work on most of the packages without -SkipDependencies as it resolves dependencies incorrectly and will return loop error without it. The last statement in this issue is:

@GehanPanapitiya hopefully it will be addressed in new PowerShellGet v3

But Install-PSResource doesn't have -SkipDependencies and the loop bug here is worst as it's not even detected:

Install-Package -Name MailKit -Verbose
# [Error] Install-Package: Dependency loop detected for package 'MailKit'.

# This works
Install-Package -Name MailKit -SkipDependencies -Verbose

# This will hang forever (probably spamming the repo with request in a loop?)
Install-PSResource -Name MailKit -Repository nuget.org -Verbose
# Loops silently forever?

So what is the plan/roadmap on this? Will packages be supported on Install-PSResource or some new commend? As PackageManagement is not developed it will probably will never be fixed there.

Proposed technical implementation details (optional)

No response

Guía de contribución

Abrir la guía de contribución

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.

Línea de trabajo

Comienza revisando el comportamiento reportado de Install-PSResource e Install-Package, incluidos los ejemplos de comandos de MailKit y Microsoft.NETCore.Platforms y el problema de OneGet enlazado sobre un bucle de dependencias. Determina si la instalación de paquetes, el manejo de bucles de dependencias y un reemplazo para -SkipDependencies forman parte del alcance; para darlo por terminado sería necesaria una hoja de ruta o un plan de implementación acordado, que el issue todavía no define.

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

Evaluación

Stack tecnológico
powershell
Área
cli, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
20/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.