From 09ccb251ad6487d324b56797d835563867f8dbc5 Mon Sep 17 00:00:00 2001 From: "C. Augusto Proiete" Date: Mon, 22 Jun 2020 00:59:09 -0300 Subject: [PATCH 001/445] Improve XML comments TeamCityProvider BuildProblem's arguments --- src/Cake.Common/Build/TeamCity/ITeamCityProvider.cs | 4 ++-- src/Cake.Common/Build/TeamCity/TeamCityProvider.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Cake.Common/Build/TeamCity/ITeamCityProvider.cs b/src/Cake.Common/Build/TeamCity/ITeamCityProvider.cs index bff2234286..bd7bfdc27c 100644 --- a/src/Cake.Common/Build/TeamCity/ITeamCityProvider.cs +++ b/src/Cake.Common/Build/TeamCity/ITeamCityProvider.cs @@ -73,8 +73,8 @@ public interface ITeamCityProvider /// /// Report a build problem to TeamCity. /// - /// Description of build problem. - /// Build identity. + /// A human-readable plain text describing the build problem. By default, the description appears in the build status text and in the list of build's problems. The text is limited to 4000 symbols, and will be truncated if the limit is exceeded. + /// A unique problem ID (optional). Different problems must have different identity, same problems - same identity, which should not change throughout builds if the same problem, for example, the same compilation error occurs. It must be a valid Java ID up to 60 characters. If omitted, the identity is calculated based on the description text. void BuildProblem(string description, string identity); /// diff --git a/src/Cake.Common/Build/TeamCity/TeamCityProvider.cs b/src/Cake.Common/Build/TeamCity/TeamCityProvider.cs index 047512a069..80dc432c34 100644 --- a/src/Cake.Common/Build/TeamCity/TeamCityProvider.cs +++ b/src/Cake.Common/Build/TeamCity/TeamCityProvider.cs @@ -250,8 +250,8 @@ public void ImportDotCoverCoverage(FilePath snapshotFile, DirectoryPath dotCover /// /// Report a build problem to TeamCity. /// - /// Description of build problem. - /// Build identity. + /// A human-readable plain text describing the build problem. By default, the description appears in the build status text and in the list of build's problems. The text is limited to 4000 symbols, and will be truncated if the limit is exceeded. + /// A unique problem ID (optional). Different problems must have different identity, same problems - same identity, which should not change throughout builds if the same problem, for example, the same compilation error occurs. It must be a valid Java ID up to 60 characters. If omitted, the identity is calculated based on the description text. public void BuildProblem(string description, string identity) { var tokens = new Dictionary { { "description", description } }; From 7cdabe426fc3a3e84633e6f0accb4f793596baea Mon Sep 17 00:00:00 2001 From: "C. Augusto Proiete" Date: Mon, 22 Jun 2020 01:02:49 -0300 Subject: [PATCH 002/445] Make Identity of BuildProblem in TeamCityProvider optional Resolves #2811 --- src/Cake.Common/Build/TeamCity/ITeamCityProvider.cs | 2 +- src/Cake.Common/Build/TeamCity/TeamCityProvider.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cake.Common/Build/TeamCity/ITeamCityProvider.cs b/src/Cake.Common/Build/TeamCity/ITeamCityProvider.cs index bd7bfdc27c..ca5c085384 100644 --- a/src/Cake.Common/Build/TeamCity/ITeamCityProvider.cs +++ b/src/Cake.Common/Build/TeamCity/ITeamCityProvider.cs @@ -75,7 +75,7 @@ public interface ITeamCityProvider /// /// A human-readable plain text describing the build problem. By default, the description appears in the build status text and in the list of build's problems. The text is limited to 4000 symbols, and will be truncated if the limit is exceeded. /// A unique problem ID (optional). Different problems must have different identity, same problems - same identity, which should not change throughout builds if the same problem, for example, the same compilation error occurs. It must be a valid Java ID up to 60 characters. If omitted, the identity is calculated based on the description text. - void BuildProblem(string description, string identity); + void BuildProblem(string description, string identity = null); /// /// Tell TeamCity to import data of a given type. diff --git a/src/Cake.Common/Build/TeamCity/TeamCityProvider.cs b/src/Cake.Common/Build/TeamCity/TeamCityProvider.cs index 80dc432c34..d5e0841f9b 100644 --- a/src/Cake.Common/Build/TeamCity/TeamCityProvider.cs +++ b/src/Cake.Common/Build/TeamCity/TeamCityProvider.cs @@ -252,7 +252,7 @@ public void ImportDotCoverCoverage(FilePath snapshotFile, DirectoryPath dotCover /// /// A human-readable plain text describing the build problem. By default, the description appears in the build status text and in the list of build's problems. The text is limited to 4000 symbols, and will be truncated if the limit is exceeded. /// A unique problem ID (optional). Different problems must have different identity, same problems - same identity, which should not change throughout builds if the same problem, for example, the same compilation error occurs. It must be a valid Java ID up to 60 characters. If omitted, the identity is calculated based on the description text. - public void BuildProblem(string description, string identity) + public void BuildProblem(string description, string identity = null) { var tokens = new Dictionary { { "description", description } }; if (!string.IsNullOrEmpty(identity)) From 65b1b717eec34391eba2bfb366eaecf89a5139de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Bj=C3=B6rkstr=C3=B6m?= Date: Tue, 30 Jun 2020 00:23:03 +0300 Subject: [PATCH 003/445] (GH-2820) Adds DebuggerStepThroughAttribute to generated code. - Fixes #2820 --- .../Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethod | 3 ++- .../Methods/Generic_ExtensionMethodWithGenericReturnValue | 3 ++- ...xtensionMethodWithGenericReturnValueAndTypeParamConstraints | 3 ++- .../Expected/Methods/Generic_ExtensionMethodWithParameter | 3 ++- .../Methods/NonGeneric_ExtensionMethodWithArrayParameter | 3 ++- .../Methods/NonGeneric_ExtensionMethodWithDynamicReturnValue | 3 ++- ...NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType | 3 ++- ...nGeneric_ExtensionMethodWithGenericExpressionArrayParameter | 3 ++- .../NonGeneric_ExtensionMethodWithGenericExpressionParameter | 3 ++- ...ic_ExtensionMethodWithGenericExpressionParamsArrayParameter | 3 ++- .../Methods/NonGeneric_ExtensionMethodWithGenericParameter | 3 ++- .../Methods/NonGeneric_ExtensionMethodWithNoParameters | 3 ++- .../NonGeneric_ExtensionMethodWithOptionalBooleanParameter | 3 ++- .../NonGeneric_ExtensionMethodWithOptionalCharParameter | 3 ++- .../NonGeneric_ExtensionMethodWithOptionalDecimalParameter | 3 ++- .../NonGeneric_ExtensionMethodWithOptionalEnumParameter | 3 ++- ...Generic_ExtensionMethodWithOptionalNullableBooleanParameter | 3 ++- ...NonGeneric_ExtensionMethodWithOptionalNullableCharParameter | 3 ++- ...Generic_ExtensionMethodWithOptionalNullableDecimalParameter | 3 ++- ...nGeneric_ExtensionMethodWithOptionalNullableDoubleParameter | 3 ++- ...NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter | 3 ++- ...NonGeneric_ExtensionMethodWithOptionalNullableLongParameter | 3 ++- .../NonGeneric_ExtensionMethodWithOptionalNullableTParameter | 3 ++- .../NonGeneric_ExtensionMethodWithOptionalObjectParameter | 3 ++- .../NonGeneric_ExtensionMethodWithOptionalStringParameter | 3 ++- .../Methods/NonGeneric_ExtensionMethodWithOutputParameter | 3 ++- .../Expected/Methods/NonGeneric_ExtensionMethodWithParameter | 3 ++- .../Methods/NonGeneric_ExtensionMethodWithParameterArray | 3 ++- .../Methods/NonGeneric_ExtensionMethodWithParameterAttributes | 3 ++- .../NonGeneric_ExtensionMethodWithReservedKeywordParameter | 3 ++- .../Expected/Methods/NonGeneric_ExtensionMethodWithReturnValue | 3 ++- .../Expected/Methods/Obsolete_ExplicitError_WithMessage | 3 ++- .../Expected/Methods/Obsolete_ExplicitWarning_WithMessage | 3 ++- .../Expected/Methods/Obsolete_ImplicitWarning_NoMessage | 3 ++- .../Expected/Methods/Obsolete_ImplicitWarning_WithMessage | 3 ++- .../Scripting/CodeGen/Expected/Properties/Cached_Dynamic_Type | 1 + .../Properties/Cached_Obsolete_ExplicitError_WithMessage | 1 + .../Properties/Cached_Obsolete_ExplicitWarning_WithMessage | 1 + .../Properties/Cached_Obsolete_ImplicitWarning_NoMessage | 1 + .../Properties/Cached_Obsolete_ImplicitWarning_WithMessage | 1 + .../CodeGen/Expected/Properties/Cached_Reference_Type | 1 + .../Scripting/CodeGen/Expected/Properties/Cached_Value_Type | 1 + .../CodeGen/Expected/Properties/NonCached_Dynamic_Type | 1 + .../Properties/NonCached_Obsolete_ExplicitError_WithMessage | 1 + .../Properties/NonCached_Obsolete_ExplicitWarning_WithMessage | 1 + .../Properties/NonCached_Obsolete_ImplicitWarning_NoMessage | 1 + .../Properties/NonCached_Obsolete_ImplicitWarning_WithMessage | 1 + .../Scripting/CodeGen/Expected/Properties/NonCached_Value_Type | 1 + src/Cake.Core/Scripting/CodeGen/MethodAliasGenerator.cs | 1 + src/Cake.Core/Scripting/CodeGen/PropertyAliasGenerator.cs | 2 ++ 50 files changed, 86 insertions(+), 35 deletions(-) diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethod b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethod index d63e8d9166..3dc2260389 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethod +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethod @@ -1,4 +1,5 @@ -public void Generic_ExtensionMethod() +[System.Diagnostics.DebuggerStepThrough] +public void Generic_ExtensionMethod() { Cake.Core.Tests.Data.MethodAliasGeneratorData.Generic_ExtensionMethod(Context); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValue b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValue index 1ff0b652ca..98ad68a1b4 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValue +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValue @@ -1,4 +1,5 @@ -public TTest Generic_ExtensionMethodWithGenericReturnValue(TTest value) +[System.Diagnostics.DebuggerStepThrough] +public TTest Generic_ExtensionMethodWithGenericReturnValue(TTest value) { return Cake.Core.Tests.Data.MethodAliasGeneratorData.Generic_ExtensionMethodWithGenericReturnValue(Context, value); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints index 4cebd2e7bc..2c686ebe56 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints @@ -1,4 +1,5 @@ -public TOut Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints(TIn arg) +[System.Diagnostics.DebuggerStepThrough] +public TOut Generic_ExtensionMethodWithGenericReturnValueAndTypeParamConstraints(TIn arg) where TIn : class, new() where TOut : System.Collections.ArrayList, System.IDisposable { diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithParameter index 44b10e97a5..44046190c2 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Generic_ExtensionMethodWithParameter @@ -1,4 +1,5 @@ -public void Generic_ExtensionMethodWithParameter(TTest value) +[System.Diagnostics.DebuggerStepThrough] +public void Generic_ExtensionMethodWithParameter(TTest value) { Cake.Core.Tests.Data.MethodAliasGeneratorData.Generic_ExtensionMethodWithParameter(Context, value); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithArrayParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithArrayParameter index cf0128efbf..cbf59c7a7f 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithArrayParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithArrayParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithArrayParameter(System.String[] values) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithArrayParameter(System.String[] values) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithArrayParameter(Context, values); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithDynamicReturnValue b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithDynamicReturnValue index b064876b6b..4f21aed07e 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithDynamicReturnValue +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithDynamicReturnValue @@ -1,4 +1,5 @@ -public dynamic NonGeneric_ExtensionMethodWithDynamicReturnValue() +[System.Diagnostics.DebuggerStepThrough] +public dynamic NonGeneric_ExtensionMethodWithDynamicReturnValue() { return Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithDynamicReturnValue(Context); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType index 3cbb762dea..63f1d940ff 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType(System.Collections.Generic.ICollection items) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType(System.Collections.Generic.ICollection items) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericCollectionOfNestedType(Context, items); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter index 1fdbe09bee..4f2f20600c 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter(System.Linq.Expressions.Expression>[] expression) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter(System.Linq.Expressions.Expression>[] expression) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericExpressionArrayParameter(Context, expression); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParameter index 27a2f9688a..d6938025dd 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithGenericExpressionParameter(System.Linq.Expressions.Expression> expression) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithGenericExpressionParameter(System.Linq.Expressions.Expression> expression) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericExpressionParameter(Context, expression); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter index 0ae5eac200..adef40989b 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter(params System.Linq.Expressions.Expression>[] expression) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter(params System.Linq.Expressions.Expression>[] expression) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericExpressionParamsArrayParameter(Context, expression); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericParameter index e8e6fb042c..b0cc1889fd 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithGenericParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithGenericParameter(System.Action value) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithGenericParameter(System.Action value) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithGenericParameter(Context, value); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithNoParameters b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithNoParameters index b93f98b555..4377daf9c0 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithNoParameters +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithNoParameters @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithNoParameters() +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithNoParameters() { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithNoParameters(Context); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalBooleanParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalBooleanParameter index 3910643e23..0e55a933cf 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalBooleanParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalBooleanParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalBooleanParameter(System.Int32 value, System.Boolean flag = false) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalBooleanParameter(System.Int32 value, System.Boolean flag = false) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalBooleanParameter(Context, value, flag); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalCharParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalCharParameter index c9fd667b17..b4a6ae2b04 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalCharParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalCharParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalCharParameter(System.String s, System.Char c = 's') +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalCharParameter(System.String s, System.Char c = 's') { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalCharParameter(Context, s, c); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalDecimalParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalDecimalParameter index c805388202..4fee401a0b 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalDecimalParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalDecimalParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalDecimalParameter(System.String s, System.Decimal value = (System.Decimal)12.12) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalDecimalParameter(System.String s, System.Decimal value = (System.Decimal)12.12) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalDecimalParameter(Context, s, value); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalEnumParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalEnumParameter index 95ef9aea77..5219816d75 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalEnumParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalEnumParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalEnumParameter(System.Int32 value, System.AttributeTargets targets = (System.AttributeTargets)4) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalEnumParameter(System.Int32 value, System.AttributeTargets targets = (System.AttributeTargets)4) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalEnumParameter(Context, value, targets); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter index 7cf5d9d423..5fc4d9a697 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter(System.String s, System.Nullable value = (System.Boolean)false) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter(System.String s, System.Nullable value = (System.Boolean)false) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableBooleanParameter(Context, s, value); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableCharParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableCharParameter index c4c55435e4..49504fb8ee 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableCharParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableCharParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalNullableCharParameter(System.String s, System.Nullable value = (System.Char)'s') +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalNullableCharParameter(System.String s, System.Nullable value = (System.Char)'s') { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableCharParameter(Context, s, value); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter index ca4a920bc1..9d4cd6c2d8 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter(System.String s, System.Nullable value = (System.Decimal)123.12) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter(System.String s, System.Nullable value = (System.Decimal)123.12) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableDecimalParameter(Context, s, value); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter index fb45cd2f91..b6ab059a48 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter(System.String s, System.Nullable value = (System.Double)1234567890.12) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter(System.String s, System.Nullable value = (System.Double)1234567890.12) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableDoubleParameter(Context, s, value); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter index 61deae0c1f..1bdc60c744 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter(System.String s, System.Nullable targets = (System.AttributeTargets)4) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter(System.String s, System.Nullable targets = (System.AttributeTargets)4) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableEnumParameter(Context, s, targets); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableLongParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableLongParameter index 1c67622077..c8b25f8cae 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableLongParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableLongParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalNullableLongParameter(System.String s, System.Nullable value = (System.Int64)1234567890) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalNullableLongParameter(System.String s, System.Nullable value = (System.Int64)1234567890) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableLongParameter(Context, s, value); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableTParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableTParameter index 15667228cb..5df7b4ef28 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableTParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalNullableTParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalNullableTParameter(System.String s, System.Nullable value = (System.Int32)0) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalNullableTParameter(System.String s, System.Nullable value = (System.Int32)0) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalNullableTParameter(Context, s, value); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalObjectParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalObjectParameter index b6428571d0..82c9bac65f 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalObjectParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalObjectParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalObjectParameter(System.Int32 value, System.Object option = null) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalObjectParameter(System.Int32 value, System.Object option = null) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalObjectParameter(Context, value, option); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalStringParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalStringParameter index 79debc136f..1b8260d784 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalStringParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOptionalStringParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOptionalStringParameter(System.Int32 value, System.String s = "there is a \"string\" here and a \t tab") +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOptionalStringParameter(System.Int32 value, System.String s = "there is a \"string\" here and a \t tab") { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOptionalStringParameter(Context, value, s); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOutputParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOutputParameter index c302ce1172..800ce262a6 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOutputParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithOutputParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithOutputParameter(out System.IDisposable arg) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithOutputParameter(out System.IDisposable arg) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithOutputParameter(Context, out arg); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameter index c637d53846..196d594e5b 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithParameter(System.Int32 value) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithParameter(System.Int32 value) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithParameter(Context, value); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterArray b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterArray index 79998303c7..c265f0b697 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterArray +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterArray @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithParameterArray(params System.Int32[] values) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithParameterArray(params System.Int32[] values) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithParameterArray(Context, values); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterAttributes b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterAttributes index 12df00e0c3..39391cc7f4 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterAttributes +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithParameterAttributes @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithParameterAttributes([System.Runtime.CompilerServices.CallerMemberName] System.String memberName = "", [System.Runtime.CompilerServices.CallerFilePath] System.String sourceFilePath = "", [System.Runtime.CompilerServices.CallerLineNumber] System.Int32 sourceLineNumber = (System.Int32)0) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithParameterAttributes([System.Runtime.CompilerServices.CallerMemberName] System.String memberName = "", [System.Runtime.CompilerServices.CallerFilePath] System.String sourceFilePath = "", [System.Runtime.CompilerServices.CallerLineNumber] System.Int32 sourceLineNumber = (System.Int32)0) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithParameterAttributes(Context, memberName, sourceFilePath, sourceLineNumber); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReservedKeywordParameter b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReservedKeywordParameter index 83eda2be92..c16ac53884 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReservedKeywordParameter +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReservedKeywordParameter @@ -1,4 +1,5 @@ -public void NonGeneric_ExtensionMethodWithReservedKeywordParameter(System.Int32 @new) +[System.Diagnostics.DebuggerStepThrough] +public void NonGeneric_ExtensionMethodWithReservedKeywordParameter(System.Int32 @new) { Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithReservedKeywordParameter(Context, @new); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReturnValue b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReturnValue index 06b202e16d..8075bdc12d 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReturnValue +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/NonGeneric_ExtensionMethodWithReturnValue @@ -1,4 +1,5 @@ -public System.String NonGeneric_ExtensionMethodWithReturnValue() +[System.Diagnostics.DebuggerStepThrough] +public System.String NonGeneric_ExtensionMethodWithReturnValue() { return Cake.Core.Tests.Data.MethodAliasGeneratorData.NonGeneric_ExtensionMethodWithReturnValue(Context); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitError_WithMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitError_WithMessage index 69ad78324c..d180837ad1 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitError_WithMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitError_WithMessage @@ -1,4 +1,5 @@ -public void Obsolete_ExplicitError_WithMessage() +[System.Diagnostics.DebuggerStepThrough] +public void Obsolete_ExplicitError_WithMessage() { throw new Cake.Core.CakeException("The alias Obsolete_ExplicitError_WithMessage has been made obsolete. Please use Foo.Bar instead."); } \ No newline at end of file diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitWarning_WithMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitWarning_WithMessage index c19c4bcaa5..e436ddede9 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitWarning_WithMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ExplicitWarning_WithMessage @@ -1,4 +1,5 @@ -public void Obsolete_ExplicitWarning_WithMessage() +[System.Diagnostics.DebuggerStepThrough] +public void Obsolete_ExplicitWarning_WithMessage() { Context.Log.Warning("Warning: The alias Obsolete_ExplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); #pragma warning disable 0618 diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_NoMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_NoMessage index 6ef94e1ccf..1523fa310d 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_NoMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_NoMessage @@ -1,4 +1,5 @@ -public void Obsolete_ImplicitWarning_NoMessage() +[System.Diagnostics.DebuggerStepThrough] +public void Obsolete_ImplicitWarning_NoMessage() { Context.Log.Warning("Warning: The alias Obsolete_ImplicitWarning_NoMessage has been made obsolete."); #pragma warning disable 0618 diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_WithMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_WithMessage index d50f79f1c5..4ab4b9ea47 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_WithMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Methods/Obsolete_ImplicitWarning_WithMessage @@ -1,4 +1,5 @@ -public void Obsolete_ImplicitWarning_WithMessage() +[System.Diagnostics.DebuggerStepThrough] +public void Obsolete_ImplicitWarning_WithMessage() { Context.Log.Warning("Warning: The alias Obsolete_ImplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); #pragma warning disable 0618 diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Dynamic_Type b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Dynamic_Type index 96dfcefd11..b57a1679d3 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Dynamic_Type +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Dynamic_Type @@ -1,6 +1,7 @@ private dynamic _Cached_Dynamic_Type; public dynamic Cached_Dynamic_Type { + [System.Diagnostics.DebuggerStepThrough] get { if (_Cached_Dynamic_Type==null) diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitError_WithMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitError_WithMessage index 57c6caf94f..0d109964de 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitError_WithMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitError_WithMessage @@ -1,5 +1,6 @@ public System.Int32 Cached_Obsolete_ExplicitError_WithMessage { + [System.Diagnostics.DebuggerStepThrough] get { throw new Cake.Core.CakeException("The alias Cached_Obsolete_ExplicitError_WithMessage has been made obsolete. Please use Foo.Bar instead."); diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitWarning_WithMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitWarning_WithMessage index 6bca364694..a54cb38ce5 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitWarning_WithMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ExplicitWarning_WithMessage @@ -2,6 +2,7 @@ [Obsolete("Please use Foo.Bar instead.")] public System.Int32 Cached_Obsolete_ExplicitWarning_WithMessage { + [System.Diagnostics.DebuggerStepThrough] get { Context.Log.Warning("Warning: The alias Cached_Obsolete_ExplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_NoMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_NoMessage index 65364704a2..0b5db4d12e 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_NoMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_NoMessage @@ -2,6 +2,7 @@ [Obsolete] public System.Int32 Cached_Obsolete_ImplicitWarning_NoMessage { + [System.Diagnostics.DebuggerStepThrough] get { Context.Log.Warning("Warning: The alias Cached_Obsolete_ImplicitWarning_NoMessage has been made obsolete."); diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_WithMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_WithMessage index 89f6e79c79..ffb6c8c272 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_WithMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Obsolete_ImplicitWarning_WithMessage @@ -2,6 +2,7 @@ [Obsolete("Please use Foo.Bar instead.")] public System.Int32 Cached_Obsolete_ImplicitWarning_WithMessage { + [System.Diagnostics.DebuggerStepThrough] get { Context.Log.Warning("Warning: The alias Cached_Obsolete_ImplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Reference_Type b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Reference_Type index 1df2421f9f..203e42b432 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Reference_Type +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Reference_Type @@ -1,6 +1,7 @@ private System.String _Cached_Reference_Type; public System.String Cached_Reference_Type { + [System.Diagnostics.DebuggerStepThrough] get { if (_Cached_Reference_Type==null) diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Value_Type b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Value_Type index 68bb776893..159ad45343 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Value_Type +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/Cached_Value_Type @@ -1,6 +1,7 @@ private System.Boolean? _Cached_Value_Type; public System.Boolean Cached_Value_Type { + [System.Diagnostics.DebuggerStepThrough] get { if (_Cached_Value_Type==null) diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Dynamic_Type b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Dynamic_Type index e1225c3e74..8afeee8917 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Dynamic_Type +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Dynamic_Type @@ -1,5 +1,6 @@ public dynamic NonCached_Dynamic_Type { + [System.Diagnostics.DebuggerStepThrough] get { return Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Dynamic_Type(Context); diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitError_WithMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitError_WithMessage index 4eed195dcc..981d8ef161 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitError_WithMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitError_WithMessage @@ -1,5 +1,6 @@ public System.Int32 NonCached_Obsolete_ExplicitError_WithMessage { + [System.Diagnostics.DebuggerStepThrough] get { throw new Cake.Core.CakeException("The alias NonCached_Obsolete_ExplicitError_WithMessage has been made obsolete. Please use Foo.Bar instead."); diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitWarning_WithMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitWarning_WithMessage index 102bc209f0..4fc0eb5f89 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitWarning_WithMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ExplicitWarning_WithMessage @@ -1,5 +1,6 @@ public System.Int32 NonCached_Obsolete_ExplicitWarning_WithMessage { + [System.Diagnostics.DebuggerStepThrough] get { Context.Log.Warning("Warning: The alias NonCached_Obsolete_ExplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_NoMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_NoMessage index be258ce45a..93e9bb7369 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_NoMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_NoMessage @@ -1,5 +1,6 @@ public System.Int32 NonCached_Obsolete_ImplicitWarning_NoMessage { + [System.Diagnostics.DebuggerStepThrough] get { Context.Log.Warning("Warning: The alias NonCached_Obsolete_ImplicitWarning_NoMessage has been made obsolete."); diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_WithMessage b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_WithMessage index d82977bc0d..f6def61039 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_WithMessage +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Obsolete_ImplicitWarning_WithMessage @@ -1,5 +1,6 @@ public System.Int32 NonCached_Obsolete_ImplicitWarning_WithMessage { + [System.Diagnostics.DebuggerStepThrough] get { Context.Log.Warning("Warning: The alias NonCached_Obsolete_ImplicitWarning_WithMessage has been made obsolete. Please use Foo.Bar instead."); diff --git a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Value_Type b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Value_Type index cdfe390809..877caa66bf 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Value_Type +++ b/src/Cake.Core.Tests/Unit/Scripting/CodeGen/Expected/Properties/NonCached_Value_Type @@ -1,5 +1,6 @@ public System.Int32 NonCached_Value_Type { + [System.Diagnostics.DebuggerStepThrough] get { return Cake.Core.Tests.Data.PropertyAliasGeneratorData.NonCached_Value_Type(Context); diff --git a/src/Cake.Core/Scripting/CodeGen/MethodAliasGenerator.cs b/src/Cake.Core/Scripting/CodeGen/MethodAliasGenerator.cs index 03217be4a2..44dfb3e370 100644 --- a/src/Cake.Core/Scripting/CodeGen/MethodAliasGenerator.cs +++ b/src/Cake.Core/Scripting/CodeGen/MethodAliasGenerator.cs @@ -49,6 +49,7 @@ public static string Generate(MethodInfo method, out string hash) var parameters = method.GetParameters().Skip(1).ToArray(); // Generate method signature. + builder.AppendLine("[System.Diagnostics.DebuggerStepThrough]"); builder.Append("public "); builder.Append(GetReturnType(method)); builder.Append(" "); diff --git a/src/Cake.Core/Scripting/CodeGen/PropertyAliasGenerator.cs b/src/Cake.Core/Scripting/CodeGen/PropertyAliasGenerator.cs index d57c1bc4a2..3df7afb01d 100644 --- a/src/Cake.Core/Scripting/CodeGen/PropertyAliasGenerator.cs +++ b/src/Cake.Core/Scripting/CodeGen/PropertyAliasGenerator.cs @@ -119,6 +119,7 @@ private static string GenerateCode(MethodInfo method, out string hash) builder.Append("{"); builder.AppendLine(); + builder.AppendLine(" [System.Diagnostics.DebuggerStepThrough]"); builder.Append(" get"); builder.AppendLine(); builder.AppendLine(" {"); @@ -218,6 +219,7 @@ private static string GenerateCachedCode(MethodInfo method, out string hash) hash = GenerateCommonInitalCode(method, ref builder); builder.Append("{"); builder.AppendLine(); + builder.AppendLine(" [System.Diagnostics.DebuggerStepThrough]"); builder.AppendLine(" get"); builder.Append(" {"); builder.AppendLine(); From 36489449227160c778101658b09dce37f3cbd5cb Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Thu, 2 Jul 2020 21:45:02 +0100 Subject: [PATCH 004/445] (doc) SourceBrowser.io no longer exists --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 487b2ab758..747a50b862 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ [![homebrew](https://img.shields.io/homebrew/v/cake.svg)](http://braumeister.org/formula/cake) [![Help Contribute to Open Source](https://www.codetriage.com/cake-build/cake/badges/users.svg)](https://www.codetriage.com/cake-build/cake) -[![Source Browser](https://img.shields.io/badge/Browse-Source-green.svg)](http://sourcebrowser.io/Browse/cake-build/cake) - Cake (C# Make) is a build automation system with a C# DSL to do things like compiling code, copy files/folders, running unit tests, compress files and build NuGet packages. ## Continuous integration From 7b3625e60bc2467f8582b34cbc8c9eefee08636e Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Sat, 4 Jul 2020 22:31:04 +0100 Subject: [PATCH 005/445] (GH-2822) Add support for .Net Global Tool So that both the full .net framework version, and the global tool can be used. --- src/Cake.Common/Tools/ReportGenerator/ReportGeneratorRunner.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Common/Tools/ReportGenerator/ReportGeneratorRunner.cs b/src/Cake.Common/Tools/ReportGenerator/ReportGeneratorRunner.cs index 83a99ed156..2ce18cbdba 100644 --- a/src/Cake.Common/Tools/ReportGenerator/ReportGeneratorRunner.cs +++ b/src/Cake.Common/Tools/ReportGenerator/ReportGeneratorRunner.cs @@ -126,7 +126,7 @@ protected override string GetToolName() /// The tool executable name. protected override IEnumerable GetToolExecutableNames() { - return new[] { "ReportGenerator.exe" }; + return new[] { "ReportGenerator.exe", "reportgenerator" }; } private void AppendQuoted(ProcessArgumentBuilder builder, string key, string value) From 7a7f802c309fb8d5ea9623c10070971334eefaa7 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Mon, 6 Jul 2020 13:46:31 -0700 Subject: [PATCH 006/445] (GH-2822) Change order for tool names When attempting to run the change that was made on my Mac, the Cake Tool resolver still returns ReportGenerator.exe, since there is one of these nested within the folder structure for the gloal tool. So even though we"want" the shim to be found, it isn't. Workaround this by chaning the order for the tool names. Since the since shouldn't exist on a Windows machine, it shouldn't have any adverse affects. --- src/Cake.Common/Tools/ReportGenerator/ReportGeneratorRunner.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Common/Tools/ReportGenerator/ReportGeneratorRunner.cs b/src/Cake.Common/Tools/ReportGenerator/ReportGeneratorRunner.cs index 2ce18cbdba..501b6dc4f7 100644 --- a/src/Cake.Common/Tools/ReportGenerator/ReportGeneratorRunner.cs +++ b/src/Cake.Common/Tools/ReportGenerator/ReportGeneratorRunner.cs @@ -126,7 +126,7 @@ protected override string GetToolName() /// The tool executable name. protected override IEnumerable GetToolExecutableNames() { - return new[] { "ReportGenerator.exe", "reportgenerator" }; + return new[] { "reportgenerator", "ReportGenerator.exe" }; } private void AppendQuoted(ProcessArgumentBuilder builder, string key, string value) From 58fb66206ca843eb46ecac5799d931a262d1d32c Mon Sep 17 00:00:00 2001 From: Patrik Svensson Date: Wed, 17 Oct 2018 18:43:00 +0200 Subject: [PATCH 007/445] GH2333: Rewrite Cake.CLI (RFC-0001) Closes #2333 --- build.cake | 47 +- .../Unit/Tools/Cake/CakeRunnerTests.cs | 6 +- src/Cake.Common/ArgumentAliases.cs | 85 ++- src/Cake.Common/Tools/Cake/CakeRunner.cs | 9 +- .../Unit/Scripting/ScriptRunnerTests.cs | 44 +- src/Cake.Core/CakeArguments.cs | 46 ++ .../{ => Parser}/ConfigurationTokenStream.cs | 3 +- src/Cake.Core/Diagnostics/CakeDebugger.cs | 33 + src/Cake.Core/Diagnostics/ICakeDebugger.cs | 16 + src/Cake.Core/Graph/CakeGraph.cs | 32 + src/Cake.Core/Graph/CakeGraphBuilder.cs | 8 + src/Cake.Core/Graph/CakeGraphEdge.cs | 14 + src/Cake.Core/ICakeArguments.cs | 10 +- src/Cake.Core/Properties/AssemblyInfo.cs | 1 + src/Cake.Core/Reflection/AssemblyLoader.cs | 23 +- src/Cake.Core/Reflection/AssemblyVerifier.cs | 14 +- src/Cake.Core/Reflection/IAssemblyLoader.cs | 1 + src/Cake.Core/Reflection/IAssemblyVerifier.cs | 1 + src/Cake.Core/Scripting/IScriptRunner.cs | 4 +- src/Cake.Core/Scripting/ScriptConventions.cs | 1 + src/Cake.Core/Scripting/ScriptRunner.cs | 62 +- src/Cake.Tests/Cake.Tests.csproj | 21 +- .../ArrayInitializer/input | 4 - .../ArrayInitializer/output | 5 - .../Data/MonoScriptProcessor/Blocks/input | 14 - .../Data/MonoScriptProcessor/Blocks/output | 13 - .../Data/MonoScriptProcessor/Complex/input | 67 -- .../Data/MonoScriptProcessor/Complex/output | 56 -- .../Data/MonoScriptProcessor/Mixed/input | 5 - .../Data/MonoScriptProcessor/Mixed/output | 7 - .../MonoScriptProcessor/MixedComments/input | 10 - .../MonoScriptProcessor/MixedComments/output | 7 - .../Data/MonoScriptProcessor/Simple/input | 1 - .../Data/MonoScriptProcessor/Simple/output | 2 - .../Extensions/StreamReaderExtensions.cs | 28 - src/Cake.Tests/Extensions/StringExtensions.cs | 24 - src/Cake.Tests/Fakes/FakeDebugger.cs | 15 + .../Fakes/FakeRemainingArguments.cs | 20 + src/Cake.Tests/Fakes/FakeScriptEngine.cs | 21 + src/Cake.Tests/Fakes/FakeScriptSession.cs | 34 + src/Cake.Tests/Fakes/FakeVersionResolver.cs | 26 + .../Fixtures/ArgumentParserFixture.cs | 25 - .../Fixtures/BuildFeatureFixture.cs | 97 +++ .../Fixtures/BuildFeatureFixtureResult.cs | 11 + .../Fixtures/CakeApplicationFixture.cs | 35 - .../Fixtures/DebugCommandFixture.cs | 51 -- src/Cake.Tests/Fixtures/ProgramFixture.cs | 67 ++ .../Fixtures/ProgramFixtureResult.cs | 7 + src/Cake.Tests/Properties/AssemblyInfo.cs | 16 - .../Unit/Arguments/ArgumentParserTests.cs | 633 ------------------ src/Cake.Tests/Unit/CakeApplicationTests.cs | 228 ------- src/Cake.Tests/Unit/CakeArgumentsTest.cs | 85 --- src/Cake.Tests/Unit/CakeOptionsTests.cs | 25 - src/Cake.Tests/Unit/CakeReportPrinterTests.cs | 163 ----- .../Unit/Commands/DebugCommandTests.cs | 65 -- .../ContainerBuilderAdapterTests.cs | 159 ----- .../Unit/Features/BootstrapFeatureTests.cs | 30 + .../Unit/Features/BuildFeatureTests.cs | 59 ++ .../Unit/Features/InfoFeatureTests.cs | 41 ++ .../Unit/Features/VersionFeatureTests.cs | 40 ++ .../Unit/Modules/ConfigurationModuleTests.cs | 55 -- src/Cake.Tests/Unit/ProgramTests.cs | 131 ++++ .../Unit/Scripting/BuildScriptHostTests.cs | 101 --- .../Scripting/DescriptionScriptHostTests.cs | 82 --- .../Scripting/DryRunExecutionStrategyTests.cs | 52 -- .../Unit/Scripting/DryRunScriptHostTests.cs | 81 --- .../Utilities/TestContainerConfigurator.cs | 39 ++ src/Cake.sln | 25 +- src/Cake.sln.DotSettings | 84 ++- src/Cake/Arguments/ArgumentParser.cs | 218 ------ src/Cake/Arguments/IArgumentParser.cs | 21 - src/Cake/Arguments/VerbosityParser.cs | 60 -- src/Cake/Cake.csproj | 4 +- src/Cake/CakeApplication.cs | 96 --- src/Cake/CakeArguments.cs | 55 -- src/Cake/CakeOptions.cs | 124 ---- src/Cake/Commands/BootstrapCommand.cs | 60 -- src/Cake/Commands/BuildCommand.cs | 44 -- src/Cake/Commands/CommandFactory.cs | 86 --- src/Cake/Commands/DebugCommand.cs | 53 -- src/Cake/Commands/DefaultCommand.cs | 87 +++ src/Cake/Commands/DefaultCommandSettings.cs | 59 ++ src/Cake/Commands/DescriptionCommand.cs | 38 -- src/Cake/Commands/DryRunCommand.cs | 38 -- src/Cake/Commands/ErrorCommandDecorator.cs | 25 - src/Cake/Commands/HelpCommand.cs | 61 -- src/Cake/Commands/ICommand.cs | 19 - src/Cake/Commands/ICommandFactory.cs | 66 -- src/Cake/Commands/TaskTreeCommand.cs | 38 -- src/Cake/Commands/VersionCommand.cs | 38 -- src/Cake/Composition/ModuleLoader.cs | 67 -- src/Cake/Diagnostics/CakeDebugger.cs | 30 - src/Cake/Diagnostics/IDebugger.cs | 28 - .../Bootstrapping/BootstrapFeature.cs | 74 ++ .../Bootstrapping/BootstrapFeatureSettings.cs | 15 + src/Cake/Features/Building/BuildFeature.cs | 135 ++++ .../Features/Building/BuildFeatureSettings.cs | 24 + src/Cake/Features/Building/BuildHostKind.cs | 14 + .../Building/Hosts}/BuildScriptHost.cs | 2 +- .../Building/Hosts}/DescriptionScriptHost.cs | 9 +- .../Hosts}/DryRunExecutionStrategy.cs | 2 +- .../Building/Hosts}/DryRunScriptHost.cs | 8 +- .../Building/Hosts/TreeScriptHost.cs} | 14 +- src/Cake/Features/CakeFeature.cs | 56 ++ .../Introspection/InfoFeature.cs} | 46 +- .../Features/Introspection/VersionFeature.cs | 31 + .../Features/Introspection/VersionResolver.cs | 29 + .../Composition/AutofacTypeRegistrar.cs} | 35 +- .../Composition/AutofacTypeResolver.cs | 25 + .../ContainerRegistrationBuilder.cs | 8 +- .../Composition/ModuleLoader.cs | 68 ++ .../Composition/ModuleSearcher.cs | 42 +- .../Infrastructure/ContainerConfigurator.cs | 51 ++ .../Converters/FilePathConverter.cs | 23 + .../Converters/VerbosityConverter.cs | 51 ++ .../Infrastructure/IContainerConfigurator.cs | 22 + .../Infrastructure/IScriptHostSettings.cs | 11 + .../Scripting}/RoslynCodeGenerator.cs | 4 +- .../Scripting}/RoslynScriptEngine.cs | 15 +- .../Scripting}/RoslynScriptSession.cs | 25 +- .../Scripting}/ScriptAssemblyResolver.cs | 4 +- src/Cake/Modules/ArgumentsModule.cs | 31 - src/Cake/Modules/CakeModule.cs | 64 -- src/Cake/Modules/ConfigurationModule.cs | 34 - src/Cake/Modules/ScriptingModule.cs | 34 - src/Cake/Program.cs | 168 +++-- src/Cake/Properties/AssemblyInfo.cs | 9 +- src/Cake/app.manifest | 31 - .../Cake.Common/ArgumentAliases.cake | 14 +- 129 files changed, 2058 insertions(+), 3912 deletions(-) create mode 100644 src/Cake.Core/CakeArguments.cs rename src/Cake.Core/Configuration/{ => Parser}/ConfigurationTokenStream.cs (96%) create mode 100644 src/Cake.Core/Diagnostics/CakeDebugger.cs create mode 100644 src/Cake.Core/Diagnostics/ICakeDebugger.cs delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/ArrayInitializer/input delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/ArrayInitializer/output delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/Blocks/input delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/Blocks/output delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/Complex/input delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/Complex/output delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/Mixed/input delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/Mixed/output delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/MixedComments/input delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/MixedComments/output delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/Simple/input delete mode 100644 src/Cake.Tests/Data/MonoScriptProcessor/Simple/output delete mode 100644 src/Cake.Tests/Extensions/StreamReaderExtensions.cs delete mode 100644 src/Cake.Tests/Extensions/StringExtensions.cs create mode 100644 src/Cake.Tests/Fakes/FakeDebugger.cs create mode 100644 src/Cake.Tests/Fakes/FakeRemainingArguments.cs create mode 100644 src/Cake.Tests/Fakes/FakeScriptEngine.cs create mode 100644 src/Cake.Tests/Fakes/FakeScriptSession.cs create mode 100644 src/Cake.Tests/Fakes/FakeVersionResolver.cs delete mode 100644 src/Cake.Tests/Fixtures/ArgumentParserFixture.cs create mode 100644 src/Cake.Tests/Fixtures/BuildFeatureFixture.cs create mode 100644 src/Cake.Tests/Fixtures/BuildFeatureFixtureResult.cs delete mode 100644 src/Cake.Tests/Fixtures/CakeApplicationFixture.cs delete mode 100644 src/Cake.Tests/Fixtures/DebugCommandFixture.cs create mode 100644 src/Cake.Tests/Fixtures/ProgramFixture.cs create mode 100644 src/Cake.Tests/Fixtures/ProgramFixtureResult.cs delete mode 100644 src/Cake.Tests/Properties/AssemblyInfo.cs delete mode 100644 src/Cake.Tests/Unit/Arguments/ArgumentParserTests.cs delete mode 100644 src/Cake.Tests/Unit/CakeApplicationTests.cs delete mode 100644 src/Cake.Tests/Unit/CakeArgumentsTest.cs delete mode 100644 src/Cake.Tests/Unit/CakeOptionsTests.cs delete mode 100644 src/Cake.Tests/Unit/CakeReportPrinterTests.cs delete mode 100644 src/Cake.Tests/Unit/Commands/DebugCommandTests.cs delete mode 100644 src/Cake.Tests/Unit/Composition/ContainerBuilderAdapterTests.cs create mode 100644 src/Cake.Tests/Unit/Features/BootstrapFeatureTests.cs create mode 100644 src/Cake.Tests/Unit/Features/BuildFeatureTests.cs create mode 100644 src/Cake.Tests/Unit/Features/InfoFeatureTests.cs create mode 100644 src/Cake.Tests/Unit/Features/VersionFeatureTests.cs delete mode 100644 src/Cake.Tests/Unit/Modules/ConfigurationModuleTests.cs create mode 100644 src/Cake.Tests/Unit/ProgramTests.cs delete mode 100644 src/Cake.Tests/Unit/Scripting/BuildScriptHostTests.cs delete mode 100644 src/Cake.Tests/Unit/Scripting/DescriptionScriptHostTests.cs delete mode 100644 src/Cake.Tests/Unit/Scripting/DryRunExecutionStrategyTests.cs delete mode 100644 src/Cake.Tests/Unit/Scripting/DryRunScriptHostTests.cs create mode 100644 src/Cake.Tests/Utilities/TestContainerConfigurator.cs delete mode 100644 src/Cake/Arguments/ArgumentParser.cs delete mode 100644 src/Cake/Arguments/IArgumentParser.cs delete mode 100644 src/Cake/Arguments/VerbosityParser.cs delete mode 100644 src/Cake/CakeApplication.cs delete mode 100644 src/Cake/CakeArguments.cs delete mode 100644 src/Cake/CakeOptions.cs delete mode 100644 src/Cake/Commands/BootstrapCommand.cs delete mode 100644 src/Cake/Commands/BuildCommand.cs delete mode 100644 src/Cake/Commands/CommandFactory.cs delete mode 100644 src/Cake/Commands/DebugCommand.cs create mode 100644 src/Cake/Commands/DefaultCommand.cs create mode 100644 src/Cake/Commands/DefaultCommandSettings.cs delete mode 100644 src/Cake/Commands/DescriptionCommand.cs delete mode 100644 src/Cake/Commands/DryRunCommand.cs delete mode 100644 src/Cake/Commands/ErrorCommandDecorator.cs delete mode 100644 src/Cake/Commands/HelpCommand.cs delete mode 100644 src/Cake/Commands/ICommand.cs delete mode 100644 src/Cake/Commands/ICommandFactory.cs delete mode 100644 src/Cake/Commands/TaskTreeCommand.cs delete mode 100644 src/Cake/Commands/VersionCommand.cs delete mode 100644 src/Cake/Composition/ModuleLoader.cs delete mode 100644 src/Cake/Diagnostics/CakeDebugger.cs delete mode 100644 src/Cake/Diagnostics/IDebugger.cs create mode 100644 src/Cake/Features/Bootstrapping/BootstrapFeature.cs create mode 100644 src/Cake/Features/Bootstrapping/BootstrapFeatureSettings.cs create mode 100644 src/Cake/Features/Building/BuildFeature.cs create mode 100644 src/Cake/Features/Building/BuildFeatureSettings.cs create mode 100644 src/Cake/Features/Building/BuildHostKind.cs rename src/Cake/{Scripting => Features/Building/Hosts}/BuildScriptHost.cs (97%) rename src/Cake/{Scripting => Features/Building/Hosts}/DescriptionScriptHost.cs (91%) rename src/Cake/{Scripting => Features/Building/Hosts}/DryRunExecutionStrategy.cs (98%) rename src/Cake/{Scripting => Features/Building/Hosts}/DryRunScriptHost.cs (91%) rename src/Cake/{Scripting/TaskTreeScriptHost.cs => Features/Building/Hosts/TreeScriptHost.cs} (90%) create mode 100644 src/Cake/Features/CakeFeature.cs rename src/Cake/{Commands/InfoCommand.cs => Features/Introspection/InfoFeature.cs} (70%) create mode 100644 src/Cake/Features/Introspection/VersionFeature.cs create mode 100644 src/Cake/Features/Introspection/VersionResolver.cs rename src/Cake/{Composition/ContainerRegistrar.cs => Infrastructure/Composition/AutofacTypeRegistrar.cs} (54%) create mode 100644 src/Cake/Infrastructure/Composition/AutofacTypeResolver.cs rename src/Cake/{ => Infrastructure}/Composition/ContainerRegistrationBuilder.cs (86%) create mode 100644 src/Cake/Infrastructure/Composition/ModuleLoader.cs rename src/Cake/{ => Infrastructure}/Composition/ModuleSearcher.cs (65%) create mode 100644 src/Cake/Infrastructure/ContainerConfigurator.cs create mode 100644 src/Cake/Infrastructure/Converters/FilePathConverter.cs create mode 100644 src/Cake/Infrastructure/Converters/VerbosityConverter.cs create mode 100644 src/Cake/Infrastructure/IContainerConfigurator.cs create mode 100644 src/Cake/Infrastructure/IScriptHostSettings.cs rename src/Cake/{Scripting/Roslyn => Infrastructure/Scripting}/RoslynCodeGenerator.cs (96%) rename src/Cake/{Scripting/Roslyn => Infrastructure/Scripting}/RoslynScriptEngine.cs (50%) rename src/Cake/{Scripting/Roslyn => Infrastructure/Scripting}/RoslynScriptSession.cs (87%) rename src/Cake/{Scripting/Roslyn => Infrastructure/Scripting}/ScriptAssemblyResolver.cs (95%) delete mode 100644 src/Cake/Modules/ArgumentsModule.cs delete mode 100644 src/Cake/Modules/CakeModule.cs delete mode 100644 src/Cake/Modules/ConfigurationModule.cs delete mode 100644 src/Cake/Modules/ScriptingModule.cs delete mode 100644 src/Cake/app.manifest diff --git a/build.cake b/build.cake index b6b22f509a..3a0672f296 100644 --- a/build.cake +++ b/build.cake @@ -199,10 +199,6 @@ Task("Copy-Files") // Copy icon CopyFileToDirectory("./nuspec/cake-medium.png", parameters.Paths.Directories.ArtifactsBinFullFx); CopyFileToDirectory("./nuspec/cake-medium.png", parameters.Paths.Directories.ArtifactsBinNetCore); - - // Copy Cake.XML (since publish does not do this anymore) - CopyFileToDirectory("./src/Cake/bin/" + parameters.Configuration + "/net461/Cake.xml", parameters.Paths.Directories.ArtifactsBinFullFx); - CopyFileToDirectory("./src/Cake/bin/" + parameters.Configuration + "/netcoreapp2.0/Cake.xml", parameters.Paths.Directories.ArtifactsBinNetCore); }); Task("Validate-Version") @@ -599,21 +595,34 @@ Task("Run-Integration-Tests") }, (parameters, cakeAssembly, context) => { - Information("Testing: {0}", cakeAssembly); - CakeExecuteScript("./tests/integration/build.cake", - new CakeSettings { - ToolPath = cakeAssembly, - EnvironmentVariables = { - ["MyEnvironmentVariable"] = "Hello World", - ["CAKE_INTEGRATION_TEST_ROOT"] = "../.." - }, - Arguments = { - ["target"] = Argument("integration-tests-target", "Run-All-Tests"), - ["verbosity"] = "quiet", - ["platform"] = parameters.IsRunningOnWindows ? "windows" : "posix", - ["customarg"] = "hello" - } - }); + try + { + Information("Testing: {0}", cakeAssembly); + CakeExecuteScript("./tests/integration/build.cake", + new CakeSettings { + ToolPath = cakeAssembly, + EnvironmentVariables = { + ["MyEnvironmentVariable"] = "Hello World", + ["CAKE_INTEGRATION_TEST_ROOT"] = "../.." + }, + ArgumentCustomization = args => args + .AppendSwitchQuoted("--target", " ", Argument("integration-tests-target", "Run-All-Tests")) + .AppendSwitchQuoted("--verbosity", " ", "quiet") + .AppendSwitchQuoted("--platform", " ", parameters.IsRunningOnWindows ? "windows" : "posix") + .AppendSwitchQuoted("--customarg", " ", "hello") + .AppendSwitchQuoted("--multipleargs", "=", "a") + .AppendSwitchQuoted("--multipleargs", "=", "b") + }); + } + catch(Exception ex) + { + Error("While testing: {0}\r\n{1}", cakeAssembly, ex); + throw; + } + finally + { + Information("Done testing: {0}", cakeAssembly); + } }); diff --git a/src/Cake.Common.Tests/Unit/Tools/Cake/CakeRunnerTests.cs b/src/Cake.Common.Tests/Unit/Tools/Cake/CakeRunnerTests.cs index 2188c54ea3..660bf299ca 100644 --- a/src/Cake.Common.Tests/Unit/Tools/Cake/CakeRunnerTests.cs +++ b/src/Cake.Common.Tests/Unit/Tools/Cake/CakeRunnerTests.cs @@ -118,7 +118,7 @@ public void Should_Add_Provided_Verbosity_To_Process_Arguments() var result = fixture.Run(); // Then - Assert.Equal("\"/Working/build.cake\" -verbosity=Diagnostic", result.Args); + Assert.Equal("\"/Working/build.cake\" --verbosity=Diagnostic", result.Args); } [Fact] @@ -135,8 +135,8 @@ public void Should_Add_Provided_Arguments_To_Process_Arguments() // Then Assert.Equal("\"/Working/build.cake\" " + - "-target=\"Build\" " + - "-configuration=\"Debug\"", result.Args); + "--target=\"Build\" " + + "--configuration=\"Debug\"", result.Args); } } } diff --git a/src/Cake.Common/ArgumentAliases.cs b/src/Cake.Common/ArgumentAliases.cs index 51a5d935e9..f30aa2e9bd 100644 --- a/src/Cake.Common/ArgumentAliases.cs +++ b/src/Cake.Common/ArgumentAliases.cs @@ -3,8 +3,10 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Generic; using System.ComponentModel; using System.Globalization; +using System.Linq; using Cake.Core; using Cake.Core.Annotations; @@ -26,12 +28,12 @@ public static class ArgumentAliases /// This sample shows how to call the method. /// /// var argumentName = "myArgument"; - /// //Cake.exe .\hasargument.cake -myArgument="is specified" + /// // Cake.exe .\hasargument.cake -myArgument="is specified" /// if (HasArgument(argumentName)) /// { /// Information("{0} is specified", argumentName); /// } - /// //Cake.exe .\hasargument.cake + /// // Cake.exe .\hasargument.cake /// else /// { /// Warning("{0} not specified", argumentName); @@ -57,7 +59,7 @@ public static bool HasArgument(this ICakeContext context, string name) /// The value of the argument. /// /// - /// //Cake.exe .\argument.cake -myArgument="is valid" -loopCount = 5 + /// // Cake.exe .\argument.cake --myArgument="is valid" --loopCount=5 /// Information("Argument {0}", Argument<string>("myArgument")); /// var loopCount = Argument<int>("loopCount"); /// for(var index = 0;index<loopCount; index++) @@ -76,16 +78,83 @@ public static T Argument(this ICakeContext context, string name) throw new ArgumentNullException(nameof(context)); } - var value = context.Arguments.GetArgument(name); + var value = context.Arguments.GetArguments(name).FirstOrDefault(); if (value == null) { const string format = "Argument '{0}' was not set."; var message = string.Format(CultureInfo.InvariantCulture, format, name); throw new CakeException(message); } + return Convert(value); } + /// + /// Gets all arguments with the specific name and throws if the argument is missing. + /// + /// The argument type. + /// The context. + /// The argument name. + /// The argument values. + /// + /// + /// // Cake.exe .\argument.cake --foo="foo" --foo="bar" + /// var arguments = Arguments<string>("foo"); + /// Information("Arguments: {0}", string.Join(", ", arguments)); + /// + /// + [CakeMethodAlias] + public static ICollection Arguments(this ICakeContext context, string name) + { + if (context == null) + { + throw new ArgumentNullException(nameof(context)); + } + + var values = context.Arguments.GetArguments(name); + if (values == null || values.Count == 0) + { + const string format = "Argument '{0}' was not set."; + var message = string.Format(CultureInfo.InvariantCulture, format, name); + throw new CakeException(message); + } + + return values.Select(value => Convert(value)).ToArray(); + } + + /// + /// Gets all arguments with the specific name and returns the + /// provided if the argument is missing. + /// + /// The argument type. + /// The context. + /// The argument name. + /// The value to return if the argument is missing. + /// The argument values. + /// + /// + /// // Cake.exe .\argument.cake --foo="foo" --foo="bar" + /// var arguments = Arguments<string>("foo", "default"); + /// Information("Arguments: {0}", string.Join(", ", arguments)); + /// + /// + [CakeMethodAlias] + public static ICollection Arguments(this ICakeContext context, string name, T defaultValue) + { + if (context == null) + { + throw new ArgumentNullException(nameof(context)); + } + + var values = context.Arguments.GetArguments(name); + if (values == null || values.Count == 0) + { + return new T[] { defaultValue }; + } + + return values.Select(value => Convert(value)).ToArray(); + } + /// /// Gets an argument and returns the provided if the argument is missing. /// @@ -96,7 +165,7 @@ public static T Argument(this ICakeContext context, string name) /// The value of the argument if it exist; otherwise . /// /// - /// //Cake.exe .\argument.cake -myArgument="is valid" -loopCount = 5 + /// // Cake.exe .\argument.cake --myArgument="is valid" --loopCount=5 /// Information("Argument {0}", Argument<string>("myArgument", "is NOT valid")); /// var loopCount = Argument<int>("loopCount", 10); /// for(var index = 0;index<loopCount; index++) @@ -113,8 +182,10 @@ public static T Argument(this ICakeContext context, string name, T defaultVal throw new ArgumentNullException(nameof(context)); } - var value = context.Arguments.GetArgument(name); - return value == null ? defaultValue : Convert(value); + var value = context.Arguments.GetArguments(name)?.FirstOrDefault(); + return value == null + ? defaultValue + : Convert(value); } private static T Convert(string value) diff --git a/src/Cake.Common/Tools/Cake/CakeRunner.cs b/src/Cake.Common/Tools/Cake/CakeRunner.cs index dd7c2dc657..cc1d1d67d6 100644 --- a/src/Cake.Common/Tools/Cake/CakeRunner.cs +++ b/src/Cake.Common/Tools/Cake/CakeRunner.cs @@ -144,17 +144,20 @@ private ProcessArgumentBuilder GetArguments(FilePath scriptPath, CakeSettings se if (settings.Verbosity.HasValue) { - builder.Append(string.Concat("-verbosity=", settings.Verbosity.Value.ToString())); + builder.Append(string.Concat("--verbosity=", settings.Verbosity.Value.ToString())); } if (settings.Arguments != null) { foreach (var argument in settings.Arguments) { + var key = argument.Key.Length == 1 + ? $"-{argument.Key}" : $"--{argument.Key}"; + builder.Append(string.Format( CultureInfo.InvariantCulture, - "-{0}={1}", - argument.Key, + "{0}={1}", + key, (argument.Value ?? string.Empty).Quote())); } } diff --git a/src/Cake.Core.Tests/Unit/Scripting/ScriptRunnerTests.cs b/src/Cake.Core.Tests/Unit/Scripting/ScriptRunnerTests.cs index 799ed252e4..929ee43a34 100644 --- a/src/Cake.Core.Tests/Unit/Scripting/ScriptRunnerTests.cs +++ b/src/Cake.Core.Tests/Unit/Scripting/ScriptRunnerTests.cs @@ -117,7 +117,7 @@ public void Should_Throw_If_Script_Host_Is_Null() var runner = fixture.CreateScriptRunner(); // When - var result = Record.Exception(() => runner.Run(null, fixture.Script, fixture.ArgumentDictionary)); + var result = Record.Exception(() => runner.Run(null, fixture.Script)); // Then AssertEx.IsArgumentNullException(result, "host"); @@ -131,26 +131,12 @@ public void Should_Throw_If_Script_Is_Null() var runner = fixture.CreateScriptRunner(); // When - var result = Record.Exception(() => runner.Run(fixture.Host, null, fixture.ArgumentDictionary)); + var result = Record.Exception(() => runner.Run(fixture.Host, null)); // Then AssertEx.IsArgumentNullException(result, "scriptPath"); } - [Fact] - public void Should_Throw_If_Arguments_Are_Null() - { - // Given - var fixture = new ScriptRunnerFixture(); - var runner = fixture.CreateScriptRunner(); - - // When - var result = Record.Exception(() => runner.Run(fixture.Host, fixture.Script, null)); - - // Then - AssertEx.IsArgumentNullException(result, "arguments"); - } - [Fact] public void Should_Create_Session_Via_Session_Factory() { @@ -159,7 +145,7 @@ public void Should_Create_Session_Via_Session_Factory() var runner = fixture.CreateScriptRunner(); // When - runner.Run(fixture.Host, fixture.Script, fixture.ArgumentDictionary); + runner.Run(fixture.Host, fixture.Script); // Then fixture.Engine.Received(1).CreateSession(fixture.Host); @@ -173,7 +159,7 @@ public void Should_Set_Working_Directory_To_Script_Directory() var runner = fixture.CreateScriptRunner(); // When - runner.Run(fixture.Host, fixture.Script, fixture.ArgumentDictionary); + runner.Run(fixture.Host, fixture.Script); // Then Assert.Equal("/build", fixture.Environment.WorkingDirectory.FullPath); @@ -194,7 +180,7 @@ public void Should_Add_References_To_Session(string assemblyName) var runner = fixture.CreateScriptRunner(); // When - runner.Run(fixture.Host, fixture.Script, fixture.ArgumentDictionary); + runner.Run(fixture.Host, fixture.Script); // Then fixture.Session.Received(1).AddReference( @@ -220,7 +206,7 @@ public void Should_Add_Namespaces_To_Session(string @namespace) var runner = fixture.CreateScriptRunner(); // When - runner.Run(fixture.Host, fixture.Script, fixture.ArgumentDictionary); + runner.Run(fixture.Host, fixture.Script); // Then fixture.Session.Received(1).ImportNamespace(@namespace); @@ -234,7 +220,7 @@ public void Should_Generate_Script_Aliases() var runner = fixture.CreateScriptRunner(); // When - runner.Run(fixture.Host, fixture.Script, fixture.ArgumentDictionary); + runner.Run(fixture.Host, fixture.Script); // Then fixture.AliasFinder.Received(1).FindAliases( @@ -249,7 +235,7 @@ public void Should_Execute_Script_Code() var runner = fixture.CreateScriptRunner(); // When - runner.Run(fixture.Host, fixture.Script, fixture.ArgumentDictionary); + runner.Run(fixture.Host, fixture.Script); // Then fixture.Session.Received(1).Execute(Arg.Any