nix-community / nix-vscode-extensions

Nix expressions for VSCode and OpenVSX extensions [maintainers: @deemp, @AmeerTaweel]
MIT License
169 stars 9 forks source link

Make version takes precedence over platform #59

Closed yacinehmito closed 3 months ago

yacinehmito commented 3 months ago

The order of extension info is important because it dictates which extension is resolved when multiple revisions exist for the same name and same publisher.

At the moment, extensions are first sorted by platform, then by version. This makes any platform-specific extension override a universal extension of the same name and publisher, even if the platform-specific extension is of a lower version.

Sorting by version first ensures that extensions of the latest version end up last. Thus, if there is a universal extension of a higher version then a platform-specific extension, the universal extension will take precedence. However, if they are of the same version, the behavior is unchanged: the platform-specific extension will take precedence.

Fixes #58.