You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No Visual Studio / Build Tools installed (clean contributor machine)
Windows 11,Node 24,pnpm 11
未安装 Visual Studio / Build Tools(干净的开发者机器)
What happens / 现象
pnpm install fails hard: fs-ext@2.1.1 (added in c58097a) has no prebuilt
binaries and must be compiled with node-gyp, so every Windows contributor now
needs the full "Desktop development with C++" toolchain (cl.exe + Windows SDK)
just to install the repo — for a binding that is never invoked on this platform.
pnpm install 直接失败:fs-ext@2.1.1(引入于 c58097a)没有预编译二进制,
必须用 node-gyp 本地编译。这意味着每一位 Windows 贡献者都要装上完整的
“使用 C++ 的桌面开发”工具链(cl.exe + Windows SDK)才能完成安装——
而这个原生绑定在 Windows 平台上根本不会被调用。
Root cause / 根因
packages/session/session-persistence-jsonl/src/lease.ts imports { flock } from 'fs-ext' at module top level, but on win32 the lock is a named
kernel semaphore via koffi (win32.ts) — the flock() code path is POSIX-only.
So the import is the only thing dragging the native build onto Windows.
Lazy-import fs-ext inside the POSIX branch of SessionWriteLease.acquire() / release() (await import('fs-ext')).
On win32 the module is never loaded, and allowBuilds: fs-ext: false
becomes safe for Windows contributors. Smallest possible change.
Alternatively, move fs-ext behind a POSIX-only platform package, following
the existing native/landlock-run pattern (linux-only packages that
cleanly skip on other platforms).
或者,参照现有的 native/landlock-run 模式(仅 Linux 的包在其他平台上
干净地跳过),把 fs-ext 收进一个仅 POSIX 的平台包里。
Optionally, CONTRIBUTING.md could also document "VS Build Tools" as a Windows
prerequisite for as long as the compile step exists.
另外,只要编译步骤还存在,CONTRIBUTING.md 也可以顺手补充说明
Windows 需要 "VS Build Tools" 作为前置条件。
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Environment / 环境
Windows 11, Node 24, pnpm 11
No Visual Studio / Build Tools installed (clean contributor machine)
Windows 11,Node 24,pnpm 11
未安装 Visual Studio / Build Tools(干净的开发者机器)
What happens / 现象
pnpm installfails hard: fs-ext@2.1.1 (added in c58097a) has no prebuiltbinaries and must be compiled with node-gyp, so every Windows contributor now
needs the full "Desktop development with C++" toolchain (cl.exe + Windows SDK)
just to install the repo — for a binding that is never invoked on this platform.
pnpm install直接失败:fs-ext@2.1.1(引入于 c58097a)没有预编译二进制,必须用 node-gyp 本地编译。这意味着每一位 Windows 贡献者都要装上完整的
“使用 C++ 的桌面开发”工具链(cl.exe + Windows SDK)才能完成安装——
而这个原生绑定在 Windows 平台上根本不会被调用。
Root cause / 根因
packages/session/session-persistence-jsonl/src/lease.tsimports{ flock } from 'fs-ext'at module top level, but on win32 the lock is a namedkernel semaphore via koffi (win32.ts) — the flock() code path is POSIX-only.
So the import is the only thing dragging the native build onto Windows.
packages/session/session-persistence-jsonl/src/lease.ts在模块顶层import { flock } from 'fs-ext',但 win32 上的锁是通过 koffi 实现的命名内核信号量(见 win32.ts)——flock() 代码路径仅在 POSIX 上执行。
也就是说,把这个原生编译依赖拖到 Windows 上的,仅仅是一行顶层 import。
The browser worker deployment already stubs fs-ext for exactly this reason,
which confirms non-POSIX deployments don't need the binding.
浏览器 worker 部署正是出于这个原因把 fs-ext 桩掉了,这也印证了
非 POSIX 部署并不需要这个绑定。
Suggested fixes / 建议修法(任选其一)
Lazy-import fs-ext inside the POSIX branch of
SessionWriteLease.acquire()/release()(await import('fs-ext')).On win32 the module is never loaded, and
allowBuilds: fs-ext: falsebecomes safe for Windows contributors. Smallest possible change.
在 POSIX 分支内改为动态导入 fs-ext(
SessionWriteLease.acquire()/release()中使用await import('fs-ext'))。win32 上该模块永远不会被加载,Windows 贡献者就可以安全地设置
allowBuilds: fs-ext: false。这是改动最小的方案。
Alternatively, move fs-ext behind a POSIX-only platform package, following
the existing
native/landlock-runpattern (linux-only packages thatcleanly skip on other platforms).
或者,参照现有的
native/landlock-run模式(仅 Linux 的包在其他平台上干净地跳过),把 fs-ext 收进一个仅 POSIX 的平台包里。
Optionally, CONTRIBUTING.md could also document "VS Build Tools" as a Windows
prerequisite for as long as the compile step exists.
另外,只要编译步骤还存在,CONTRIBUTING.md 也可以顺手补充说明
Windows 需要 "VS Build Tools" 作为前置条件。
All reactions