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
{{ message }}
Repository navigation
file-search: 修复 Effect failure channel 与多次 provide 诊断 #170
Activity
hasak21 commentedon Aug 28, 2026
认领此 Issue。
初步核对结果:
extensions/file-search/src/binaries.ts中 11 处Effect.fail(new Error(...))使用全局Error作为 failure channel,缺少稳定 discriminant,Effect failure channel 失去可穷举区分能力;Effect.provide/Effect.provideService可能使 Layer 分别构建,破坏服务共享与 Scope 生命周期语义;mapError为InstallError,公开合同暂未受影响。拟采用的方案:
BinaryDownloadError extends Data.TaggedError),替换 11 处Effect.fail(new Error(...)),消除 TS377023 诊断;粒度以调用方是否需要分类处理为准,不为每个字符串分支制造无用类型。Effect.provide合并为单次组合 Layer provide,确认FetchHttpClient.RequestInit与 HTTP Layer 的依赖方向,消除 TS377033 诊断。BinaryEnv.install的InstallError合同不变。bun run typecheck、bun run check、bun run test均通过,binaries.ts不再输出 TS377023/TS377033。如果已有人在做,请告知;否则我会提交 PR。
fix(file-search): define BinaryDownloadError and consolidate Effect l…
fix(file-search): define BinaryDownloadError and consolidate Effect l…