winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 7c8807471a15128b81fb72abe00044a1f4e9c5f4
parent bea7539148006f40938fffd71e953077c38247c1
Author: JohnMcPMS <johnmcp@microsoft.com>
Date:   Tue, 20 Apr 2021 17:04:54 -0700

Move import out of experimental (#881)


Diffstat:
Mdoc/Settings.md | 10----------
Msrc/AppInstallerCLICore/Commands/ImportCommand.h | 2+-
Msrc/AppInstallerCLIE2ETests/ImportCommand.cs | 1-
Msrc/AppInstallerCommonCore/ExperimentalFeature.cpp | 20++++++++------------
Msrc/AppInstallerCommonCore/Public/winget/ExperimentalFeature.h | 3+--
Msrc/AppInstallerCommonCore/Public/winget/UserSettings.h | 2--
Msrc/AppInstallerCommonCore/UserSettings.cpp | 1-
Msrc/binver/binver/version.h | 2+-
8 files changed, 11 insertions(+), 30 deletions(-)

diff --git a/doc/Settings.md b/doc/Settings.md @@ -136,16 +136,6 @@ While work is in progress on uninstall, the command is hidden behind a feature t }, ``` -### import - -While work is in progress for import, the command is hidden behind a feature toggle. One can enable it as below: - -```json - "experimentalFeatures": { - "import": true - }, -``` - ### restSource While work is in progress for rest source support, the feature is hidden behind a feature toggle. Enabling this will not change how client works currently and will allow testing any additional rest sources added. One can enable it as below: diff --git a/src/AppInstallerCLICore/Commands/ImportCommand.h b/src/AppInstallerCLICore/Commands/ImportCommand.h @@ -8,7 +8,7 @@ namespace AppInstaller::CLI // Command to install a set of packages from a list. struct ImportCommand final : public Command { - ImportCommand(std::string_view parent) : Command("import", parent, Settings::ExperimentalFeature::Feature::ExperimentalImport) {} + ImportCommand(std::string_view parent) : Command("import", parent) {} std::vector<Argument> GetArguments() const override; diff --git a/src/AppInstallerCLIE2ETests/ImportCommand.cs b/src/AppInstallerCLIE2ETests/ImportCommand.cs @@ -12,7 +12,6 @@ namespace AppInstallerCLIE2ETests public void Setup() { InitializeAllFeatures(false); - ConfigureFeature("import", true); ConfigureFeature("export", true); CleanupTestExe(); } diff --git a/src/AppInstallerCommonCore/ExperimentalFeature.cpp b/src/AppInstallerCommonCore/ExperimentalFeature.cpp @@ -9,10 +9,10 @@ namespace AppInstaller::Settings { - namespace - { - bool IsEnabledInternal(ExperimentalFeature::Feature feature, const UserSettings& userSettings) - { + namespace + { + bool IsEnabledInternal(ExperimentalFeature::Feature feature, const UserSettings& userSettings) + { if (feature == ExperimentalFeature::Feature::None) { return true; @@ -48,8 +48,6 @@ namespace AppInstaller::Settings return userSettings.Get<Setting::EFExperimentalUpgrade>(); case ExperimentalFeature::Feature::ExperimentalUninstall: return userSettings.Get<Setting::EFUninstall>(); - case ExperimentalFeature::Feature::ExperimentalImport: - return userSettings.Get<Setting::EFImport>(); case ExperimentalFeature::Feature::ExperimentalExport: return userSettings.Get<Setting::EFExport>(); case ExperimentalFeature::Feature::ExperimentalRestSource: @@ -57,15 +55,15 @@ namespace AppInstaller::Settings default: THROW_HR(E_UNEXPECTED); } - } - } + } + } bool ExperimentalFeature::IsEnabled(Feature feature) { return IsEnabledInternal(feature, User()); - } + } -#ifndef AICLI_DISABLE_TEST_HOOKS +#ifndef AICLI_DISABLE_TEST_HOOKS bool ExperimentalFeature::IsEnabled(Feature feature, const UserSettings& userSettings) { return IsEnabledInternal(feature, userSettings); @@ -88,8 +86,6 @@ namespace AppInstaller::Settings return ExperimentalFeature{ "Upgrade Command", "upgrade", "https://aka.ms/winget-settings", Feature::ExperimentalUpgrade }; case Feature::ExperimentalUninstall: return ExperimentalFeature{ "Uninstall Command", "uninstall", "https://aka.ms/winget-settings", Feature::ExperimentalUninstall }; - case Feature::ExperimentalImport: - return ExperimentalFeature{ "Import Command", "import", "https://aka.ms/winget-settings", Feature::ExperimentalImport }; case Feature::ExperimentalExport: return ExperimentalFeature{ "Export Command", "export", "https://aka.ms/winget-settings", Feature::ExperimentalExport }; case Feature::ExperimentalRestSource: diff --git a/src/AppInstallerCommonCore/Public/winget/ExperimentalFeature.h b/src/AppInstallerCommonCore/Public/winget/ExperimentalFeature.h @@ -26,8 +26,7 @@ namespace AppInstaller::Settings ExperimentalList = 0x8, ExperimentalUpgrade = 0x10, ExperimentalUninstall = 0x20, - ExperimentalImport = 0x40, - ExperimentalRestSource = 0x80, + ExperimentalRestSource = 0x40, Max, // This MUST always be after all experimental features // Features listed after Max will not be shown with the features command diff --git a/src/AppInstallerCommonCore/Public/winget/UserSettings.h b/src/AppInstallerCommonCore/Public/winget/UserSettings.h @@ -63,7 +63,6 @@ namespace AppInstaller::Settings EFList, EFExperimentalUpgrade, EFUninstall, - EFImport, EFExport, TelemetryDisable, EFRestSource, @@ -110,7 +109,6 @@ namespace AppInstaller::Settings SETTINGMAPPING_SPECIALIZATION(Setting::EFList, bool, bool, false, ".experimentalFeatures.list"sv); SETTINGMAPPING_SPECIALIZATION(Setting::EFExperimentalUpgrade, bool, bool, false, ".experimentalFeatures.upgrade"sv); SETTINGMAPPING_SPECIALIZATION(Setting::EFUninstall, bool, bool, false, ".experimentalFeatures.uninstall"sv); - SETTINGMAPPING_SPECIALIZATION(Setting::EFImport, bool, bool, false, ".experimentalFeatures.import"sv); SETTINGMAPPING_SPECIALIZATION(Setting::EFExport, bool, bool, false, ".experimentalFeatures.export"sv); SETTINGMAPPING_SPECIALIZATION(Setting::TelemetryDisable, bool, bool, false, ".telemetry.disable"sv); SETTINGMAPPING_SPECIALIZATION(Setting::EFRestSource, bool, bool, false, ".experimentalFeatures.restSource"sv); diff --git a/src/AppInstallerCommonCore/UserSettings.cpp b/src/AppInstallerCommonCore/UserSettings.cpp @@ -202,7 +202,6 @@ namespace AppInstaller::Settings WINGET_VALIDATE_PASS_THROUGH(EFList) WINGET_VALIDATE_PASS_THROUGH(EFExperimentalUpgrade) WINGET_VALIDATE_PASS_THROUGH(EFUninstall) - WINGET_VALIDATE_PASS_THROUGH(EFImport) WINGET_VALIDATE_PASS_THROUGH(EFExport) WINGET_VALIDATE_PASS_THROUGH(TelemetryDisable) WINGET_VALIDATE_PASS_THROUGH(EFRestSource) diff --git a/src/binver/binver/version.h b/src/binver/binver/version.h @@ -2,7 +2,7 @@ #define STRINGIZE(s) STRINGIZE2(s) #define VERSION_MAJOR 0 -#define VERSION_MINOR 2 +#define VERSION_MINOR 3 #define VERSION_BUILD 0 #define VERSION_REVISION 0