feat: 语言服务依赖切换为 mcpp-language-server - #16
Merged
Merged
Conversation
把 C++ 模块语言服务职责从官方 clangd 扩展迁移到 sunrisepeak.mcpp-language-server(mcppls),本扩展只保留 mcpp 的构建、 工具链、任务与 mcpp.toml 编辑支持。 - package.json:extensionDependencies 换为 sunrisepeak.mcpp-language-server, VS Code 下限提升到 ^1.91.0,版本定为 0.4.0 - 新增 src/languageServer.ts:通过 mcppls 公开命令(restartServer / selectContext / showModuleGraph / showLogs)桥接,依赖缺失与命令失败 返回稳定结果,不引入 vscode-languageclient,不 spawn mcppls serve - src/extension.ts 收缩到 CLI + mcpp.toml 补全 + 语言服务桥接 - 删除 clangd 专属实现:analysis.ts、llvmTools.ts、workflow.ts 及其测试 - process.ts 只保留 runProcess;discovery.ts 去掉 CDB 路径与 clangd 候选 - 一键流程改为 mcpp build + mcppls 刷新,不再安装 llvm-tools 或切换 LLVM - 旧 mcpp.configureClangd 保留为弃用 alias,转发到新实现 顺带修复 mcpp.toml 补全与新 mcpp 契约的漂移:移除已被 mcpp 删除的 [xlings.envs] 段,[xlings.workspace] 示例版本改用当前索引可安装的 node。 npm test:179/179 通过。
Extension Host 冒烟测试原本安装 clangd stub,与新依赖不符。改为安装 sunrisepeak.mcpp-language-server stub,并断言真实桥接行为: - stub 注册 mcppls.restartServer / selectContext / showModuleGraph / showLogs, 只记录调用、不启动 LSP、不改配置 - E2E 验证扩展激活、依赖扩展同时安装、build 后触发 restart, 以及三个公开转发命令各调用一次 - 运行时 VS Code 版本对齐到 1.91.0 npm run test:e2e 通过。
- README 改为按职责边界组织:mcpp-vscode 负责工程发现、构建/运行/测试、 工具链与 mcpp.toml;C++ 模块语义交给 mcppls;不再描述 clangd 配置流程 - 记录升级要点:新依赖、VS Code 1.91 下限、mcpp.path 作用域限制、 旧 clangd 设置不再生效、darwin-x64 暂无上游平台包 - CHANGELOG 增加 0.4.0 未发布段落,说明依赖切换、旧层删除与一键流程变更 - 新增迁移实现计划文档,含冻结决策、门禁、9 个任务与执行状态 - CI 增加扩展依赖声明检查,以及“不得引入第二个语言客户端”的打包检查 npm run package 通过,VSIX 归档校验通过。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目标
把 C++ 模块语言服务职责从官方 clangd 扩展迁移到
sunrisepeak.mcpp-language-server(mcppls),本扩展只保留 mcpp 的构建、工具链、任务与 mcpp.toml 编辑支持。变更
extensionDependencies:llvm-vs-code-extensions.vscode-clangd → sunrisepeak.mcpp-language-server;VS Code 下限提升到 ^1.91.0;版本 0.4.0验证
未完成