mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
- 修复 UnifiedSettingsFile 与 UnifiedSettingsDataRepository 的 comparer 契约,在无法恢复原比较器时显式回退到 StringComparer.Ordinal - 统一 AutoRegisterExportedCollectionsGeneratorTests 中剩余的 RunAsync 异步等待写法,并补齐 ConfigureAwait(false) - 更新 analyzer-warning-reduction 跟踪文档,记录 PR follow-up 的验证结果与恢复点
7.3 KiB
7.3 KiB
Analyzer Warning Reduction 追踪
Analyzer Warning Reduction 追踪
2026-04-24 — RP-052
阶段:PR review follow-up(comparer 契约 + ConfigureAwait(false) 收尾)
- 触发背景:
- 当前分支 PR #283 的最新 review 中,
greptile-apps[bot]仍有一个未解决线程,指出UnifiedSettingsDataRepository.CloneFilefallback 会静默丢失原 comparer - CodeRabbit 另指出
AutoRegisterExportedCollectionsGeneratorTests.cs中还残留 5 处await test.RunAsync();,与同项目其他测试文件的.ConfigureAwait(false)风格不一致
- 当前分支 PR #283 的最新 review 中,
- 主线程实施:
- 复核 PR review JSON、
UnifiedSettingsDataRepository.cs、UnifiedSettingsFile.cs与AutoRegisterExportedCollectionsGeneratorTests.cs的当前代码,确认只有 comparer 契约线程仍属最新 head 上的实质问题 - 将
UnifiedSettingsFile.Sections的 XML 注释补充为显式 comparer 契约,并把默认字典初始化改为StringComparer.Ordinal - 将
CloneFilefallback 从隐式默认 comparer 改为显式StringComparer.Ordinal,并同步修正文档注释,避免继续暗含“保留原语义”的错误表述 - 把
AutoRegisterExportedCollectionsGeneratorTests中剩余的 5 处await test.RunAsync();统一为.ConfigureAwait(false),同时让VerifyDiagnosticsAsync内部也消费ConfigureAwait(false)
- 复核 PR review JSON、
- 验证里程碑:
dotnet build GFramework.Game/GFramework.Game.csproj -c Release- 结果:成功;
533 Warning(s)、0 Error(s);GFramework.Game仍有既有 warning 基线,本轮 follow-up 仅处理 PR review 指向的 comparer 契约与测试异步等待一致性
- 结果:成功;
dotnet build GFramework.Godot.SourceGenerators.Tests/GFramework.Godot.SourceGenerators.Tests.csproj -c Release- 结果:成功;
0 Warning(s)、0 Error(s)
- 结果:成功;
dotnet test GFramework.Godot.SourceGenerators.Tests/GFramework.Godot.SourceGenerators.Tests.csproj -c Release --no-build- 首次并行复验:失败;
FileNotFoundException,原因是--no-build测试在 Release DLL 落盘前启动 - 串行复验:成功;
Passed: 48、Failed: 0
- 首次并行复验:失败;
- 当前结论:
- PR #283 当前仍打开的 comparer review thread 已在本地代码与 XML 注释层面得到对应修复
AutoRegisterExportedCollectionsGeneratorTests的异步等待风格已与同项目其他测试保持一致- 当前改动已通过直接受影响测试项目的 Release build 与串行 Release test 复验,可进入提交阶段
2026-04-24 — RP-051
阶段:GFramework.Godot.SourceGenerators.Tests warning 清零
- 触发背景:
- 用户要求直接运行
dotnet clean,不再添加额外 shell 包装;solution-leveldotnet clean仍然在ValidateSolutionConfiguration阶段失败 - 直接执行仓库根目录
dotnet build成功,并输出1184 warning(s),说明当前真实热点已从GFramework.Godot.SourceGenerators转移到对应测试项目
- 用户要求直接运行
- 主线程实施:
- 以
GFramework.Godot.SourceGenerators.Tests为独立批次,先确认该项目本地基线为24 warning(s) - 在
BindNodeSignalGeneratorTests.cs、AutoSceneGeneratorTests.cs、AutoUiPageGeneratorTests.cs、GetNodeGeneratorTests.cs、AutoRegisterExportedCollectionsGeneratorTests.cs、GodotProjectMetadataGeneratorTests.cs中抽取共享 source / diagnostic helper,压缩重复长方法 - 在
Core/GeneratorTest.cs中补充ConfigureAwait(false),清除项目内唯一MA0004 - 把
GFramework.Godot.SourceGenerators.Tests项目 warning 从24降到0
- 以
- 验证里程碑:
dotnet build- 结果:成功;
1184 Warning(s)、0 Error(s)
- 结果:成功;
dotnet build GFramework.Godot.SourceGenerators.Tests/GFramework.Godot.SourceGenerators.Tests.csproj- 初始结果:成功;
24 Warning(s)、0 Error(s) - 第一批(
BindNodeSignal+GeneratorTest)后:16 Warning(s) - 第二批(
AutoScene/AutoUiPage/GetNode)后:8 Warning(s) - 第三批(
Registration/Project)后:1 Warning(s) - 收尾修复后:成功;
0 Warning(s)、0 Error(s)
- 初始结果:成功;
dotnet build GFramework.Godot.SourceGenerators.Tests/GFramework.Godot.SourceGenerators.Tests.csproj -c Release- 结果:成功;
0 Warning(s)、0 Error(s)
- 结果:成功;
dotnet test GFramework.Godot.SourceGenerators.Tests/GFramework.Godot.SourceGenerators.Tests.csproj -c Release --no-build- 结果:成功;
Passed: 48、Failed: 0
- 结果:成功;
- 当前结论:
GFramework.Godot.SourceGenerators.Tests已在Debug/Release构建下达到0 warning(s)- 按
origin/mainmerge-base 计算并只纳入当前暂存批次时,累计分支 diff 为23个文件,低于$gframework-batch-boot 75的主停止阈值 - 仓库根目录
dotnet clean仍无法稳定产出新的 clean 基线,需要在下一轮单独排查 - 当前 worktree 已有与本批次无关的既有改动;提交时必须只暂存 analyzer warning reduction 相关文件
2026-04-24 — RP-050
阶段:clean-build 基线修正与 GFramework.Godot.SourceGenerators 切片清零
- 触发背景:
- 用户确认之前的
0 Warning(s)来自增量构建假阴性;只有先dotnet clean再dotnet build,warning 才会重新出现 - 用户给出 clean solution build 的真实结果:
Build succeeded with 1193 warning(s)
- 用户确认之前的
- 主线程实施:
- 纠正当前 topic 的 active todo / trace,把 clean build 作为新的 warning 检查真值
- 在
BindNodeSignalGenerator.cs、GetNodeGenerator.cs、GodotProjectMetadataGenerator.cs中完成分阶段方法抽取与字符串比较修正 - 在
Registration/AutoRegisterExportedCollectionsGenerator.cs中拆分TryCreateRegistration,清除最后一个MA0051 - 更新
AGENTS.md,明确 warning 检查必须先dotnet clean再dotnet build
- 验证里程碑:
dotnet clean GFramework.Godot.SourceGenerators/GFramework.Godot.SourceGenerators.csproj -c Release- 结果:成功;
0 Warning(s)、0 Error(s)
- 结果:成功;
dotnet build GFramework.Godot.SourceGenerators/GFramework.Godot.SourceGenerators.csproj -c Release- 首次验证:成功;
1 Warning(s),剩余Registration/AutoRegisterExportedCollectionsGenerator.cs(182,25)MA0051 - 修复后复验:成功;
0 Warning(s)、0 Error(s)
- 首次验证:成功;
- 当前结论:
GFramework.Godot.SourceGenerators已在 cleanReleasebuild 下从 9 个 warning 降到 0 个 warning- 整仓库 warning 基线仍以用户确认的 clean solution build
1193 warning(s)为准 - 下一轮应继续从 clean solution build 输出中选择新的低风险热点
Archive Context
- 当前轮次归档:
- 历史跟踪归档:
- 历史 trace 归档: