From 7b32a5f78e88ea9e38880a782cf7a1b9b1909040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tau=20G=C3=A4rtli?= Date: Sat, 8 Feb 2025 21:09:01 +0100 Subject: [PATCH 1/3] Make clear that public API analyzers should be run on newest target framework --- Funcky.Async/Funcky.Async.csproj | 10 ++++++++-- Funcky/Funcky.csproj | 8 ++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Funcky.Async/Funcky.Async.csproj b/Funcky.Async/Funcky.Async.csproj index 4b1de2e2..021e9415 100644 --- a/Funcky.Async/Funcky.Async.csproj +++ b/Funcky.Async/Funcky.Async.csproj @@ -1,6 +1,7 @@ - net9.0;net8.0;net5.0;netstandard2.1;netstandard2.0 + net9.0 + $(FunckyNewestTargetFramework);net8.0;net5.0;netstandard2.1;netstandard2.0 preview enable Extends Funcky with support for IAsyncEnumerable and Tasks. @@ -29,6 +30,11 @@ true + + + + + @@ -43,7 +49,7 @@ - + diff --git a/Funcky/Funcky.csproj b/Funcky/Funcky.csproj index e5ed2376..e0b2b8a1 100644 --- a/Funcky/Funcky.csproj +++ b/Funcky/Funcky.csproj @@ -1,6 +1,7 @@ - net9.0;net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;netstandard2.0;netstandard2.1 + net9.0 + $(FunckyNewestTargetFramework);net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;netstandard2.0;netstandard2.1 preview enable Funcky @@ -20,10 +21,9 @@ $(DefineConstants);CONTRACTS_FULL - net9.0 - + @@ -35,7 +35,7 @@ - + From d05f5f98f9e8ac17b13a91433980364a6f444c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tau=20G=C3=A4rtli?= Date: Sat, 8 Feb 2025 21:27:22 +0100 Subject: [PATCH 2/3] Unify use of public API analyzers across projects --- Funcky.Async/Funcky.Async.csproj | 7 +------ Funcky.Xunit.v3/Funcky.Xunit.v3.csproj | 5 +++-- Funcky.Xunit/Funcky.Xunit.csproj | 5 +++-- Funcky.sln | 1 + Funcky/Funcky.csproj | 7 +------ PublicApiAnalyzers.targets | 21 +++++++++++++++++++++ 6 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 PublicApiAnalyzers.targets diff --git a/Funcky.Async/Funcky.Async.csproj b/Funcky.Async/Funcky.Async.csproj index 021e9415..48f8169c 100644 --- a/Funcky.Async/Funcky.Async.csproj +++ b/Funcky.Async/Funcky.Async.csproj @@ -30,11 +30,6 @@ true - - - - - @@ -49,7 +44,6 @@ - @@ -64,4 +58,5 @@ + diff --git a/Funcky.Xunit.v3/Funcky.Xunit.v3.csproj b/Funcky.Xunit.v3/Funcky.Xunit.v3.csproj index b24e3c87..764c381b 100644 --- a/Funcky.Xunit.v3/Funcky.Xunit.v3.csproj +++ b/Funcky.Xunit.v3/Funcky.Xunit.v3.csproj @@ -1,6 +1,7 @@  - netstandard2.0;net6.0 + net6.0 + $(FunckyNewestTargetFramework);netstandard2.0 preview enable Package to use Funcky with xUnit v3 @@ -36,7 +37,6 @@ - @@ -46,4 +46,5 @@ + diff --git a/Funcky.Xunit/Funcky.Xunit.csproj b/Funcky.Xunit/Funcky.Xunit.csproj index da520673..71d5d2a1 100644 --- a/Funcky.Xunit/Funcky.Xunit.csproj +++ b/Funcky.Xunit/Funcky.Xunit.csproj @@ -1,6 +1,7 @@ - netstandard2.0;net6.0 + net6.0 + $(FunckyNewestTargetFramework);netstandard2.0 preview enable Package to use Funcky with xUnit @@ -24,7 +25,6 @@ - @@ -35,4 +35,5 @@ + diff --git a/Funcky.sln b/Funcky.sln index af7e452f..bf42af62 100644 --- a/Funcky.sln +++ b/Funcky.sln @@ -27,6 +27,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Config", "Build Confi GlobalUsings.Test.props = GlobalUsings.Test.props NuGet.config = NuGet.config typos.toml = typos.toml + PublicApiAnalyzers.targets = PublicApiAnalyzers.targets EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Funcky.Xunit", "Funcky.Xunit\Funcky.Xunit.csproj", "{F2E98B0D-CC17-4576-89DE-065FF475BE6E}" diff --git a/Funcky/Funcky.csproj b/Funcky/Funcky.csproj index e0b2b8a1..8fa2c90f 100644 --- a/Funcky/Funcky.csproj +++ b/Funcky/Funcky.csproj @@ -23,7 +23,6 @@ $(DefineConstants);CONTRACTS_FULL - @@ -34,11 +33,6 @@ - - - - - true true @@ -63,4 +57,5 @@ + diff --git a/PublicApiAnalyzers.targets b/PublicApiAnalyzers.targets new file mode 100644 index 00000000..2414748b --- /dev/null +++ b/PublicApiAnalyzers.targets @@ -0,0 +1,21 @@ + + + + + + + + + + + + $(CoreCompileDependsOn);_ValidateFunckyNewestTargetFrameworkIsSet + + + + <_Text>The 'FunckyNewestTargetFramework' property is not set; public API analyzers will not run + + + + + From 7635ee34511eb8d057416cbfd723c6be2e522894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tau=20G=C3=A4rtli?= Date: Sat, 8 Feb 2025 21:37:29 +0100 Subject: [PATCH 3/3] Add helpful comment --- PublicApiAnalyzers.targets | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PublicApiAnalyzers.targets b/PublicApiAnalyzers.targets index 2414748b..de2c229d 100644 --- a/PublicApiAnalyzers.targets +++ b/PublicApiAnalyzers.targets @@ -1,5 +1,8 @@ +