Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Unable to work with prerelease packages having dependencies on prerelease packages

Đang mở
#1,795 2 bình luận 3 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
32/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
powershell
Lĩnh vực
cli, tooling

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện các trường hợp phụ thuộc prerelease với Publish-PSResource, Install-PSResource và Find-PSResource trên các kho NuGet v2 và v3 đã được báo cáo. So sánh siêu dữ liệu phụ thuộc và các truy vấn kho cho các gói A và B. Hoàn thành có nghĩa là các gói prerelease có thể được phát hành và cài đặt cùng với các phụ thuộc prerelease của chúng mà không dựa vào SkipDependenciesCheck.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C#
Star
577
Fork
114
Merge trung bình
23 giờ 17 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PowerShell/PSResourceGet

Tất cả issue của PowerShell/PSResourceGet

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.