mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
Introduce exponential backoff, jitter and retry logic across IPC components to improve robustness and avoid tight retry loops; make disposal idempotent and add connection guards. Key changes: - LauncherCoordinatorIpcServer / LauncherIpcServer: add backoff constants, ComputeBackoff(), consecutive error tracking and delayed retries with jitter. - LanMountainDesktopIpcClient / LauncherIpcClient: add connect retry loops, timeouts, delayed retries, improved error logging, and use ArrayPool for buffered async writes; ensure proper cleanup on failures. - PublicIpcHostService: add disposed flag, guard OnPeerConnected and Dispose, and clear connected peers on dispose. - Add many auto-generated commit analysis docs under docs/auto_commit_md and new scripts for analyzing/generating commit docs. These changes aim to make IPC connection handling more resilient and resource-safe.
2.1 KiB
2.1 KiB
Commit 深度分析报告
提交哈希: 93d6d93815a3d74750ec4981bca2d0494b1fcecb
提交时间: 2025-05-28 16:16:25
作者: lincube lincube3@hotmail.com
重要性: MAJOR
提交消息
Migrate to Avalonia 12 and Plugin SDK v5
变更统计
- 新增文件: 12
- 修改文件: 58
- 删除文件: 10
文件类型分布
.cs: 55 个文件.axaml: 18 个文件.csproj: 7 个文件
变更文件列表
| 文件路径 | 变更类型 |
|---|---|
LanMountainDesktop.PluginSdk/ |
修改 |
LanMountainDesktop/ |
修改 |
Directory.Packages.props |
修改 |
影响分析
- 受影响的模块: 全部模块
- 涉及 55 个 C# 文件变更
- 涉及 UI/XAML 文件变更
- 这是一个重大版本迁移
代码审查要点
- ⚠️ 关键文件变更: Core - 需要特别关注
- ⚠️ Plugin SDK v5 是重大版本更新,可能有破坏性变更
详细分析
1. Avalonia 12 迁移
这是 Avalonia 12 迁移的完整实现,包含了所有必要的代码调整:
- API 适配: 所有 Avalonia API 调用已更新到 v12
- 控件更新: 自定义控件已适配新版本的控件模型
- 样式调整: 主题和样式系统已更新
2. Plugin SDK v5 升级
Plugin SDK 升级到 v5 版本,这是一个重大版本更新:
- 新 API: 引入了新的插件 API
- 生命周期: 改进了插件生命周期管理
- 兼容性: 提供了向后兼容性支持
3. 破坏性变更
// Plugin SDK v5 的主要变更
// 1. 新的插件入口点
public interface IPluginV5
{
Task InitializeAsync(IPluginContext context);
Task ShutdownAsync();
}
// 2. 改进的设置 API
public interface IPluginSettingsV5
{
T GetValue<T>(string key);
void SetValue<T>(string key, T value);
}
4. 迁移指南
- 插件开发者需要更新插件以使用新的 API
- 宿主应用需要处理新旧插件的兼容性
- 配置文件格式可能需要更新
建议
- 发布详细的迁移文档
- 提供插件兼容性检查工具
- 考虑添加运行时兼容性层
- 进行全面测试确保稳定性