Closed heaths closed 8 years ago
FWIW, I tested the following and neither works with get-module
(i.e. PowerShell's built-in cmdlet):
So with that in mind, maybe this issue is not worth fixing. Might also consider a specific message that it's not currently supported.
PowerShell modules don't support semver, but NuGet does, and there are plenty of other repositories...
@Jaykul, what do you mean? I realize that NuGet does (which is why I was building my modules that way), but not sure how that relates to PSGet. PSGet is built on NuGet, yes, but it's specifically for obtaining PowerShell modules so if PS doesn't support it, PSGet probably shouldn't allow I. Hence the request to maybe block upload attempts server-side when modules would be incompatible. As it is, I had to log in and hide a bunch of versions that got uploaded through build/publish automation.
My point is, Install-Package
is not (only) for installing PowerShell modules.
Install-Package
is the generic install command from OneGet (the PackageManagement module). In addition to PowerShell modules, you can use it to install NuGet libraries (I do this all the time), chocolatey apps (both of which support SemVer) and more.
I agree that the PowerShell Gallery should prevent modules with invalid versions from being uploaded (actually, I'd prefer if PowerShell supported SemVer, but that seems unlikely), but that's their problem (PowerShell's) and therefore must be fixed in PowerShellGallery, and PowerShellGet.
It can't be fixed in the generic OneGet PackageManagement module.
Understood, but without a better place to files bugs against PSGet (which is where this can and should be fixed until the PowerShell team supports it, which I started a thread on internally) I filed it here.
Because PowerShell supports .Net Version only, there is no plan to support semver in PowerShellGet.
If using semver and you have a pre-release like 3.0.0-pre, you cannot install that package becase the version can't be parsed into
System.Version
:Perhaps semvers aren't supported, but https://powershellgallery.com does make reference to it on the module page (see related bug).