-
fix(pi-fff): cache sdk import across reloads to avoid hang (#758)
发布于
2026-08-09 02:28:16 +00:00 Pi reloads extension modules with jiti moduleCache:false, so loadSdk()
re-executes a dynamic import of the fff-bun module graph on every /reload.
The fff-bun graph top-level awaits a type:file import of the native .so,
which never resolves when re-imported inside the Bun-compiled pi binary,
leaving the reload screen stuck forever (pi awaits session_start handlers
without a timeout).Cache the first import on globalThis so reloads reuse it.
Closes #757
Co-authored-by: chenydev chenydev@users.noreply.github.com
下载附件