Built-in support for unsupported packages #2463
Labels
Area-Manifest
This may require a change to the manifest
Issue-Feature
This is a feature request for the Windows Package Manager client.
Description of the new feature / enhancement
To avoid being exposed to security vulnerabilities, the importance of running on the latest versions of software is clear. Winget provides an
upgrade
command to help with this effort. However, it only has knowledge of new versions of a specific package ID. In some cases, a software vendor offers multiple package IDs for different versions. Examples of this:Upgrades are limited to the versions available for a given package ID. There's no built-in winget experience to upgrade from one package ID to another. For example, winget doesn't provide an experience to upgrade from Microsoft.DotNet.SDK.5 to Microsoft.DotNet.SDK.6. I'm not suggesting it should provide an experience in this proposal. But I do think there are aspects of versioning that winget can improve upon, specifically when the software associated with such package IDs become unsupported.
Let's use Microsoft.DotNet.SDK.5 as an example. This version of the .NET SDK has been out of support since May 2022. But it still shows up in the default search experience with winget:
That's not great. There's nothing here that indicates to the user that this is an unsupported product. And having the software vendor simply delete the unsupported package ID from the winget-pkgs repo doesn't provide a great experience for those still dependent on the package. It unilaterally breaks them without providing a path to a supported product.
The proposal is to provide a better experience for users of winget so that they...
This would consist of multiple facets:
winget search
should only show supported packages. Unsupported packages are made visible through the use of an explicit option.winget install
on an unsupported package, the package's "out of support" message should be displayed.winget upgrade
when they have an unsupported package installed, they should be presented with information indicating that they have unsupported packages installed.Proposed technical implementation details
EndOfSupportDate Property
The first requirement is for package authors to have some means to indicate whether the package is supported or not. This may or may not be known at package creation time. The proposal is to add an optional property to
<package-id>.installer.yaml
that indicates when support for the package ends:EndOfSupportNotes Property
Package authors can provide a message for users that explains the end of support status of the package. The proposal is to add an optional property to
<package-id>.locale.<locale>.yaml
that contains this message:Winget Search Experience
With this proposal, the
winget search
command would only show supported packages by default, determined by theEndOfSupportDate
property described above. To show unsupported packages, an additional option is provided:In the search output,
(unsupported)
would be appended to the version for any unsupported packages.Winget Show Experience
With this proposal, the
winget show
command would include output that indicates the end of support date and notes.Winget Install Experience
With this proposal, the
winget install
command would output warning text provided by theEndOfSupportNotes
property described above if they were to install an unsupported package.Winget Upgrade Experience
With this proposal, the
winget upgrade
command would, by default, indicate a summary count of any packages that are unsupported. To get more detail, the user would use the--show-unsupported-packages
option which displays the end of support details of all unsupported packages.The details would output the text provided by the
EndOfSupportNotes
property described above.Example
Let's use the Microsoft.DotNet.SDK.5 package as an example to illustrate this proposal.
In Microsoft.DotNet.SDK.5.installer.yaml, add the following property:
In Microsoft.DotNet.SDK.5.locale.en-US.yaml, add the following property:
With these settings, the package is appropriately configured to provide a better experience for users when using the winget CLI.
Now when the user attempts to search for .NET SDK with winget, they won't see Microsoft.DotNet.SDK.5 if their system clock is after May 10, 2022:
But they can get it if they use the
--show-unsupported-packages
option:When using
winget show
, they can see the unsupported status of the package:When attempting to install the package, the user sees the end of support notes:
Now that the user has the package installed, the upgrade experience indicates an unsupported package is installed:
The user can get details on the unsupported packages using the
--show-unsupported-packages
option:The text was updated successfully, but these errors were encountered: