From 954f653cf63cc35cea237df36b2d49a56f07c8fe Mon Sep 17 00:00:00 2001 From: FaustVX Date: Sat, 25 Nov 2023 20:35:24 +0100 Subject: [PATCH] Trying to include `Diagnostics` in `Sg` and `CodeFix` (`ConsoleApp1` don't compile) --- ConsoleApp1/ConsoleApp1.csproj | 1 + ...eAttribute.g.cs => DoNotUseAttribute.g.cs} | 2 +- .../FaustVX.PrimaryParameter.SG.g.cs | 59 ------------------- .../PrimaryParameter.CodeFix.csproj | 5 +- .../PrimaryParameter.SG.csproj | 5 +- .../PrimaryParameter.Tests.csproj | 3 +- 6 files changed, 10 insertions(+), 65 deletions(-) rename ConsoleApp1/Generated/PrimaryParameter.SG/PrimaryParameter.SG.Generator/{DontUseAttribute.g.cs => DoNotUseAttribute.g.cs} (83%) delete mode 100644 ConsoleApp1/Generated/PrimaryParameter.SG/PrimaryParameter.SG.Generator/FaustVX.PrimaryParameter.SG.g.cs diff --git a/ConsoleApp1/ConsoleApp1.csproj b/ConsoleApp1/ConsoleApp1.csproj index 43ad209..a4b6a82 100644 --- a/ConsoleApp1/ConsoleApp1.csproj +++ b/ConsoleApp1/ConsoleApp1.csproj @@ -21,6 +21,7 @@ + diff --git a/ConsoleApp1/Generated/PrimaryParameter.SG/PrimaryParameter.SG.Generator/DontUseAttribute.g.cs b/ConsoleApp1/Generated/PrimaryParameter.SG/PrimaryParameter.SG.Generator/DoNotUseAttribute.g.cs similarity index 83% rename from ConsoleApp1/Generated/PrimaryParameter.SG/PrimaryParameter.SG.Generator/DontUseAttribute.g.cs rename to ConsoleApp1/Generated/PrimaryParameter.SG/PrimaryParameter.SG.Generator/DoNotUseAttribute.g.cs index d2a1a03..868120c 100644 --- a/ConsoleApp1/Generated/PrimaryParameter.SG/PrimaryParameter.SG.Generator/DontUseAttribute.g.cs +++ b/ConsoleApp1/Generated/PrimaryParameter.SG/PrimaryParameter.SG.Generator/DoNotUseAttribute.g.cs @@ -3,7 +3,7 @@ namespace PrimaryParameter.SG { [AttributeUsage(AttributeTargets.Parameter, Inherited = false, AllowMultiple = false)] - sealed class DontUseAttribute : Attribute + sealed class DoNotUseAttribute : Attribute { public bool AllowInMemberInit { get; init; } } diff --git a/ConsoleApp1/Generated/PrimaryParameter.SG/PrimaryParameter.SG.Generator/FaustVX.PrimaryParameter.SG.g.cs b/ConsoleApp1/Generated/PrimaryParameter.SG/PrimaryParameter.SG.Generator/FaustVX.PrimaryParameter.SG.g.cs deleted file mode 100644 index 4b6b03f..0000000 --- a/ConsoleApp1/Generated/PrimaryParameter.SG/PrimaryParameter.SG.Generator/FaustVX.PrimaryParameter.SG.g.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -namespace ConsoleApp1 -{ - partial class C - { - private string _a = i.ToString(); - public int B = i; - private readonly int _i = i; - } -} -// -namespace ConsoleApp1 -{ - partial class C - { - public string S { get; init; } = s.Trim(); - private readonly string s = s; - } -} -// -namespace ConsoleApp1 -{ - partial record struct R - { - partial class C - { - private readonly T _s = s; - } - } -} -// -namespace ConsoleApp1 -{ - partial struct Ref - { - private readonly ref int Abc = ref i; - } -} -// -namespace ConsoleApp1 -{ - partial struct Ref - { - private readonly int _a = a; - } -} -// -namespace ConsoleApp1 -{ - partial class ParamNameOf - { - private readonly int Day = dateTime.Day; - } -} -// -partial struct C -{ - private readonly int _i = i; -} diff --git a/PrimaryParameter.CodeFix/PrimaryParameter.CodeFix.csproj b/PrimaryParameter.CodeFix/PrimaryParameter.CodeFix.csproj index ebfdeb3..456e080 100644 --- a/PrimaryParameter.CodeFix/PrimaryParameter.CodeFix.csproj +++ b/PrimaryParameter.CodeFix/PrimaryParameter.CodeFix.csproj @@ -16,19 +16,20 @@ - + + FaustVX.PrimaryParameter.CodeFix - 1.0.0 + 1.0.0-beta1 FaustVX https://github.com/FaustVX/PrimaryParameter git diff --git a/PrimaryParameter.SG/PrimaryParameter.SG.csproj b/PrimaryParameter.SG/PrimaryParameter.SG.csproj index 14476b5..852a45c 100644 --- a/PrimaryParameter.SG/PrimaryParameter.SG.csproj +++ b/PrimaryParameter.SG/PrimaryParameter.SG.csproj @@ -16,12 +16,13 @@ - + + @@ -30,7 +31,7 @@ FaustVX.PrimaryParameter.SG - 1.3.2 + 2.0.0-beta1 FaustVX https://github.com/FaustVX/PrimaryParameter git diff --git a/PrimaryParameter.Tests/PrimaryParameter.Tests.csproj b/PrimaryParameter.Tests/PrimaryParameter.Tests.csproj index ff5d3b2..72b2cf3 100644 --- a/PrimaryParameter.Tests/PrimaryParameter.Tests.csproj +++ b/PrimaryParameter.Tests/PrimaryParameter.Tests.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -35,6 +35,7 @@ +