Skip to content

Commit

Permalink
(cake-buildGH-2234) Removed Mono from CakeOption
Browse files Browse the repository at this point in the history
- This is no longer used within Cake, and can safely be removed.
  • Loading branch information
gep13 committed Aug 16, 2018
1 parent 9185d38 commit 09409fe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 57 deletions.
36 changes: 1 addition & 35 deletions src/Cake.Tests/Unit/Arguments/ArgumentParserTests.cs
Expand Up @@ -321,23 +321,6 @@ public void Can_Parse_Debug(string input, bool expected)
// Then
Assert.Equal(expected, result.PerformDebug);
}

[Theory]
[InlineData("-mono", true)]
[InlineData("-mono=true", true)]
[InlineData("-mono=false", false)]
public void Can_Parse_Mono(string input, bool expected)
{
// Given
var fixture = new ArgumentParserFixture();
var parser = new ArgumentParser(fixture.Log, fixture.VerbosityParser);

// When
var result = parser.Parse(new[] { "build.cake", input });

// Then
Assert.Equal(expected, result.Mono);
}
}

public sealed class WithTwoDashLongArguments
Expand Down Expand Up @@ -547,23 +530,6 @@ public void Can_Parse_Debug(string input, bool expected)
Assert.Equal(expected, result.PerformDebug);
}

[Theory]
[InlineData("--mono", true)]
[InlineData("--mono=true", true)]
[InlineData("--mono=false", false)]
public void Can_Parse_Mono(string input, bool expected)
{
// Given
var fixture = new ArgumentParserFixture();
var parser = new ArgumentParser(fixture.Log, fixture.VerbosityParser);

// When
var result = parser.Parse(new[] { "build.cake", input });

// Then
Assert.Equal(expected, result.Mono);
}

[Theory]
[InlineData("--bootstrap", true)]
[InlineData("--bootstrap=true", true)]
Expand Down Expand Up @@ -600,4 +566,4 @@ public void Can_Parse_Exclusive(string input, bool expected)
}
}
}
}
}
7 changes: 1 addition & 6 deletions src/Cake/Arguments/ArgumentParser.cs
Expand Up @@ -166,11 +166,6 @@ private bool ParseOption(string name, string value, CakeOptions options)
options.PerformDebug = ParseBooleanValue(value);
}

if (name.Equals("mono", StringComparison.OrdinalIgnoreCase))
{
options.Mono = ParseBooleanValue(value);
}

if (name.Equals("bootstrap", StringComparison.OrdinalIgnoreCase))
{
options.Bootstrap = ParseBooleanValue(value);
Expand Down Expand Up @@ -209,4 +204,4 @@ private static bool ParseBooleanValue(string value)
throw new InvalidOperationException("Argument value is not a valid boolean value.");
}
}
}
}
10 changes: 1 addition & 9 deletions src/Cake/CakeOptions.cs
Expand Up @@ -82,14 +82,6 @@ public sealed class CakeOptions
/// </value>
public bool HasError { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to use the Mono compiler or not.
/// </summary>
/// <value>
/// <c>true</c> if the mono compiler should be used; otherwise, <c>false</c>.
/// </value>
public bool Mono { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to bootstrap Cake modules.
/// </summary>
Expand All @@ -112,4 +104,4 @@ public CakeOptions()
ShowHelp = false;
}
}
}
}
8 changes: 1 addition & 7 deletions src/Cake/Modules/ScriptingModule.cs
Expand Up @@ -28,13 +28,7 @@ public void Register(ICakeContainerRegistrar registrar)
throw new ArgumentNullException(nameof(registrar));
}

if (_options.Mono)
{
_log.Warning("The Mono script engine has been removed so the expected behavior might differ. " +
"See Release Notes for Cake 0.22.0 for more information.");
}

registrar.RegisterType<RoslynScriptEngine>().As<IScriptEngine>().Singleton();
}
}
}
}

0 comments on commit 09409fe

Please sign in to comment.