winget-cli

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

commit 0074708ad81aeba6454034925e9f72743564996a
parent c6111d060b5014615d2c806c118697feb3442dd8
Author: JohnMcPMS <johnmcp@microsoft.com>
Date:   Tue,  2 Jul 2024 17:09:54 -0700

Remove experimental from index v2 (#4607)

## Change
Remove the experimental state from index v2.
Diffstat:
Mdoc/Settings.md | 17-----------------
Mschemas/JSON/settings/settings.schema.0.2.json | 5-----
Msrc/AppInstallerCommonCore/ExperimentalFeature.cpp | 4----
Msrc/AppInstallerCommonCore/Public/winget/ExperimentalFeature.h | 1-
Msrc/AppInstallerCommonCore/Public/winget/UserSettings.h | 2--
Msrc/AppInstallerCommonCore/UserSettings.cpp | 1-
Msrc/AppInstallerRepositoryCore/Microsoft/PreIndexedPackageSourceFactory.cpp | 12++----------
7 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/doc/Settings.md b/doc/Settings.md @@ -333,20 +333,3 @@ You can enable the feature as shown below. "configureExport": true }, ``` - -### indexV2 - -This feature enables the `winget` source to retrieve the V2 index, which is significantly smaller. -Regardless of the state of this feature, if the index on the machine contains a V2 index, it will be used. -If there is a bug with the V2 index stopping the `winget` CLI from working, disable the feature in your settings file and run this command: -``` -> winget uninstall -s msstore Microsoft.Winget.Source_8wekyb3d8bbwe -``` - -You can enable the feature as shown below. - -```json - "experimentalFeatures": { - "indexV2": true - }, -``` diff --git a/schemas/JSON/settings/settings.schema.0.2.json b/schemas/JSON/settings/settings.schema.0.2.json @@ -280,11 +280,6 @@ "description": "Enable support for the configure export command", "type": "boolean", "default": false - }, - "indexV2": { - "description": "Enable retrieving the V2 index for the winget source", - "type": "boolean", - "default": false } } } diff --git a/src/AppInstallerCommonCore/ExperimentalFeature.cpp b/src/AppInstallerCommonCore/ExperimentalFeature.cpp @@ -46,8 +46,6 @@ namespace AppInstaller::Settings return userSettings.Get<Setting::EFConfiguration03>(); case ExperimentalFeature::Feature::ConfigureSelfElevation: return userSettings.Get<Setting::EFConfigureSelfElevation>(); - case ExperimentalFeature::Feature::IndexV2: - return userSettings.Get<Setting::EFIndexV2>(); case ExperimentalFeature::Feature::ConfigureExport: return userSettings.Get<Setting::EFConfigureExport>(); default: @@ -85,8 +83,6 @@ namespace AppInstaller::Settings return ExperimentalFeature{ "Configuration Schema 0.3", "configuration03", "https://aka.ms/winget-settings", Feature::Configuration03 }; case Feature::ConfigureSelfElevation: return ExperimentalFeature{ "Configure Self Elevation", "configureSelfElevate", "https://aka.ms/winget-settings", Feature::ConfigureSelfElevation }; - case Feature::IndexV2: - return ExperimentalFeature{ "Index V2", "indexV2", "https://aka.ms/winget-settings", Feature::IndexV2 }; case Feature::ConfigureExport: return ExperimentalFeature{ "Configure Export", "configureExport", "https://aka.ms/winget-settings", Feature::ConfigureExport }; default: diff --git a/src/AppInstallerCommonCore/Public/winget/ExperimentalFeature.h b/src/AppInstallerCommonCore/Public/winget/ExperimentalFeature.h @@ -27,7 +27,6 @@ namespace AppInstaller::Settings Configuration03 = 0x4, ConfigureSelfElevation = 0x8, ConfigureExport = 0x10, - IndexV2 = 0x20, 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 @@ -74,7 +74,6 @@ namespace AppInstaller::Settings EFResume, EFConfiguration03, EFConfigureSelfElevation, - EFIndexV2, EFConfigureExport, // Telemetry TelemetryDisable, @@ -157,7 +156,6 @@ namespace AppInstaller::Settings SETTINGMAPPING_SPECIALIZATION(Setting::EFResume, bool, bool, false, ".experimentalFeatures.resume"sv); SETTINGMAPPING_SPECIALIZATION(Setting::EFConfiguration03, bool, bool, false, ".experimentalFeatures.configuration03"sv); SETTINGMAPPING_SPECIALIZATION(Setting::EFConfigureSelfElevation, bool, bool, false, ".experimentalFeatures.configureSelfElevate"sv); - SETTINGMAPPING_SPECIALIZATION(Setting::EFIndexV2, bool, bool, true, ".experimentalFeatures.indexV2"sv); SETTINGMAPPING_SPECIALIZATION(Setting::EFConfigureExport, bool, bool, false, ".experimentalFeatures.configureExport"sv); // Telemetry SETTINGMAPPING_SPECIALIZATION(Setting::TelemetryDisable, bool, bool, false, ".telemetry.disable"sv); diff --git a/src/AppInstallerCommonCore/UserSettings.cpp b/src/AppInstallerCommonCore/UserSettings.cpp @@ -262,7 +262,6 @@ namespace AppInstaller::Settings WINGET_VALIDATE_PASS_THROUGH(EFResume) WINGET_VALIDATE_PASS_THROUGH(EFConfiguration03) WINGET_VALIDATE_PASS_THROUGH(EFConfigureSelfElevation) - WINGET_VALIDATE_PASS_THROUGH(EFIndexV2) WINGET_VALIDATE_PASS_THROUGH(EFConfigureExport) WINGET_VALIDATE_PASS_THROUGH(AnonymizePathForDisplay) WINGET_VALIDATE_PASS_THROUGH(TelemetryDisable) diff --git a/src/AppInstallerRepositoryCore/Microsoft/PreIndexedPackageSourceFactory.cpp b/src/AppInstallerRepositoryCore/Microsoft/PreIndexedPackageSourceFactory.cpp @@ -47,20 +47,12 @@ namespace AppInstaller::Repository::Microsoft std::vector<std::string> result; - if (Settings::ExperimentalFeature::IsEnabled(Settings::ExperimentalFeature::Feature::IndexV2)) - { - result.emplace_back(GetPackageLocation(details.Arg, s_PreIndexedPackageSourceFactory_V2_PackageFileName)); - } - + result.emplace_back(GetPackageLocation(details.Arg, s_PreIndexedPackageSourceFactory_V2_PackageFileName)); result.emplace_back(GetPackageLocation(details.Arg, s_PreIndexedPackageSourceFactory_PackageFileName)); if (!details.AlternateArg.empty()) { - if (Settings::ExperimentalFeature::IsEnabled(Settings::ExperimentalFeature::Feature::IndexV2)) - { - result.emplace_back(GetPackageLocation(details.AlternateArg, s_PreIndexedPackageSourceFactory_V2_PackageFileName)); - } - + result.emplace_back(GetPackageLocation(details.AlternateArg, s_PreIndexedPackageSourceFactory_V2_PackageFileName)); result.emplace_back(GetPackageLocation(details.AlternateArg, s_PreIndexedPackageSourceFactory_PackageFileName)); }