Repository navigation
fix(toolchain): 外部安装的多入口链接保留布局里的文件名 - #135
Merged
Merged
Conversation
xiaoyumuxi
marked this pull request as ready for review
November 20, 2026 15:21
This was referenced Nov 20, 2026
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.
关联 Issue
无独立 Issue。在 Rust Support 插件的集成测试中发现:通过 rustup 安装 Rust 的机器上,工具定义
cargo永远找不到安装。类型
toolDefinitions0 内的行为修正)改动说明
问题
rustup 把
~/.cargo/bin/cargo、rustc、rust-analyzer等做成指向~/.cargo/bin/rustup的符号链接,按启动时的文件名决定运行哪个工具。Core 校验外部安装时把可执行文件解析成规范路径,返回~/.cargo/bin/rustup;宿主拿这个路径运行版本探针,跑的是rustup --version,输出不匹配 cargo 的版本正则,安装被判为versionUnsatisfied。macOS 和 Linux 上用 rustup 的用户都会遇到;Windows 的代理是硬链接,不受影响。修复(
toolchaincrate)query.rs新增invoked_executable:校验通过后,如果规范目标的文件名与executableLayouts里布局文件的文件名不同(按卷的大小写规则比较),返回规范主目录下的布局路径;文件名相同(版本管理器别名、Homebrew../libexec/bin/go这类)仍返回规范路径,行为不变。paths.rs新增file_name,按目标平台的分隔符取路径最后一段(Windows 上的原生路径可能带反斜杠)。契约与文档
toolchains/README.md:探针按 selection 报告的可执行文件匹配一段,补上“布局文件链接到另一个文件名时报告布局路径”。reference/domains/toolchains.md中英各加一段说明。protocol-changelog.md:本 PR 记在“待合入”;顺带把已经合入的 feat(build): 支持命令式测试发现 #112、feat(languages): 支持插件按首行识别无后缀文档 #127、fix(terminal): 保留控制台原始字节并兼容 Windows GBK #128、feat(marketplace): add workspace plugin recommendation contract and command #130、feat(plugins): 命令安装器支持固定 URL 归档下载(commandInstallers 1) #133 从“待合入”移到时间线,首次出现表和宿主方法表里的“待合入”换成合入日期。本 PR 不新增或修改插件宿主方法、宿主通知、清单字段、能力版本或 SDK,所以没有“原计划编号 | 方法 | 用途”表。
验证
toolchain_resolution_starts_a_multi_call_link_by_its_layout_name:HOME/bin/java链接到HOME/bin/multiplexer,候选的待探针路径和最终选择的executable都是HOME/bin/java;去掉修复时该测试失败。已有的同名别名链接测试(…_reached_through_an_alias_link)仍返回规范路径。cargo test -p lithe-core -p lithe-toolchain:877 + 22 项全部通过。cargo fmt --all --check、cargo clippy -p lithe-toolchain -p lithe-core --all-targets -- -D warnings通过。node shared/plugins/scripts/verify-docs.mjs通过。sdk-e2e.mjs。范围检查