From 1f4e437c10774363b4b3103d18085039519db644 Mon Sep 17 00:00:00 2001 From: StarInk Date: Sun, 3 Aug 2025 22:05:38 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=F0=9F=93=A6=20Struct:=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=AD=90=E9=A1=B9=E7=9B=AE=E6=8F=90=E4=BA=A4=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KitX Loaders | 2 +- KitX Plugins | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/KitX Loaders b/KitX Loaders index edde583..eaa65f6 160000 --- a/KitX Loaders +++ b/KitX Loaders @@ -1 +1 @@ -Subproject commit edde5836555c256b7ac9c739f1a0f7b94b3a2989 +Subproject commit eaa65f683ffc8178b2c7eabe756465fa703ece70 diff --git a/KitX Plugins b/KitX Plugins index 2fd3d44..db86a46 160000 --- a/KitX Plugins +++ b/KitX Plugins @@ -1 +1 @@ -Subproject commit 2fd3d442b9b2d18f8571aec4d3de64000091c341 +Subproject commit db86a46f653294b6774fc7082005fddf411a3f53 From 07e5b193c4b1d74a9f2d62f400cd6f933d97e877 Mon Sep 17 00:00:00 2001 From: StarInk Date: Wed, 25 Feb 2026 03:47:16 +0100 Subject: [PATCH 2/8] =?UTF-8?q?=F0=9F=93=9D=20Chore(Submodules):=20Sync.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KitX Loaders | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KitX Loaders b/KitX Loaders index eaa65f6..7838974 160000 --- a/KitX Loaders +++ b/KitX Loaders @@ -1 +1 @@ -Subproject commit eaa65f683ffc8178b2c7eabe756465fa703ece70 +Subproject commit 78389746aa6a6eab8788b774047e1610a5a36532 From 0b9177663bed43653631f62d7f52067cf0cb34d9 Mon Sep 17 00:00:00 2001 From: StarInk Date: Sun, 15 Mar 2026 05:12:07 +0100 Subject: [PATCH 3/8] =?UTF-8?q?=F0=9F=93=9D=20Chore(Submodules):=20Sync.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KitX Loaders | 2 +- KitX Plugins | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/KitX Loaders b/KitX Loaders index 7838974..ea462cb 160000 --- a/KitX Loaders +++ b/KitX Loaders @@ -1 +1 @@ -Subproject commit 78389746aa6a6eab8788b774047e1610a5a36532 +Subproject commit ea462cbc61113c6c5098169d0515387b90d48329 diff --git a/KitX Plugins b/KitX Plugins index db86a46..c042a45 160000 --- a/KitX Plugins +++ b/KitX Plugins @@ -1 +1 @@ -Subproject commit db86a46f653294b6774fc7082005fddf411a3f53 +Subproject commit c042a456c5111a06d6b6ba9b9dfe9e980c5acaf5 From 1539dcbc18f13c91972fed4015eb0658296044b2 Mon Sep 17 00:00:00 2001 From: StarInk Date: Sun, 15 Mar 2026 14:28:44 +0100 Subject: [PATCH 4/8] =?UTF-8?q?=F0=9F=93=9D=20Chore(Submodules):=20Sync.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KitX Loaders | 2 +- KitX Plugins | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/KitX Loaders b/KitX Loaders index ea462cb..672031c 160000 --- a/KitX Loaders +++ b/KitX Loaders @@ -1 +1 @@ -Subproject commit ea462cbc61113c6c5098169d0515387b90d48329 +Subproject commit 672031c6043271b25b745a3f877a3225643506bd diff --git a/KitX Plugins b/KitX Plugins index c042a45..a6a77ac 160000 --- a/KitX Plugins +++ b/KitX Plugins @@ -1 +1 @@ -Subproject commit c042a456c5111a06d6b6ba9b9dfe9e980c5acaf5 +Subproject commit a6a77acf1a49b77afb8c66e1d2b66998b9abb4be From 73bfe588f821e76984059cd3d4d5df95ec0a6ef0 Mon Sep 17 00:00:00 2001 From: StarInk Date: Mon, 13 Apr 2026 02:53:56 +0200 Subject: [PATCH 5/8] =?UTF-8?q?=F0=9F=93=9D=20Chore(Submodules):=20Sync.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KitX Loaders | 2 +- KitX Plugins | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/KitX Loaders b/KitX Loaders index 672031c..1f84fb0 160000 --- a/KitX Loaders +++ b/KitX Loaders @@ -1 +1 @@ -Subproject commit 672031c6043271b25b745a3f877a3225643506bd +Subproject commit 1f84fb0b7373ed53a3d516d694cb8890feb4a09b diff --git a/KitX Plugins b/KitX Plugins index a6a77ac..a05d6d1 160000 --- a/KitX Plugins +++ b/KitX Plugins @@ -1 +1 @@ -Subproject commit a6a77acf1a49b77afb8c66e1d2b66998b9abb4be +Subproject commit a05d6d120d6102edffe7666bd836ed03e825238f From 1e5c4c92eef0ab40c68e58b2ea6ab4d359ecfee8 Mon Sep 17 00:00:00 2001 From: StarInk Date: Sun, 3 May 2026 01:14:54 +0200 Subject: [PATCH 6/8] =?UTF-8?q?=F0=9F=93=9D=20Chore(Submodules):=20Sync.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KitX Loaders | 2 +- KitX Plugins | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/KitX Loaders b/KitX Loaders index 1f84fb0..5bb1d78 160000 --- a/KitX Loaders +++ b/KitX Loaders @@ -1 +1 @@ -Subproject commit 1f84fb0b7373ed53a3d516d694cb8890feb4a09b +Subproject commit 5bb1d78ecc287b3ad986119b3aa7448da78b5616 diff --git a/KitX Plugins b/KitX Plugins index a05d6d1..80f6364 160000 --- a/KitX Plugins +++ b/KitX Plugins @@ -1 +1 @@ -Subproject commit a05d6d120d6102edffe7666bd836ed03e825238f +Subproject commit 80f636430f48d83e8c59135e0cf921c2c016299c From 17938752f7d42d1d1dde718241a88eef4cc07d1b Mon Sep 17 00:00:00 2001 From: StarInk Date: Tue, 5 May 2026 22:14:39 +0200 Subject: [PATCH 7/8] =?UTF-8?q?=F0=9F=93=9D=20Chore(Submodules):=20Sync.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KitX Plugins | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KitX Plugins b/KitX Plugins index 80f6364..7672fbc 160000 --- a/KitX Plugins +++ b/KitX Plugins @@ -1 +1 @@ -Subproject commit 80f636430f48d83e8c59135e0cf921c2c016299c +Subproject commit 7672fbc9d5e2326322ee0b97eb25f5cf32f17562 From c880c156f6086ce996ba611f9bde8572d1203951 Mon Sep 17 00:00:00 2001 From: StarInk Date: Wed, 5 Aug 2026 22:28:28 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=F0=9F=93=9D=20Chore(SDK):=20PluginFunction?= =?UTF-8?q?sGenerator=20=E5=BC=83=E7=94=A8=E5=8C=96=20=E2=80=94=20?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E7=A9=BA=20Test.json=20=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E4=B8=8E=E8=B7=AF=E5=BE=84=E6=B3=84=E9=9C=B2=E8=AF=8A=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit K-1: 生成器无消费方(插件函数信息已由 PluginInfo.Functions 提供),标记 [Obsolete] 并移除 KSDK0000/KSDK0001 诊断;子模块 Loaders/Plugins 已同步提交(清理调试输出与契约双引用)。 --- .../PluginFunctionsGenerator.cs | 96 ++----------------- KitX Loaders | 2 +- KitX Plugins | 2 +- 3 files changed, 10 insertions(+), 90 deletions(-) diff --git a/Generators/KitX.Sdk.Generators.CSharp/PluginFunctionsGenerator.cs b/Generators/KitX.Sdk.Generators.CSharp/PluginFunctionsGenerator.cs index 55bb934..78b37c8 100644 --- a/Generators/KitX.Sdk.Generators.CSharp/PluginFunctionsGenerator.cs +++ b/Generators/KitX.Sdk.Generators.CSharp/PluginFunctionsGenerator.cs @@ -1,104 +1,24 @@ using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; -using KitX.Contract.CSharp.Attributes; -using KitX.Shared.CSharp.Plugin; using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.Text; -using Newtonsoft.Json; namespace KitX.Sdk.Generators.CSharp; +/// +/// 已弃用。该生成器原计划从编译上下文中读取插件函数清单并生成 PluginFunctions.json, +/// 但当前所有消费方(加载器、客户端)均不再读取该文件,插件函数信息改由插件自身在 +/// PluginInfo.Functions 中提供。该生成器已从所有项目移除 Analyzer 引用,保留此类型 +/// 仅为避免破坏既有二进制引用。 +/// +[Obsolete("KitX.Sdk.Generators.CSharp is no longer used; plugin functions are provided by PluginInfo.Functions.")] [Generator] public class PluginFunctionsGenerator : ISourceGenerator { public void Initialize(GeneratorInitializationContext context) { - } - //public Dictionary GetTranslations(string field, IEnumerable translations) - //{ - // var result = new Dictionary(); - - // foreach (var item in translations.Where(t => t.Field.Equals(field))) - // result.Add(item.Language, item.Value); - - // return result; - //} - public void Execute(GeneratorExecutionContext context) { - var entryAttrType = typeof(EntryClassAttribute); - var funcAttrType = typeof(FunctionAttribute); - - //var functions = context.Compilation.Assembly.GetAttributes() - // .Where(x => x.AttributeClass?.GetType().Equals(entryAttrType) ?? false) - // .SelectMany(x => x.GetType().GetMethods()) - // .Where(f => f.CustomAttributes.Any( - // x => x.AttributeType.Equals(funcAttrType) - // )) - // ; - - //var result = functions.Select(func => - //{ - // var parameters = func.GetParameters().Select(param => - // { - // var paramAttr = param.GetCustomAttribute()!; - - // return new Parameter - // { - // Name = paramAttr.Name, - // DisplayNames = GetTranslations("DisplayName", param.GetCustomAttributes()), - // Type = param.ParameterType.Name, - // IsOptional = param.IsOptional, - // }; - // }); - - // var funcAttr = func.GetCustomAttribute()!; - - // return new Function - // { - // Name = funcAttr.Name, - // DisplayNames = GetTranslations("DisplayName", func.GetCustomAttributes()), - // ReturnValueType = func.ReturnType.Name, - // Parameters = parameters.ToList(), - // }; - //}); - - //var sourceText = JsonConvert.SerializeObject(result); - - //context.AddSource("PluginFunctions.json", SourceText.From(sourceText, Encoding.UTF8)); - - context.AddSource("Test.json", SourceText.From("", Encoding.UTF8)); - - context.ReportDiagnostic( - Diagnostic.Create( - new DiagnosticDescriptor( - "KSDK0001", - "Plugin Info Generated", - "PluginFunctions.json generated successfully.", - "Plugin", - DiagnosticSeverity.Info, - true - ), - Location.None) - ); - - context.ReportDiagnostic( - Diagnostic.Create( - new DiagnosticDescriptor( - "KSDK0000", - "Your location", - $"You are at {Path.GetFullPath(".")}", - "Plugin", - DiagnosticSeverity.Warning, - true - ), - Location.None) - ); + // Intentionally empty: this generator is obsolete and no longer emits source files. } } diff --git a/KitX Loaders b/KitX Loaders index 5bb1d78..fbb4b7d 160000 --- a/KitX Loaders +++ b/KitX Loaders @@ -1 +1 @@ -Subproject commit 5bb1d78ecc287b3ad986119b3aa7448da78b5616 +Subproject commit fbb4b7d59b207e980ea0b16e0184825d43f7a43f diff --git a/KitX Plugins b/KitX Plugins index 7672fbc..43ecbac 160000 --- a/KitX Plugins +++ b/KitX Plugins @@ -1 +1 @@ -Subproject commit 7672fbc9d5e2326322ee0b97eb25f5cf32f17562 +Subproject commit 43ecbacfb954ac89c831c773ee80a9b55793243a