Effect.fn reusable generator helpers fail with SC2001 (type outside the compilable set)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 22/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- compilers
調査の方向性
The failure is the SC2001 diagnostic raised at an Effect.fn(...) call site in the compiler's type-subset check, so start by finding where SC2001 is emitted and which type the Effect.fn return falls outside of. The issue says Effect.gen already lowers, which gives a working comparison. Done means either Effect.fn generators compile, or the subset docs state a supported alternative. The maintainer has not chosen between those two options, so confirm the direction before writing code.
索引モデルが issue の本文から書いたものです。
説明
Summary
Effect.fn("tag")(function* () { ... }) from effect/Effect fails to compile with SC2001 "type outside the compilable set" on the helper's call site. The generic Effect.fn return (an overloaded callable whose return type is Effect<A, E, R> parameterized by the generator's yields) is the type outside the compilable set.
Actual (scriptc 0.4.7)
A minimal program importing effect/Effect, defining an Effect.fn(...) generator function with Effect.fn.Return<A, E> annotated yields, and running it via Effect.runPromise, fails with SC2001 at the Effect.fn call.
Expected
Either:
Effect.fngenerators lower (the pattern is the project's blessed style for reusable Effect functions), or- a documented workaround / supported shape (e.g. plain
Effect.genat the call site, which does lower today) is stated in the subset docs.
Downstream evidence
T3 Code's ACP MCP fast paths (apps/server/src/mcp/AcpMcpStdioBridge.ts, 398 LOC: Effect.fn blocks for send/request/handleServerPayload/launch) hit exactly this when compiling per-entrypoint ELFs. The import closure is small (3 modules of ours, ~457 LOC) but pulls the whole Effect core (83 modules, ~76k LOC), and Effect.fn is the first thing that fails. Rewriting to Effect.gen is our workaround candidate, but Effect.fn is idiomatic and everywhere in the codebase, so a lowering or a blessed alternative matters beyond one file.
- 主要言語
- TypeScript
- スター
- 6.5k
- フォーク
- 212
- 平均マージ
- 9時間 48分
- マージ済み PR(30日)
- 795
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vercel-labs/scriptc のほかの issue
-
Promise.all result is treated as possibly undefined, widening mapped rows対応中かも @alantriesagain が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 47/100
vercel-labs/scriptc#3080 ·
メンテナーはふだん 1 日以内に返信
-
Async function with a typed result rejects a returned checked-dynamic promise対応中かも @alantriesagain が 1 日前に担当しました。 オープン
難易度 4/5 1〜2日 初心者へのやさしさ 48/100
vercel-labs/scriptc#3078 ·
メンテナーはふだん 1 日以内に返信
-
Abstract methods block coverage and direct calls when no subclass exists対応中かも @alantriesagain が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
vercel-labs/scriptc#3077 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
vercel-labs/scriptc#3048 ·
メンテナーはふだん 1 日以内に返信
-
Assigning a wide Node object (process.stdout) to a narrow { write } record fails SC2002 (width-copy rules)対応中かも @ctate が 2 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
vercel-labs/scriptc#2949 ·
メンテナーはふだん 1 日以内に返信
vercel-labs/scriptc の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
readest/readest#7413 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
content triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eliasstravik/herdr-projects#788 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Ability to edit tagsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信