NuGetPackageExplorer / NuGetPackageExplorer

Create, update and deploy Nuget Packages with a GUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Wasm] Packages with metadata in the version don't open from package list

jeromelaban opened this issue · comments

Type (choose one):

  • Bug

NPE version: Publised on 2022-03-26

Installed from: Web

When trying to open a package from the list where the version contains metadata (e.g. https://www.nuget.info/packages/ComputeSharp/2.0.0-alpha.19+c72aa884783b0f3fe475c7130b52fc4566a910a4), while opening from the URL works (even with a message explaining a redirect), opening in from the main search page results in nothing happening.

So directlinking the package and select package version navigation has slightly different logics, where directlinking will attempt to redirect to the latest if the version provided in the url were not found. Hence why you would get an error from the package feed navigation, vesus getting redirected when using directlinking.
2.0.0-alpha.19+c72aa884783b0f3fe475c7130b52fc4566a910a4 is not an expected default version, as it would fail to compared to the list of versions: https://www.nuget.org/packages/ComputeSharp/. It wouldn't match the 2.0.0-alpha.19 one.

raw queries:
search query (ctrl+f: "id":"ComputeSharp","version")
versions query

We could probably use the NugetVersion or SemVersion class(?) for less-than-exactly comparison, or add a little touch of regex there.
It would help to understand how the desktop app is handling this part.