Repository navigation
fix(wsl): 注册表读版本,并拆分 SDK 安装模块 - #14
Merged
Merged
Conversation
Prefer HKLM Lxss\Msi\Version (same source WSL uses) so setup does not spawn wsl.exe before wslcsdk.dll is available. Keep CLI only as fallback; live SDK still uses Service::version. Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Keep ensure_sdk_dir as cache-hit → list → download. Move registry/CLI probing and stamp/DLL paths out so the fetch module stays focused. Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
WSL 2.9.3+ always writes Lxss\Msi\Version; missing key means not installed. Removes wsl.exe spawn and UTF-16 pipe path. Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Registry already yields x.y.z[.w]; keep SemVer, package gate, and NuGet matching only. Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
Drop SessionStats/Cmd::Stats and the unused host_version wrapper. Refresh SDK notes and silence Linux-only dead_code false positives. Co-authored-by: 绿岸公式 <chinesejar@gmail.com>
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.
背景
启动门禁不应再跑
wsl --version。Service::version()要等 DLL 加载后才能用;WSL 包版本在注册表。原先 CLI 解析和臃肿安装逻辑可删。改动
HKLM\...\Lxss\Msi\Version;缺键 = 未安装。无 CLI。wsl_probe/sdk_cache/sdk_fetch。sdk_version:删除 UTF-16/多行解析;只留 SemVer + NuGet 匹配。session_stats/SessionStats/Cmd::Stats;去掉多余host_version包装。Service::version()。体量(约)
sdk_version.rswsl_probe.rssdk_cache.rssdk_fetch.rs测试
cargo test --bin wslc-desktop14 passedRUSTFLAGS="-W unused -W dead_code" cargo build无 warning