From 0110d97b17710e7fb991d8dca808a0bb425bef76 Mon Sep 17 00:00:00 2001 From: Ivan Murashka Date: Sat, 6 Sep 2025 11:52:11 +0200 Subject: [PATCH 1/3] remove attributes generation --- .../Appegy.Union.Generator.Shapes.csproj | 9 ++++ ....Union.Generator.Shapes.csproj.DotSettings | 1 + .../Shapes/Attributes/ExposeAttribute.cs | 15 +++++++ .../Shapes/Attributes/UnionAttribute.cs | 15 +++++++ .../Attributes/AttributesNames.cs | 1 + .../Attributes/AttributesSource.cs | 41 ------------------ .../Expose/ExposeAttributeGenerator.cs | 3 -- .../Union/Parts/UnionDeclarationPart.cs | 2 +- .../Union/UnionAttributeGenerator.cs | 3 -- Runtime/Appegy.Union.Generator.dll | 4 +- Runtime/Appegy.Union.Generator.pdb | Bin 27136 -> 26952 bytes Runtime/ExposeAttribute.cs | 15 +++++++ Runtime/ExposeAttribute.cs.meta | 3 ++ Runtime/UnionAttribute.cs | 15 +++++++ Runtime/UnionAttribute.cs.meta | 3 ++ 15 files changed, 80 insertions(+), 50 deletions(-) create mode 100644 Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Shapes/Attributes/ExposeAttribute.cs create mode 100644 Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Shapes/Attributes/UnionAttribute.cs delete mode 100644 Appegy.Union.Generator~/Appegy.Union.Generator/Attributes/AttributesSource.cs create mode 100644 Runtime/ExposeAttribute.cs create mode 100644 Runtime/ExposeAttribute.cs.meta create mode 100644 Runtime/UnionAttribute.cs create mode 100644 Runtime/UnionAttribute.cs.meta diff --git a/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj b/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj index 3a2b88a..98abc1a 100644 --- a/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj +++ b/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj @@ -10,4 +10,13 @@ + + + Union\Runtime\ExposeAttribute.cs + + + Union\Runtime\UnionAttribute.cs + + + diff --git a/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj.DotSettings b/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj.DotSettings index 671cf2a..983a9ab 100644 --- a/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj.DotSettings +++ b/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj.DotSettings @@ -1,4 +1,5 @@  True True + True True \ No newline at end of file diff --git a/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Shapes/Attributes/ExposeAttribute.cs b/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Shapes/Attributes/ExposeAttribute.cs new file mode 100644 index 0000000..796324a --- /dev/null +++ b/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Shapes/Attributes/ExposeAttribute.cs @@ -0,0 +1,15 @@ +using System; + +namespace Appegy.Union +{ + [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + public class ExposeAttribute : Attribute + { + public Type[] Interfaces { get; } + + public ExposeAttribute(params Type[] interfaces) + { + Interfaces = interfaces; + } + } +} \ No newline at end of file diff --git a/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Shapes/Attributes/UnionAttribute.cs b/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Shapes/Attributes/UnionAttribute.cs new file mode 100644 index 0000000..50c1eba --- /dev/null +++ b/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Shapes/Attributes/UnionAttribute.cs @@ -0,0 +1,15 @@ +using System; + +namespace Appegy.Union +{ + [AttributeUsage(System.AttributeTargets.Struct | AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + public class UnionAttribute : System.Attribute + { + public System.Type[] Types { get; } + + public UnionAttribute(params System.Type[] types) + { + Types = types; + } + } +} \ No newline at end of file diff --git a/Appegy.Union.Generator~/Appegy.Union.Generator/Attributes/AttributesNames.cs b/Appegy.Union.Generator~/Appegy.Union.Generator/Attributes/AttributesNames.cs index dbb280f..947bf44 100644 --- a/Appegy.Union.Generator~/Appegy.Union.Generator/Attributes/AttributesNames.cs +++ b/Appegy.Union.Generator~/Appegy.Union.Generator/Attributes/AttributesNames.cs @@ -2,6 +2,7 @@ public static class AttributesNames { + public static readonly string GeneratedCodeAttribute = $@"[global::System.CodeDom.Compiler.GeneratedCodeAttribute(""Appegy.Union"", ""{typeof(AttributesNames).Assembly.GetName().Version}"")]"; public const string UnionAttributeName = "Appegy.Union.UnionAttribute"; public const string ExposeAttributeName = "Appegy.Union.ExposeAttribute"; } \ No newline at end of file diff --git a/Appegy.Union.Generator~/Appegy.Union.Generator/Attributes/AttributesSource.cs b/Appegy.Union.Generator~/Appegy.Union.Generator/Attributes/AttributesSource.cs deleted file mode 100644 index b39dfcf..0000000 --- a/Appegy.Union.Generator~/Appegy.Union.Generator/Attributes/AttributesSource.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; - -namespace Appegy.Union.Generator; - -public static class AttributesSource -{ - public static readonly string GeneratedCodeAttribute = $@"[global::System.CodeDom.Compiler.GeneratedCodeAttribute(""Appegy.Union"", ""{typeof(AttributesNames).Assembly.GetName().Version}"")]"; - public static readonly string UnionAttribute = @$"// - -namespace Appegy.Union -{{ - {GeneratedCodeAttribute} - [global::System.AttributeUsageAttribute(global::System.AttributeTargets.Struct, AllowMultiple = false, Inherited = false)] - internal class UnionAttribute : global::System.Attribute - {{ - public global::System.Type[] Types {{ get; }} - - public UnionAttribute(params global::System.Type[] types) - {{ - Types = types; - }} - }} -}}"; - - public static readonly string ExposeAttribute = @$"// - -namespace Appegy.Union -{{ - {GeneratedCodeAttribute} - [global::System.AttributeUsageAttribute(global::System.AttributeTargets.Struct, AllowMultiple = false, Inherited = false)] - internal class ExposeAttribute : global::System.Attribute - {{ - public global::System.Type[] Interfaces {{ get; }} - - public ExposeAttribute(params global::System.Type[] interfaces) - {{ - Interfaces = interfaces; - }} - }} -}}"; -} \ No newline at end of file diff --git a/Appegy.Union.Generator~/Appegy.Union.Generator/Expose/ExposeAttributeGenerator.cs b/Appegy.Union.Generator~/Appegy.Union.Generator/Expose/ExposeAttributeGenerator.cs index fa536a2..9693b3c 100644 --- a/Appegy.Union.Generator~/Appegy.Union.Generator/Expose/ExposeAttributeGenerator.cs +++ b/Appegy.Union.Generator~/Appegy.Union.Generator/Expose/ExposeAttributeGenerator.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; -using static Appegy.Union.Generator.AttributesSource; using static Appegy.Union.Generator.AttributesNames; namespace Appegy.Union.Generator; @@ -33,8 +32,6 @@ public class ExposeAttributeGenerator : IIncrementalGenerator public void Initialize(IncrementalGeneratorInitializationContext context) { - context.RegisterPostInitializationOutput(c => c.AddSource("ExposeAttribute.g.cs", ExposeAttribute)); - var exposeSources = context .SyntaxProvider .ForAttributeWithMetadataName( diff --git a/Appegy.Union.Generator~/Appegy.Union.Generator/Union/Parts/UnionDeclarationPart.cs b/Appegy.Union.Generator~/Appegy.Union.Generator/Union/Parts/UnionDeclarationPart.cs index e210117..e22ad2e 100644 --- a/Appegy.Union.Generator~/Appegy.Union.Generator/Union/Parts/UnionDeclarationPart.cs +++ b/Appegy.Union.Generator~/Appegy.Union.Generator/Union/Parts/UnionDeclarationPart.cs @@ -8,7 +8,7 @@ public override void Generate(IndentedTextWriter codeWriter, UnionAttributePartI { var (syntax, types) = input; - codeWriter.WriteLine(AttributesSource.GeneratedCodeAttribute); + codeWriter.WriteLine(AttributesNames.GeneratedCodeAttribute); codeWriter.WriteLine("[global::System.Runtime.InteropServices.StructLayout(global::System.Runtime.InteropServices.LayoutKind.Explicit, Pack = 1)]"); codeWriter.Write("partial struct "); codeWriter.WriteLine(syntax.Identifier.Text); diff --git a/Appegy.Union.Generator~/Appegy.Union.Generator/Union/UnionAttributeGenerator.cs b/Appegy.Union.Generator~/Appegy.Union.Generator/Union/UnionAttributeGenerator.cs index cb20c0b..9700817 100644 --- a/Appegy.Union.Generator~/Appegy.Union.Generator/Union/UnionAttributeGenerator.cs +++ b/Appegy.Union.Generator~/Appegy.Union.Generator/Union/UnionAttributeGenerator.cs @@ -8,7 +8,6 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; -using static Appegy.Union.Generator.AttributesSource; using static Appegy.Union.Generator.AttributesNames; namespace Appegy.Union.Generator; @@ -37,8 +36,6 @@ public class UnionAttributeGenerator : IIncrementalGenerator public void Initialize(IncrementalGeneratorInitializationContext context) { - context.RegisterPostInitializationOutput(c => c.AddSource("UnionAttribute.g.cs", UnionAttribute)); - var sources = context .SyntaxProvider .ForAttributeWithMetadataName( diff --git a/Runtime/Appegy.Union.Generator.dll b/Runtime/Appegy.Union.Generator.dll index 07b9fd4..2f522f7 100644 --- a/Runtime/Appegy.Union.Generator.dll +++ b/Runtime/Appegy.Union.Generator.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da7c87d3ee08c9d52eece931e67a2ee36172d955a7d5a3eada557d729ba791e0 -size 57344 +oid sha256:d1141df8050ec5086c10e75ac2e0047630095079b1707cbe1e61f6500574e597 +size 55296 diff --git a/Runtime/Appegy.Union.Generator.pdb b/Runtime/Appegy.Union.Generator.pdb index 0d9df865685cf629eaabf3073cecbd12dd5025a2..a10f83c5e6099ecfdce22ef0e4ff221f08ec0bdf 100644 GIT binary patch delta 3639 zcmY+G2~?C-AIAUpoq?HQ7XjIsK^EDE9YJ7Z8$d(@Gz67JNL)Y^OpR)W9YG7cMjEMP z+rbW>7;1}H-*tzJ`# z9Al>a>y!P?+Jo<&F5Fd~vU|-+RX3XHQIEam3U?x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ribute.cs b/Runtime/ExposeAttribute.cs new file mode 100644 index 0000000..796324a --- /dev/null +++ b/Runtime/ExposeAttribute.cs @@ -0,0 +1,15 @@ +using System; + +namespace Appegy.Union +{ + [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + public class ExposeAttribute : Attribute + { + public Type[] Interfaces { get; } + + public ExposeAttribute(params Type[] interfaces) + { + Interfaces = interfaces; + } + } +} \ No newline at end of file diff --git a/Runtime/ExposeAttribute.cs.meta b/Runtime/ExposeAttribute.cs.meta new file mode 100644 index 0000000..d66b382 --- /dev/null +++ b/Runtime/ExposeAttribute.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0bfc42e7906e4a038511fdc42c16c03d +timeCreated: 1757151831 \ No newline at end of file diff --git a/Runtime/UnionAttribute.cs b/Runtime/UnionAttribute.cs new file mode 100644 index 0000000..50c1eba --- /dev/null +++ b/Runtime/UnionAttribute.cs @@ -0,0 +1,15 @@ +using System; + +namespace Appegy.Union +{ + [AttributeUsage(System.AttributeTargets.Struct | AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + public class UnionAttribute : System.Attribute + { + public System.Type[] Types { get; } + + public UnionAttribute(params System.Type[] types) + { + Types = types; + } + } +} \ No newline at end of file diff --git a/Runtime/UnionAttribute.cs.meta b/Runtime/UnionAttribute.cs.meta new file mode 100644 index 0000000..35344cc --- /dev/null +++ b/Runtime/UnionAttribute.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8a98605af9f4463bbf17236631cf737b +timeCreated: 1757151816 \ No newline at end of file From fb7f33d545a8b2c5d75a906e7ce57e0d6aeef78a Mon Sep 17 00:00:00 2001 From: Ivan Murashka Date: Sat, 6 Sep 2025 12:13:37 +0200 Subject: [PATCH 2/3] cleanup attributes declaration --- Runtime/Appegy.Union.asmdef | 14 ++++++++++++++ Runtime/Appegy.Union.asmdef.meta | 3 +++ Runtime/ExposeAttribute.cs | 2 +- Runtime/UnionAttribute.cs | 8 ++++---- 4 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 Runtime/Appegy.Union.asmdef create mode 100644 Runtime/Appegy.Union.asmdef.meta diff --git a/Runtime/Appegy.Union.asmdef b/Runtime/Appegy.Union.asmdef new file mode 100644 index 0000000..8fa76df --- /dev/null +++ b/Runtime/Appegy.Union.asmdef @@ -0,0 +1,14 @@ +{ + "name": "Appegy.Union", + "rootNamespace": "Appegy.Union", + "references": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Runtime/Appegy.Union.asmdef.meta b/Runtime/Appegy.Union.asmdef.meta new file mode 100644 index 0000000..7f25036 --- /dev/null +++ b/Runtime/Appegy.Union.asmdef.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0c0693a7b4264386a6dfa0ea92c11448 +timeCreated: 1757152490 \ No newline at end of file diff --git a/Runtime/ExposeAttribute.cs b/Runtime/ExposeAttribute.cs index 796324a..e84d18c 100644 --- a/Runtime/ExposeAttribute.cs +++ b/Runtime/ExposeAttribute.cs @@ -2,7 +2,7 @@ namespace Appegy.Union { - [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + [AttributeUsage(AttributeTargets.Struct)] public class ExposeAttribute : Attribute { public Type[] Interfaces { get; } diff --git a/Runtime/UnionAttribute.cs b/Runtime/UnionAttribute.cs index 50c1eba..e7df7b1 100644 --- a/Runtime/UnionAttribute.cs +++ b/Runtime/UnionAttribute.cs @@ -2,12 +2,12 @@ namespace Appegy.Union { - [AttributeUsage(System.AttributeTargets.Struct | AttributeTargets.Class, AllowMultiple = false, Inherited = false)] - public class UnionAttribute : System.Attribute + [AttributeUsage(AttributeTargets.Struct)] + public class UnionAttribute : Attribute { - public System.Type[] Types { get; } + public Type[] Types { get; } - public UnionAttribute(params System.Type[] types) + public UnionAttribute(params Type[] types) { Types = types; } From 59950861203a8ccc903cdafaf88e1ba2f6ff59c1 Mon Sep 17 00:00:00 2001 From: Ivan Murashka Date: Sat, 6 Sep 2025 12:18:46 +0200 Subject: [PATCH 3/3] fix shapes project --- .../Appegy.Union.Generator.Shapes.csproj | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj b/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj index 98abc1a..7c61d08 100644 --- a/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj +++ b/Appegy.Union.Generator~/Appegy.Union.Generator.Shapes/Appegy.Union.Generator.Shapes.csproj @@ -11,12 +11,6 @@ - - Union\Runtime\ExposeAttribute.cs - - - Union\Runtime\UnionAttribute.cs -