Skip to content

Commit

Permalink
(chocolatey#2980) Remove webpi source runner
Browse files Browse the repository at this point in the history
This has been non functional for quite some time and is deprecated.
Removing it for 2.0.

Updated end to end tests as well, and removed a reference to it in the
GenerateDocs.ps1 file.
  • Loading branch information
vexx32 committed Mar 15, 2023
1 parent 647e600 commit 3154555
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 390 deletions.
2 changes: 1 addition & 1 deletion GenerateDocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function Convert-CommandText {
$commandText = $commandText -creplace '^(.+)(\s+Command\s*)$', "# `$1`$2 (choco $commandName)"
$commandText = $commandText -creplace '^(DEPRECATION NOTICE|Usage|Troubleshooting|Examples|Exit Codes|Connecting to Chocolatey.org|See It In Action|Alternative Sources|Resources|Packages.config|Scripting \/ Integration - Best Practices \/ Style Guide)', '## $1'
$commandText = $commandText -replace '^(Commands|How To Pass Options)', '## $1'
$commandText = $commandText -replace '^(WebPI|Windows Features|Ruby|Cygwin|Python)\s*$', '### $1'
$commandText = $commandText -replace '^(Windows Features|Ruby|Cygwin|Python)\s*$', '### $1'
$commandText = $commandText -replace '(?<!\s)NOTE:', '> :choco-info: **NOTE**'
$commandText = $commandText -replace '\*> :choco-info: \*\*NOTE\*\*\*', '> :choco-info: **NOTE**'
$commandText = $commandText -replace 'the command reference', '[how to pass arguments](xref:choco-commands#how-to-pass-options-switches)'
Expand Down
1 change: 0 additions & 1 deletion nuspec/chocolatey/chocolatey/chocolatey.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ There are quite a few commands you can call - you should check out the [command
- Install ruby gem - choco install compass -source ruby
- Install python egg - choco install sphynx -source python
- Install windows feature - choco install IIS -source windowsfeatures
- Install webpi feature - choco install IIS7.5Express -source webpi

#### More

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,6 @@ public void should_output_removal_in_v2_0_0()
MockLogger.Messages.Keys.ShouldContain("Warn");
MockLogger.Messages["Warn"].ShouldContain(@"
Will be removed for the list command in v2.0.0.");
MockLogger.Messages["Warn"].ShouldContain(@"
The `webpi` source is deprecated and will be removed in Chocolatey v2.0.0.
The WebPI feed provided by Microsoft was retired on December 31st, 2022. For
more information, see the IIS team's blog post:
https://blogs.iis.net/iisteam/web-platform-installer-end-of-support-feed
");
}
}

Expand All @@ -547,25 +541,6 @@ public override void Because()
{
command.help_message(configuration);
}

[Fact, Obsolete("Will be removed in v2.0.0")]
public void should_output_deprecation_notice_header()
{
MockLogger.Messages.Keys.ShouldContain("Warn");
MockLogger.Messages["Warn"].ShouldContain("DEPRECATION NOTICE");
}

[Fact]
public void should_ouput_webpi_removal_in_v2_0_0()
{
MockLogger.Messages.Keys.ShouldContain("Warn");
MockLogger.Messages["Warn"].ShouldContain(@"
The `webpi` source is deprecated and will be removed in Chocolatey v2.0.0.
The WebPI feed provided by Microsoft was retired on December 31st, 2022. For
more information, see the IIS team's blog post:
https://blogs.iis.net/iisteam/web-platform-installer-end-of-support-feed
");
}
}
}
}
1 change: 0 additions & 1 deletion src/chocolatey/chocolatey.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@
<Compile Include="infrastructure.app\services\RegistryService.cs" />
<Compile Include="infrastructure.app\services\ShimGenerationService.cs" />
<Compile Include="infrastructure.app\services\TemplateService.cs" />
<Compile Include="infrastructure.app\services\WebPiService.cs" />
<Compile Include="infrastructure.app\templates\ChocolateyInstallTemplate.cs" />
<Compile Include="infrastructure.app\templates\ChocolateyUninstallTemplate.cs" />
<Compile Include="infrastructure.app\templates\NuspecTemplate.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public override void configure_argument_parser(OptionSet optionSet, ChocolateyCo
optionSet
.Add(
"s=|source=",
"Source - Source location for install. Can use special 'webpi' or 'windowsfeatures' sources. Defaults to sources.",
"Source - Source location for install. Can use special 'windowsfeatures', 'ruby', 'cygwin', or 'python' sources. Defaults to configured sources.",
option => configuration.Sources = option.remove_surrounding_quotes())
.Add(
"l|lo|localonly|local-only",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyCon
{
optionSet
.Add("s=|source=",
"Source - The source to find the package(s) to install. Special sources include: ruby, webpi, cygwin, windowsfeatures, and python. To specify more than one source, pass it with a semi-colon separating the values (e.g. \"'source1;source2'\"). Defaults to default feeds.",
"Source - The source to find the package(s) to install. Special sources include: ruby, cygwin, windowsfeatures, and python. To specify more than one source, pass it with a semi-colon separating the values (e.g. \"'source1;source2'\"). Defaults to default feeds.",
option => configuration.Sources = option.remove_surrounding_quotes())
.Add("version=",
"Version - A specific version to install. Defaults to unspecified.",
Expand Down Expand Up @@ -263,7 +263,6 @@ Side by side installations has been deprecated and will be removed in v2.0.0.
Instead of using side by side installations, distinct packages should be created
if similar functionality is needed going forward.
");
"chocolatey".Log().Warn(WebPiService.DeprecationMessage);

"chocolatey".Log().Info(ChocolateyLoggers.Important, "Usage");
"chocolatey".Log().Info(@"
Expand Down Expand Up @@ -398,13 +397,6 @@ This specifies the source is Ruby Gems and that we are installing a
the command will install that first.
e.g. `choco install compass -source ruby`
WebPI (DEPRECATED)
This specifies the source is Web PI (Web Platform Installer) and that
we are installing a WebPI product, such as IISExpress. If you do not
have the Web PI command line installed, it will install that first and
then the product requested.
e.g. `choco install IISExpress --source webpi`
Cygwin
This specifies the source is Cygwin and that we are installing a cygwin
package, such as bash. If you do not have Cygwin installed, it will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyCon

optionSet
.Add("s=|source=",
"Source - Source location for install. Can use special 'webpi' or 'windowsfeatures' sources. Defaults to sources." + deprecationNotice,
"Source - Source location for install. Can use special 'windowsfeatures', 'ruby', 'cygwin', or 'python' sources. Defaults to sources." + deprecationNotice,
option => configuration.Sources = option.remove_surrounding_quotes())
.Add("l|lo|local|localonly|local-only",
localOnlyDescription,
Expand Down Expand Up @@ -205,8 +205,6 @@ use the full command going forward (`choco list`).
");
}

"chocolatey".Log().Warn(WebPiService.DeprecationMessage);

"chocolatey".Log().Info(ChocolateyLoggers.Important, "Examples");
"chocolatey".Log().Info(@"
choco list --local-only (DEPRECATED: will be default for list in v2.0.0)
Expand Down Expand Up @@ -261,13 +259,6 @@ file a ticket so we can document it at
"chocolatey".Log().Info(@"
Available in 0.9.10+.
WebPI (DEPRECATED)
This specifies the source is Web PI (Web Platform Installer) and that
we are searching for a WebPI product, such as IISExpress. If you do
not have the Web PI command line installed, it will install that first
and then perform the search requested.
e.g. `choco {0} --source webpi`
Windows Features
This specifies that the source is a Windows Feature and we should
install via the Deployment Image Servicing and Management tool (DISM)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyCon
{
optionSet
.Add("s=|source=",
"Source - The source to find the package(s) to install. Special sources include: ruby, webpi, cygwin, windowsfeatures, and python. To specify more than one source, pass it with a semi-colon separating the values (e.g. \"'source1;source2'\"). Defaults to default feeds.",
"Source - The source to find the package(s) to install. Special sources include: ruby, cygwin, windowsfeatures, and python. To specify more than one source, pass it with a semi-colon separating the values (e.g. \"'source1;source2'\"). Defaults to default feeds.",
option => configuration.Sources = option.remove_surrounding_quotes())
.Add("u=|user=",
"User - used with authenticated feeds. Defaults to empty.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyCon
{
optionSet
.Add("s=|source=",
"Source - The source to find the package(s) to install. Special sources include: ruby, webpi, cygwin, windowsfeatures, and python. Defaults to default feeds.",
"Source - The source to find the package(s) to install. Special sources include: ruby, cygwin, windowsfeatures, and python. Defaults to default feeds.",
option => configuration.Sources = option.remove_surrounding_quotes())
.Add("version=",
"Version - A specific version to uninstall. Defaults to unspecified.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public virtual void configure_argument_parser(OptionSet optionSet, ChocolateyCon
{
optionSet
.Add("s=|source=",
"Source - The source to find the package(s) to install. Special sources include: ruby, webpi, cygwin, windowsfeatures, and python. To specify more than one source, pass it with a semi-colon separating the values (e.g. \"'source1;source2'\"). Defaults to default feeds.",
"Source - The source to find the package(s) to install. Special sources include: ruby, cygwin, windowsfeatures, and python. To specify more than one source, pass it with a semi-colon separating the values (e.g. \"'source1;source2'\"). Defaults to default feeds.",
option => configuration.Sources = option.remove_surrounding_quotes())
.Add("version=",
"Version - A specific version to install. Defaults to unspecified.",
Expand Down
2 changes: 0 additions & 2 deletions src/chocolatey/infrastructure.app/domain/SourceType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ public enum SourceType
{
//this is what it should be when it's not set
normal,
[Obsolete("The WebPI service has been retired, and this source type will be removed in v2.0.0 of Chocolatey.")]
webpi,
ruby,
python,
windowsfeature,
Expand Down
7 changes: 0 additions & 7 deletions src/chocolatey/infrastructure.app/domain/SourceTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ public static class SourceTypes
/// </summary>
public const string RUBY = "ruby";

/// <summary>
/// The source is of type Web PI and need to be handled by an
/// alternative source runner.
/// </summary>
[Obsolete("The WebPI service has been retired, and this source type will be removed in v2.0.0 of Chocolatey.")]
public const string WEBPI = "webpi";

/// <summary>
/// The source is a windows feature and is only provided as an
/// alias for <see cref="WINDOWS_FEATURES" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public void register_dependencies(IContainerRegistrator registrator, ChocolateyC

registrator.register_service<ISourceRunner>(
typeof(INugetService),
typeof(WebPiService),
typeof(WindowsFeatureService),
typeof(CygwinService),
typeof(PythonService),
Expand Down
Loading

0 comments on commit 3154555

Please sign in to comment.