Repository navigation
fix(win32): stop forcing pnpm clone-or-copy on plugin installs - #204
Merged
Merged
Conversation
package-import-method=clone-or-copy plus child-concurrency=1 was forcing every pnpm install to do a full physical file copy of every file in every package instead of the default hardlink, serialized to one package at a time. On a profile with 150+ packages this turned installs that should take seconds into multi-minute (up to 30-minute, per user reports) waits on Windows, especially with AV real-time scanning in the mix. The setting was added to route around a different Windows problem — a locked rename when Harness (or a scanner) holds a handle inside the directory pnpm is replacing — but that is now handled by the dedicated lock-recovery pnpm-runner.mjs shim (retry, sideline, prune), which is copy-method agnostic. Reverting to pnpm's defaults is a straight win. Also fixes the .npmrc so it's rewritten on every launch instead of only when absent — previously an install already affected by this on a given machine would keep the stale clone-or-copy pin forever even after the code was fixed.
bobowsh
added a commit
to bobowsh/dsh-desktop
that referenced
this pull request
Aug 29, 2026
将上游 dataelement/dsh-desktop 的 12 个提交并入 bobowsh。主要改动: Windows 稳定性 / 崩溃自愈 - feat(windows): 关闭时最小化到系统托盘常驻 (dataelement#203, LAN-SHH) - fix(windows): 主窗口 GPU/renderer 崩溃自愈,新增 gpu-fallback.ts + main-window-recovery.ts (dataelement#206) - fix(windows): 沙箱下 GPU 进程起不来时回退 (dataelement#212) - fix(windows): 桌面 shell 与 Harness 进程解耦,Ctrl+C 广播不再误杀 (dataelement#208/dataelement#210) - perf: 停掉 4 个空转循环省 CPU (dataelement#214) 移动端隧道 - feat: Cloudflare 隧道失败回退 Pinggy,新增 pinggy-tunnel.ts (dataelement#205) - fix(mobile): 加固手机连接面 (dataelement#191) 设置 / 模型 - fix(settings): 自定义 provider 模型暴露 reasoning effort 编辑器 (dataelement#211/dataelement#215) - feat(workspace): 工作区菜单加 Open in Finder (dataelement#132) 发布 / 安装 - ci: 发布前校验产物,新增 scripts/verify-release-assets.mjs (dataelement#217) - fix(market): 保留钉死的 pnpm store 配置 (dataelement#220) - fix(win32): 插件安装不再强制 pnpm clone-or-copy (dataelement#204) 冲突解决:src/main/index.ts、src/preload/index.ts、harness-runtime.ts、 test/release.test.ts、test/runtime.test.ts 已按「上游新功能取上游、本地便携 扩展(DSH_HOME/MNEMON_CLI_PATH/useElectronRuntime/ENABLE_MOBILE_BRIDGE)保留、 clone-or-copy 按 dataelement#204 废弃」原则解决。settings-models/workspace patch 升级到 rc.2(含上游 reasoning effort 编辑器 + 本地 UI 增强)。npm install + patch-package 全绿,vitest 423 passed(2 个 feishu python3 环境失败忽略)。
Kunstderfug
added a commit
to Kunstderfug/dsh-desktop
that referenced
this pull request
Sep 16, 2026
…d escapable
Keep the pnpm side-effects cache DISABLED at both spawn sites: bundled pnpm 10.34.5 keys side-effect entries on ENGINE_NAME (${platform};${arch};node<MAJOR>), which is ABI-blind while pnpm runs under ELECTRON_RUN_AS_NODE against native modules (node-pty conpty failure family, dataelement#183). The disable is a deliberate opt-out introduced in dataelement#126 and preserved through dataelement#204/dataelement#220/dataelement#352 (profile .npmrc seed and generations staging pin), not inheritance.
Both buildHarnessSpawnOptions and buildProfilePluginCommandEnvironment now compute npm_config_side_effects_cache and PNPM_CONFIG_SIDE_EFFECTS_CACHE from one exported helper, pnpmSideEffectsCacheAllowed(): default 'false', overwriting any stray parent-shell npm_config value. DSH_PNPM_SIDE_EFFECTS_CACHE=1 (exact token) opts a diagnostic run back in; the two market-installer disable sites are cross-referenced but untouched so generation installs never see the hatch. Windows note documented: env names are case-preserved, so the hatch must be exported with exact casing.
Table-driven tests pin default-off, stray-parent override, near-miss token rejection, and exact '1' enablement for both builders.
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.
package-import-method=clone-or-copy plus child-concurrency=1 was forcing every pnpm install to do a full physical file copy of every file in every package instead of the default hardlink, serialized to one package at a time. On a profile with 150+ packages this turned installs that should take seconds into multi-minute (up to 30-minute, per user reports) waits on Windows, especially with AV real-time scanning in the mix.
The setting was added to route around a different Windows problem — a locked rename when Harness (or a scanner) holds a handle inside the directory pnpm is replacing — but that is now handled by the dedicated lock-recovery pnpm-runner.mjs shim (retry, sideline, prune), which is copy-method agnostic. Reverting to pnpm's defaults is a straight win.
Also fixes the .npmrc so it's rewritten on every launch instead of only when absent — previously an install already affected by this on a given machine would keep the stale clone-or-copy pin forever even after the code was fixed.