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

Remove experimental from index v2 #4611

Merged
merged 1 commit into from
Jul 3, 2024
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
17 changes: 0 additions & 17 deletions doc/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
```
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 @@ -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
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions src/AppInstallerCommonCore/ExperimentalFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 @@ -74,7 +74,6 @@ namespace AppInstaller::Settings
EFResume,
EFConfiguration03,
EFConfigureSelfElevation,
EFIndexV2,
EFConfigureExport,
// Telemetry
TelemetryDisable,
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/AppInstallerCommonCore/UserSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
Loading