From dcefedf2d579cef77c549e319b587f66ed8f9fc8 Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Mon, 16 Nov 2026 16:19:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(desktop):=20Core=20=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=88=B0=20main=20ad148ec=EF=BC=8C=E5=B8=A6=E4=B8=8A=20#62=20?= =?UTF-8?q?=E5=90=88=E5=85=A5=E7=89=88=E5=92=8C=20macOS=20=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B=E7=BB=84=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #2023 把 PINNED_CORE_REVISION 暂时固定到 Lithe-core-rust #62 分支上的 c0dd2a4。#62 和 #63 都已合入 Core main,这里改为 main 上的 ad148ec: - #62(b401949,内容与 c0dd2a4 相同):Unix 文件名里的 \ 和 : 是名字的 一部分,含 D:\logs 的项目树不再报错(#2009)。 - #63(ad148ec):macOS 上进程组只剩未回收的僵尸进程时 kill 返回 EPERM, 不再当成失败。停止或重启语言服务器不再误报 "Language-server process tree did not exit.",关闭 SSH 会话不再误写清理失败的 WARN(#2017)。 功能矩阵 lsp-lifecycle 的 verification 记录 #63;两端状态不变。宿主代码 没有改动。 --- scripts/desktop/build-desktop-core.sh | 11 +++++++---- .../features/lsp-lifecycle.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/desktop/build-desktop-core.sh b/scripts/desktop/build-desktop-core.sh index 86042afbe5..9b2a626ded 100755 --- a/scripts/desktop/build-desktop-core.sh +++ b/scripts/desktop/build-desktop-core.sh @@ -27,9 +27,12 @@ native_path() { fi } -# Lithe-core-rust #62, not merged yet: commit c0dd2a4 of branch fix/2009-unix-backslash-file-names, -# on top of main 6a14126. A backslash or colon in a Unix file name stays part of the name, so a -# folder named D:\logs is one level below the project root and the project tree rows accept it (#2009). +# Lithe-core-rust #63, squash-merged into main as ad148ec: a Unix process group whose members have +# all exited but are not reaped yet is killed without error, so disposing a language server or +# closing an SSH session on macOS no longer reports EPERM (#2017). It is on top of #62, +# squash-merged into main as b401949: a backslash or colon in a Unix file name stays part of the +# name, so a folder named D:\logs is one level below the project root and the project tree rows +# accept it (#2009). # Lithe-core-rust #61, squash-merged into main as 6a14126: the LSP engine keeps a session's hover # answers, so resting on a symbol again answers without asking the server (#1995). It is on top of # #60, squash-merged into main as ca80599: language-server indexing exclusions ask Git once per @@ -125,7 +128,7 @@ PINNED_CORE_REPOSITORY="https://github.com/Lithe-IDEA/Lithe-core-rust.git" # the contract, plugin guides, reference and SDKs live only in shared/plugins; on top of #16 (reported Git queries folded in the console), # #15 (git.write cherryPick, revert and reset fields), #14 (word-level changed ranges of diff # rows), #13, #8, #7, #6 and #4. -PINNED_CORE_REVISION="c0dd2a42ff1baf9d6619d511465f52ac768acbd6" +PINNED_CORE_REVISION="ad148ecd0c2ae1159c39b721e38ce7afe50f7de2" PROFILE="debug" while [[ $# -gt 0 ]]; do case "$1" in diff --git a/shared/platform-feature-matrix/features/lsp-lifecycle.json b/shared/platform-feature-matrix/features/lsp-lifecycle.json index 4505c8ac99..6224b2e54d 100644 --- a/shared/platform-feature-matrix/features/lsp-lifecycle.json +++ b/shared/platform-feature-matrix/features/lsp-lifecycle.json @@ -28,7 +28,7 @@ ] }, "owner": "Language Tooling", - "verification": "在两端用测试内联的合成语言服务器插件验证启动、重启、超时、取消和资源清理,并确认典型工作流后已安装程序包(macOS app bundle、Windows 安装目录)的文件清单不变。 等待期间取消不得重新激活;匹配 operation 的停止应清除 preparing,旧 operation 的停止不得影响新准备。 macOS #1523:通过插件入口启动语言服务器,连续失败最多自动启动三次,显式重启可恢复,且包内文件哈希保持不变。 macOS 最终关闭场景:暂停旧模块清理、排队文档和维护激活、关闭项目会话、释放清理;即使 AppModel 保留工作区 URL 与打开文档,也不能重新发布语言能力或启动 LSP。 macOS 生产 RustCoreBridge 与本地协议进程验证插件身份、host services、配置值和缓存启动上下文。 macOS 在大型工程导入期间打字、滚动与补全不掉帧(事件 drain 已移出主线程)。 Core:cargo test -p lithe-core --lib failed_initialize、failed_start 与 invalid_initial_configuration_is_rejected_before_launch,确认启动失败的进程确认退出后才允许下一次启动,清理不了时拒绝新启动。 #1662 LSP-08:启动失败后的自动重试由 Core 的 lsp.activationPolicy 决定,时间使用平台单调时钟。每次失败后自动启动等待 5 秒;连续失败 3 次后停止自动启动,只能显式重启或修复后重试;会话就绪、显式启动或停止会清空记录。macOS 新增失败后 5 秒冷却(此前可立即重试),Windows 新增 3 次上限(此前每 5 秒无限重试)。在两端用无法启动的语言服务器打开文件,确认 5 秒内不重复启动、第 3 次失败后不再自动启动、显式重启后恢复。", + "verification": "在两端用测试内联的合成语言服务器插件验证启动、重启、超时、取消和资源清理,并确认典型工作流后已安装程序包(macOS app bundle、Windows 安装目录)的文件清单不变。 等待期间取消不得重新激活;匹配 operation 的停止应清除 preparing,旧 operation 的停止不得影响新准备。 macOS #1523:通过插件入口启动语言服务器,连续失败最多自动启动三次,显式重启可恢复,且包内文件哈希保持不变。 macOS 最终关闭场景:暂停旧模块清理、排队文档和维护激活、关闭项目会话、释放清理;即使 AppModel 保留工作区 URL 与打开文档,也不能重新发布语言能力或启动 LSP。 macOS 生产 RustCoreBridge 与本地协议进程验证插件身份、host services、配置值和缓存启动上下文。 macOS 在大型工程导入期间打字、滚动与补全不掉帧(事件 drain 已移出主线程)。 Core:cargo test -p lithe-core --lib failed_initialize、failed_start 与 invalid_initial_configuration_is_rejected_before_launch,确认启动失败的进程确认退出后才允许下一次启动,清理不了时拒绝新启动。 #1662 LSP-08:启动失败后的自动重试由 Core 的 lsp.activationPolicy 决定,时间使用平台单调时钟。每次失败后自动启动等待 5 秒;连续失败 3 次后停止自动启动,只能显式重启或修复后重试;会话就绪、显式启动或停止会清空记录。macOS 新增失败后 5 秒冷却(此前可立即重试),Windows 新增 3 次上限(此前每 5 秒无限重试)。在两端用无法启动的语言服务器打开文件,确认 5 秒内不重复启动、第 3 次失败后不再自动启动、显式重启后恢复。 停止语言服务器时的进程组(2026-11-16,#2017,Lithe-core-rust #63,两端通过 Core ad148ec 获得):macOS 上语言服务器的进程都已退出、但还没被回收时,kill(-pgid) 返回 EPERM,Core 原来把它当成失败,停止或重启时报“Language-server process tree did not exit.”,会话留在注册表里;现在 EPERM 也视为已发出信号,是否结束仍由截止时间内的等待判断。Core 回归测试:cargo test -p lithe-platform-tests a_unix_tree_of_exited_unreaped_processes_ends_without_error。Windows 用 Job 对象,不走这段代码。", "notes": "Viva 已接入插件语言服务器的启动、停止和文档同步,Problems 工具窗口展示服务器诊断,并在项目切换、服务器重启/停止/崩溃及插件禁用后清理;补全、悬浮、导航、重命名与格式化见各自能力行。macOS 已用真实 clangd 系统命令进程验证启动、文档打开/增量编辑/保存/关闭和诊断到达;Windows 和资源清理未验证。", "legacy": { "revision": "5a54c41aa37a4e6e6b68918a4b05765b9dd07a36",