Print message when install technology is different in upgrade scenarios#1649
Print message when install technology is different in upgrade scenarios#1649msftrubengu merged 8 commits intomicrosoft:masterfrom
Conversation
| </data> | ||
| </root> | ||
| <data name="UpgradeDifferentInstallTechnologyInNewerVersions" xml:space="preserve"> | ||
| <value>At least a newer package was found but the install technology is different from the current version installed. Please uninstall the package and install a newer version.</value> |
There was a problem hiding this comment.
| <value>At least a newer package was found but the install technology is different from the current version installed. Please uninstall the package and install a newer version.</value> | |
| <value>A newer version was found, but the install technology is different from the current version installed. Please uninstall the package and install the newer version.</value> | |
| ``` #Resolved |
| <data name="UpgradeDifferentInstallTechnologyInNewerVersions" xml:space="preserve"> | ||
| <value>At least a newer package was found but the install technology is different from the current version installed. Please uninstall the package and install a newer version.</value> | ||
| </data> | ||
| <data name="UpgradeDifferentInstallTechnology" xml:space="preserve"> |
There was a problem hiding this comment.
It is not clear to me when this would be used over the other string.
There was a problem hiding this comment.
UpgradeDifferentInstallTechnologyInNewerVersions is for winget upgrade <id> and we just look at all versions
UpgradeDifferentInstallTechnology is for specific version winget upgrade <id> -v 2.0
it is different codepaths and i thought it was weird showing "At least a newer package was found..." when a version is specified.
| struct InstallerAndInapplicability | ||
| { | ||
| std::optional<Manifest::ManifestInstaller> installer; | ||
| InapplicabilityFlags inapplicabilityFlags; |
There was a problem hiding this comment.
My intention was that there would be a reason for every installer that was not applicable. #Resolved
There was a problem hiding this comment.
And ORing all of the reasons together makes for a very strange experience, breaking most of our ability to reason about what could be done to change things.
| { | ||
| AICLI_LOG(CLI, Info, << "Installer " << installer << " not applicable: " << filter->ExplainInapplicable(installer)); | ||
| return false; | ||
| return inapplicability; |
There was a problem hiding this comment.
We should run all of them and OR the results together. That way we can confidently say "This is not applicable for this specific reason" rather than telling them then finding out there are also others. #Resolved
| if (m_reportUpdateNotFound) | ||
| { | ||
| context.Reporter.Info() << Resource::String::UpdateNotApplicable << std::endl; | ||
| if (inapplicabilityVersions == InapplicabilityFlags::InstalledType) |
There was a problem hiding this comment.
This should be "If there is at least one installer whose only reason is InstalledType". That way we know that in fact the only thing blocking us is the installed version. #Resolved
@check-spelling-bot ReportUnrecognized words, please review:
Previously acknowledged words that are now absentactivatable Globals mytool URIs UtilsTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the git@github.com:msftrubengu/winget-cli.git repository |
| { | ||
| std::optional<Manifest::ManifestInstaller> installer; | ||
| InapplicabilityFlags inapplicabilityFlags; | ||
| std::vector<InapplicabilityFlags> inapplicabilitiesInstaller; |
There was a problem hiding this comment.
It probably doesn't matter right now, but it seems odd to not know which installer each goes with.
It is possible that the winget shows an available update via
winget upgradebut doingwinget upgrade <id>results in "No applicable update found." The details of why already shown in the logs.Based on #1191, one of the common patterns we've seen is when the installed technology of the installed version is different to the update version. This change bubbles up the error to make it more visible to users.
The current recommendation is to uninstall and install the new version. In the future, #1640 will provide a way to do it automatically if desired.
Microsoft Reviewers: Open in CodeFlow