refactor(generators): 将源代码生成器项目目标框架降级至 netstandard2.0#126
Conversation
- 将 GFramework.Godot.SourceGenerators 项目的目标框架从 netstandard2.1 更改为 netstandard2.0 - 将 GFramework.SourceGenerators.Abstractions 项目的目标框架从 netstandard2.1 更改为 netstandard2.0 - 将 GFramework.SourceGenerators 项目的目标框架从 netstandard2.1 更改为 netstandard2.0 - 将 GFramework.SourceGenerators.Common 项目的目标框架从 netstandard2.1 更改为 netstandard2.0 - 从 GFramework.SourceGenerators 项目中移除对 GFramework.Core.Abstractions 的引用 - 从 GFramework.SourceGenerators.Abstractions 项目中移除对 GFramework.Core.Abstractions 的引用 - 更新 PriorityGenerator 中的语法检查逻辑,使用 Any 替代 All 进行 partial 关键字检查 - 更新 PriorityAttribute 文档注释中的 cref 格式为 c 标签
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| C# | Mar 21, 2026 1:32p.m. | Review ↗ | |
| Secrets | Mar 21, 2026 1:32p.m. | Review ↗ |
审阅者指南(在较小 PR 上折叠)审阅者指南重构源生成器项目,使其以 netstandard2.0 为目标以获得更广泛的兼容性;移除不必要的 Core.Abstractions 引用;调整 PriorityGenerator 中的 更新后的 PriorityGenerator 和 PriorityAttribute(类)的类图classDiagram
class PriorityAttribute {
+PriorityAttribute()
<<attribute>>
+int Priority
}
class PriorityGenerator {
+bool ValidateSymbol(context, syntax, typeSymbol)
}
class IPrioritized {
<<interface>>
+int Priority
}
PriorityAttribute ..> IPrioritized : documents_generated_impl_for
PriorityGenerator ..> PriorityAttribute : validates_usage_of
按文件划分的变更
技巧和命令与 Sourcery 交互
自定义你的使用体验前往你的 控制面板 以:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors the source generator projects to target netstandard2.0 for broader compatibility, removes unnecessary Core.Abstractions references, adjusts the partial keyword validation logic in PriorityGenerator, and updates XML documentation formatting for PriorityAttribute. Class diagram for updated PriorityGenerator and PriorityAttribute (class)classDiagram
class PriorityAttribute {
+PriorityAttribute()
<<attribute>>
+int Priority
}
class PriorityGenerator {
+bool ValidateSymbol(context, syntax, typeSymbol)
}
class IPrioritized {
<<interface>>
+int Priority
}
PriorityAttribute ..> IPrioritized : documents_generated_impl_for
PriorityGenerator ..> PriorityAttribute : validates_usage_of
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我已经审核了你的更改,一切看起来都很棒!
帮我变得更有用吧!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续的代码审查。
Original comment in English
Hey - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
- 为 GFramework.Godot 项目添加 GodotProjectDir 属性默认值 - 在 GFramework 元包中添加 NoPackageAnalysis 属性配置 - 为不同 .NET 版本添加占位符文件到包输出中 - 确保源代码生成器在标准 SDK 构建中正常运行
- 将语法节点的部分关键字检查从 Any 操作改为 All 操作 - 修正了对非部分类的诊断报告条件判断 - 确保只有当所有修饰符都不是部分关键字时才报告错误
Summary by Sourcery
将源代码生成器项目降级到 .NET Standard 2.0,并调整相关引用和优先级处理逻辑。
增强内容:
partial关键字检查更新为基于存在性的条件,放宽PriorityGenerator中的语法验证。PriorityAttribute的 XML 文档中的cref用法替换为代码格式引用,以使说明更清晰。构建:
netstandard2.1更改为netstandard2.0。GFramework.Core.Abstractions的项目引用,以与降级后的目标框架保持一致。Original summary in English
Summary by Sourcery
Downgrade source generator projects to .NET Standard 2.0 and adjust related references and priority handling logic.
Enhancements:
Build: