From 03fe5dfbf4f26097ffa4d0734f2309320ed2219c Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Sun, 29 Jan 2023 15:04:17 +0100 Subject: [PATCH 1/9] Separate pre-post validation into proper CI sections --- appveyor.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 74424cc37..877f00bd0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -61,7 +61,6 @@ install: - sh: export PATH="$HOME/.dotnet:$PATH" before_build: - dotnet --info -build_script: - pwsh: | grep --extended-regexp '^[[:space:]]*using[[:space:]]+System\.Linq;' (dir -Recurse -File -Filter *Test.cs MoreLinq.Test) if ($LASTEXITCODE -eq 0) { @@ -69,6 +68,7 @@ build_script: } else { $LASTEXITCODE = 0 } +build_script: - ps: | $id = $env:APPVEYOR_REPO_COMMIT_TIMESTAMP -replace '([-:]|\.0+Z)', '' $id = $id.Substring(0, 13) @@ -76,6 +76,8 @@ build_script: if ($LASTEXITCODE -ne 0) { throw "Building/Packing failed with an exit code of $LASTEXITCODE." } +after_build: +- ps: | $diff = git diff --ignore-all-space --exit-code 2>&1 $diff | % { if ($_ -is [string]) { $_ } else { [string]$_ } } | echo if ($LASTEXITCODE -ne 0) { From ff88aa2b419165f768e2c74d0eebfc2f2be71ef1 Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Sun, 29 Jan 2023 15:12:24 +0100 Subject: [PATCH 2/9] Test no "System.Linq" import in tests --- MoreLinq.Test/PipeTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MoreLinq.Test/PipeTest.cs b/MoreLinq.Test/PipeTest.cs index 9fb1f1f53..8ca72ca7a 100644 --- a/MoreLinq.Test/PipeTest.cs +++ b/MoreLinq.Test/PipeTest.cs @@ -18,6 +18,7 @@ namespace MoreLinq.Test { using System.Collections.Generic; + using System.Linq; using System.Text; using NUnit.Framework; From cd396743ebbb0b94a1ef5508b1b4ae7d02a28a8f Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Sun, 29 Jan 2023 15:12:46 +0100 Subject: [PATCH 3/9] Test fresh T4 generated code --- MoreLinq/Fold.g.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MoreLinq/Fold.g.tt b/MoreLinq/Fold.g.tt index 693af6088..5a850fb83 100644 --- a/MoreLinq/Fold.g.tt +++ b/MoreLinq/Fold.g.tt @@ -27,7 +27,7 @@ namespace MoreLinq partial class MoreEnumerable { -<# const int max = 16; +<# const int max = 15; var overloads = from i in Enumerable.Range(1, max) let istr = i.ToString(CultureInfo.InvariantCulture) From 982a2b70e21d9f7bf34c4aa219b3ce5d502e1930 Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Sun, 29 Jan 2023 15:13:18 +0100 Subject: [PATCH 4/9] Test fresh extensions wrapper (generated) code --- MoreLinq/Index.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MoreLinq/Index.cs b/MoreLinq/Index.cs index 5fc811f95..53af7528b 100644 --- a/MoreLinq/Index.cs +++ b/MoreLinq/Index.cs @@ -24,15 +24,15 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Returns a sequence of - /// where the key is the zero-based index of the value in the source - /// sequence. + /// Returns a sequence of where the key is the + /// zero-based index of the value in the source sequence. /// - /// Type of elements in sequence. + /// Type of elements in + /// sequence. /// The source sequence. /// A sequence of . - /// This operator uses deferred execution and streams its - /// results. + /// + /// This operator uses deferred execution and streams its results. public static IEnumerable> Index(this IEnumerable source) { From 07b1a2baa35a523959aa19a31f6656711a8c232e Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Sun, 29 Jan 2023 15:17:27 +0100 Subject: [PATCH 5/9] Revert "Test no "System.Linq" import in tests" This reverts commit ff88aa2b419165f768e2c74d0eebfc2f2be71ef1. --- MoreLinq.Test/PipeTest.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/MoreLinq.Test/PipeTest.cs b/MoreLinq.Test/PipeTest.cs index 8ca72ca7a..9fb1f1f53 100644 --- a/MoreLinq.Test/PipeTest.cs +++ b/MoreLinq.Test/PipeTest.cs @@ -18,7 +18,6 @@ namespace MoreLinq.Test { using System.Collections.Generic; - using System.Linq; using System.Text; using NUnit.Framework; From 0895434ae055b0d099ef6afd33902936471371b6 Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Sun, 29 Jan 2023 22:14:30 +0100 Subject: [PATCH 6/9] Revert "Test fresh T4 generated code" This reverts commit cd396743ebbb0b94a1ef5508b1b4ae7d02a28a8f. --- MoreLinq/Fold.g.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MoreLinq/Fold.g.tt b/MoreLinq/Fold.g.tt index 5a850fb83..693af6088 100644 --- a/MoreLinq/Fold.g.tt +++ b/MoreLinq/Fold.g.tt @@ -27,7 +27,7 @@ namespace MoreLinq partial class MoreEnumerable { -<# const int max = 15; +<# const int max = 16; var overloads = from i in Enumerable.Range(1, max) let istr = i.ToString(CultureInfo.InvariantCulture) From 9ab5588636ce0b3f9737bc956774199dc16e59ec Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Sun, 29 Jan 2023 22:16:02 +0100 Subject: [PATCH 7/9] Test fresh T4 generated code (take 2) --- MoreLinq/Fold.g.tt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MoreLinq/Fold.g.tt b/MoreLinq/Fold.g.tt index 693af6088..3b028086a 100644 --- a/MoreLinq/Fold.g.tt +++ b/MoreLinq/Fold.g.tt @@ -43,8 +43,7 @@ namespace MoreLinq foreach (var e in overloads) { #> /// - /// Returns the result of applying a function to a sequence of - /// <#= e.CountElements #>. + /// Returns the result of applying a function to a sequence of <#= e.CountElements #>. /// /// /// This operator uses immediate execution and effectively buffers From c455909ba5cdfacebb9564fe05099821d4d1f2c6 Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Sun, 29 Jan 2023 22:31:35 +0100 Subject: [PATCH 8/9] Revert "Test fresh T4 generated code (take 2)" This reverts commit 9ab5588636ce0b3f9737bc956774199dc16e59ec. --- MoreLinq/Fold.g.tt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MoreLinq/Fold.g.tt b/MoreLinq/Fold.g.tt index 3b028086a..693af6088 100644 --- a/MoreLinq/Fold.g.tt +++ b/MoreLinq/Fold.g.tt @@ -43,7 +43,8 @@ namespace MoreLinq foreach (var e in overloads) { #> /// - /// Returns the result of applying a function to a sequence of <#= e.CountElements #>. + /// Returns the result of applying a function to a sequence of + /// <#= e.CountElements #>. /// /// /// This operator uses immediate execution and effectively buffers From 3ba47dd555bef798a4915b938f4704dea34835fd Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Sun, 29 Jan 2023 22:32:26 +0100 Subject: [PATCH 9/9] Revert "Test fresh extensions wrapper (generated) code" This reverts commit 982a2b70e21d9f7bf34c4aa219b3ce5d502e1930. --- MoreLinq/Index.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MoreLinq/Index.cs b/MoreLinq/Index.cs index 53af7528b..5fc811f95 100644 --- a/MoreLinq/Index.cs +++ b/MoreLinq/Index.cs @@ -24,15 +24,15 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Returns a sequence of where the key is the - /// zero-based index of the value in the source sequence. + /// Returns a sequence of + /// where the key is the zero-based index of the value in the source + /// sequence. /// - /// Type of elements in - /// sequence. + /// Type of elements in sequence. /// The source sequence. /// A sequence of . - /// - /// This operator uses deferred execution and streams its results. + /// This operator uses deferred execution and streams its + /// results. public static IEnumerable> Index(this IEnumerable source) {