From 41e9af11e79db7ced7ab2c61ae24270542a0428a Mon Sep 17 00:00:00 2001 From: SingleAccretion Date: Wed, 23 Dec 2020 19:38:51 +0300 Subject: [PATCH] Deleted all the infrastructure to reference source generators locally. Added a separate test project for source generators to avoid conflicts due to SGs including files from other projects directly. --- ComputeSharp.sln | 23 ++++++++++- Directory.Build.targets | 41 ------------------- .../ComputeSharp.Core.csproj | 17 +------- src/ComputeSharp/ComputeSharp.csproj | 6 +-- ...rp.Tests.Internals.SourceGenerators.csproj | 19 +++++++++ .../SourceGeneratorTests.cs | 0 .../ComputeSharp.Tests.Internals.csproj | 2 - 7 files changed, 42 insertions(+), 66 deletions(-) delete mode 100644 Directory.Build.targets create mode 100644 tests/ComputeSharp.Tests.Internals.SourceGenerators/ComputeSharp.Tests.Internals.SourceGenerators.csproj rename tests/{ComputeSharp.Tests.Internals => ComputeSharp.Tests.Internals.SourceGenerators}/SourceGeneratorTests.cs (100%) diff --git a/ComputeSharp.sln b/ComputeSharp.sln index 8901a2f3..715e9770 100644 --- a/ComputeSharp.sln +++ b/ComputeSharp.sln @@ -37,12 +37,14 @@ Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "ComputeSharp.Package", "src EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{FB17EF84-9208-47AC-921F-680CB1DAD8BA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.Sample.Local", "samples\ComputeSharp.Sample.Local\ComputeSharp.Sample.Local.csproj", "{7048DEEA-0A6F-46A0-B951-B682A8F1CB75}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Sample.Local", "samples\ComputeSharp.Sample.Local\ComputeSharp.Sample.Local.csproj", "{7048DEEA-0A6F-46A0-B951-B682A8F1CB75}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.Sample.NuGet", "samples\ComputeSharp.Sample.NuGet\ComputeSharp.Sample.NuGet.csproj", "{C423C061-64F7-4C12-8E5F-75C5351D6308}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Sample.NuGet", "samples\ComputeSharp.Sample.NuGet\ComputeSharp.Sample.NuGet.csproj", "{C423C061-64F7-4C12-8E5F-75C5351D6308}" EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.Sample.Shared", "samples\ComputeSharp.Sample.Shared\ComputeSharp.Sample.Shared.shproj", "{8CEFC324-CA6C-4845-9AD9-70B92BD87057}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.Tests.Internals.SourceGenerators", "tests\ComputeSharp.Tests.Internals.SourceGenerators\ComputeSharp.Tests.Internals.SourceGenerators.csproj", "{BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution samples\ComputeSharp.Sample.Shared\ComputeSharp.Sample.Shared.projitems*{7048deea-0a6f-46a0-b951-b682a8f1cb75}*SharedItemsImports = 5 @@ -152,6 +154,22 @@ Global {C423C061-64F7-4C12-8E5F-75C5351D6308}.Release|Any CPU.Build.0 = Release|Any CPU {C423C061-64F7-4C12-8E5F-75C5351D6308}.Release|x64.ActiveCfg = Release|Any CPU {C423C061-64F7-4C12-8E5F-75C5351D6308}.Release|x64.Build.0 = Release|Any CPU + {149173F5-D0CE-4FEC-A040-DE472707D6B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {149173F5-D0CE-4FEC-A040-DE472707D6B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {149173F5-D0CE-4FEC-A040-DE472707D6B2}.Debug|x64.ActiveCfg = Debug|Any CPU + {149173F5-D0CE-4FEC-A040-DE472707D6B2}.Debug|x64.Build.0 = Debug|Any CPU + {149173F5-D0CE-4FEC-A040-DE472707D6B2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {149173F5-D0CE-4FEC-A040-DE472707D6B2}.Release|Any CPU.Build.0 = Release|Any CPU + {149173F5-D0CE-4FEC-A040-DE472707D6B2}.Release|x64.ActiveCfg = Release|Any CPU + {149173F5-D0CE-4FEC-A040-DE472707D6B2}.Release|x64.Build.0 = Release|Any CPU + {BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Debug|x64.ActiveCfg = Debug|Any CPU + {BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Debug|x64.Build.0 = Debug|Any CPU + {BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Release|Any CPU.Build.0 = Release|Any CPU + {BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Release|x64.ActiveCfg = Release|Any CPU + {BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -165,6 +183,7 @@ Global {7048DEEA-0A6F-46A0-B951-B682A8F1CB75} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} {C423C061-64F7-4C12-8E5F-75C5351D6308} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} {8CEFC324-CA6C-4845-9AD9-70B92BD87057} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} + {BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4664C5E3-0340-4E22-BCFD-98AAEDF5F2DC} diff --git a/Directory.Build.targets b/Directory.Build.targets deleted file mode 100644 index f8a7e174..00000000 --- a/Directory.Build.targets +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ComputeSharp.Core/ComputeSharp.Core.csproj b/src/ComputeSharp.Core/ComputeSharp.Core.csproj index 17666dbb..85cab145 100644 --- a/src/ComputeSharp.Core/ComputeSharp.Core.csproj +++ b/src/ComputeSharp.Core/ComputeSharp.Core.csproj @@ -3,26 +3,11 @@ netstandard2.0;net5.0 true - 9.0 - - - - - - false - true - - false + 9.0 - - - diff --git a/src/ComputeSharp/ComputeSharp.csproj b/src/ComputeSharp/ComputeSharp.csproj index 3954a5b5..9d310d55 100644 --- a/src/ComputeSharp/ComputeSharp.csproj +++ b/src/ComputeSharp/ComputeSharp.csproj @@ -3,11 +3,7 @@ net5.0 9.0 - true - - - - lib\$(TargetFramework) + true diff --git a/tests/ComputeSharp.Tests.Internals.SourceGenerators/ComputeSharp.Tests.Internals.SourceGenerators.csproj b/tests/ComputeSharp.Tests.Internals.SourceGenerators/ComputeSharp.Tests.Internals.SourceGenerators.csproj new file mode 100644 index 00000000..b0e8280b --- /dev/null +++ b/tests/ComputeSharp.Tests.Internals.SourceGenerators/ComputeSharp.Tests.Internals.SourceGenerators.csproj @@ -0,0 +1,19 @@ + + + + net5.0 + false + + + + + + + + + + + + + + diff --git a/tests/ComputeSharp.Tests.Internals/SourceGeneratorTests.cs b/tests/ComputeSharp.Tests.Internals.SourceGenerators/SourceGeneratorTests.cs similarity index 100% rename from tests/ComputeSharp.Tests.Internals/SourceGeneratorTests.cs rename to tests/ComputeSharp.Tests.Internals.SourceGenerators/SourceGeneratorTests.cs diff --git a/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj b/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj index 3515164a..5fd0b827 100644 --- a/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj +++ b/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj @@ -9,11 +9,9 @@ - -