Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make --uninstall-previous argument stable #3282

Merged
merged 2 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions doc/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,6 @@ You can enable the feature as shown below.
},
```

### uninstallPreviousArgument

This feature enables the Windows Package Manager to override the upgrade behavior to UninstallPrevious by passing the `--uninstall-previous` argument with the upgrade or install command.
You can enable the feature as shown below.

```json
"experimentalFeatures": {
"uninstallPreviousArgument": true
},
```

### dependencies

Experimental feature with the aim of managing dependencies, as of now it only shows package dependency information. You can enable the feature as shown below.
Expand Down
5 changes: 0 additions & 5 deletions schemas/JSON/settings/settings.schema.0.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,6 @@
"type": "boolean",
"default": false
},
"uninstallPreviousArgument": {
"description": "Enable argument to override upgrade behavior to UninstallPrevious",
"type": "boolean",
"default": false
},
"pinning": {
"description": "Enable support for package pinning",
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion src/AppInstallerCLICore/Argument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ namespace AppInstaller::CLI
case Args::Type::OpenLogs:
return Argument{ type, Resource::String::OpenLogsArgumentDescription, ArgumentType::Flag, Argument::Visibility::Help };
case Args::Type::UninstallPrevious:
return Argument{ type, Resource::String::UninstallPreviousArgumentDescription, ArgumentType::Flag, ExperimentalFeature::Feature::UninstallPreviousArgument };
return Argument{ type, Resource::String::UninstallPreviousArgumentDescription, ArgumentType::Flag, Argument::Visibility::Help };
case Args::Type::Force:
return Argument{ type, Resource::String::ForceArgumentDescription, ArgumentType::Flag, false };
default:
Expand Down
1 change: 0 additions & 1 deletion src/AppInstallerCLIE2ETests/FeaturesCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public void EnableExperimentalFeatures()
WinGetSettingsHelper.ConfigureFeature("experimentalArg", true);
WinGetSettingsHelper.ConfigureFeature("experimentalCmd", true);
WinGetSettingsHelper.ConfigureFeature("directMSI", true);
WinGetSettingsHelper.ConfigureFeature("uninstallPreviousArgument", true);
WinGetSettingsHelper.ConfigureFeature("windowsFeature", true);
var result = TestCommon.RunAICLICommand("features", string.Empty);
Assert.True(result.StdOut.Contains("Enabled"));
Expand Down
4 changes: 0 additions & 4 deletions src/AppInstallerCommonCore/ExperimentalFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ namespace AppInstaller::Settings
return userSettings.Get<Setting::EFDirectMSI>();
case ExperimentalFeature::Feature::Pinning:
return userSettings.Get<Setting::EFPinning>();
case ExperimentalFeature::Feature::UninstallPreviousArgument:
return userSettings.Get<Setting::EFUninstallPreviousArgument>();
case ExperimentalFeature::Feature::Configuration:
return userSettings.Get<Setting::EFConfiguration>();
case ExperimentalFeature::Feature::WindowsFeature:
Expand Down Expand Up @@ -83,8 +81,6 @@ namespace AppInstaller::Settings
return ExperimentalFeature{ "Direct MSI Installation", "directMSI", "https://aka.ms/winget-settings", Feature::DirectMSI };
case Feature::Pinning:
return ExperimentalFeature{ "Package Pinning", "pinning", "https://aka.ms/winget-settings", Feature::Pinning};
case Feature::UninstallPreviousArgument:
return ExperimentalFeature{ "Uninstall Previous Argument", "uninstallPreviousArgument", "https://aka.ms/winget-settings", Feature::UninstallPreviousArgument };
case Feature::Configuration:
return ExperimentalFeature{ "Configuration", "configuration", "https://aka.ms/winget-settings#configuration", Feature::Configuration };
case Feature::WindowsFeature:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ namespace AppInstaller::Settings
// Before making DirectMSI non-experimental, it should be part of manifest validation.
DirectMSI = 0x2,
Pinning = 0x4,
UninstallPreviousArgument = 0x8,
Configuration = 0x10,
WindowsFeature = 0x20,
Configuration = 0x8,
WindowsFeature = 0x10,
Max, // This MUST always be after all experimental features

// Features listed after Max will not be shown with the features command
Expand Down
2 changes: 0 additions & 2 deletions src/AppInstallerCommonCore/Public/winget/UserSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ namespace AppInstaller::Settings
EFDependencies,
EFDirectMSI,
EFPinning,
EFUninstallPreviousArgument,
EFConfiguration,
EFWindowsFeature,
// Telemetry
Expand Down Expand Up @@ -145,7 +144,6 @@ namespace AppInstaller::Settings
SETTINGMAPPING_SPECIALIZATION(Setting::EFDependencies, bool, bool, false, ".experimentalFeatures.dependencies"sv);
SETTINGMAPPING_SPECIALIZATION(Setting::EFDirectMSI, bool, bool, false, ".experimentalFeatures.directMSI"sv);
SETTINGMAPPING_SPECIALIZATION(Setting::EFPinning, bool, bool, false, ".experimentalFeatures.pinning"sv);
SETTINGMAPPING_SPECIALIZATION(Setting::EFUninstallPreviousArgument, bool, bool, false, ".experimentalFeatures.uninstallPreviousArgument"sv);
SETTINGMAPPING_SPECIALIZATION(Setting::EFConfiguration, bool, bool, false, ".experimentalFeatures.configuration"sv);
SETTINGMAPPING_SPECIALIZATION(Setting::EFWindowsFeature, bool, bool, false, ".experimentalFeatures.windowsFeature"sv);
// Telemetry
Expand Down
1 change: 0 additions & 1 deletion src/AppInstallerCommonCore/UserSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ namespace AppInstaller::Settings
WINGET_VALIDATE_PASS_THROUGH(EFDependencies)
WINGET_VALIDATE_PASS_THROUGH(EFDirectMSI)
WINGET_VALIDATE_PASS_THROUGH(EFPinning)
WINGET_VALIDATE_PASS_THROUGH(EFUninstallPreviousArgument)
WINGET_VALIDATE_PASS_THROUGH(EFConfiguration)
WINGET_VALIDATE_PASS_THROUGH(EFWindowsFeature)
WINGET_VALIDATE_PASS_THROUGH(AnonymizePathForDisplay)
Expand Down