Effect.fn reusable generator helpers fail with SC2001 (type outside the compilable set)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 22/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- compilers
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 6.4k
- Fork
- 204
- Merge medio
- 7h 45m
- PR unite (30g)
- 845
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di vercel-labs/scriptc
-
`process.execPath` uses the ANSI API on Windows, so non-ASCII paths are garbled when the ANSI code page is not UTF-8Forse già presa @ctate l’ha presa oggi. Aperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
vercel-labs/scriptc#2910 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
vercel-labs/scriptc#3048 ·
I maintainer di solito rispondono entro 1 giorno
-
Object-shape and declaration-assignment diagnostics describe the wrong JavaScript behaviorForse già presa @MathurAditya724 l’ha presa oggi. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
vercel-labs/scriptc#3037 ·
I maintainer di solito rispondono entro 1 giorno
-
Optional setter JSDoc is mistaken for optional executable syntaxForse già presa @MathurAditya724 l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
vercel-labs/scriptc#3036 ·
I maintainer di solito rispondono entro 1 giorno
-
Valid legacy regex fragments are rejected before native compilationForse già presa @MathurAditya724 l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
vercel-labs/scriptc#3035 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di vercel-labs/scriptc
Issue simili
-
Cleanup SetupForse già presa @AlexanderKaran l’ha presa oggi. Apertadocumentation enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
e18e/framework-tracker#769 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(docker): correct stale --db-path comments in fetch/git Dockerfiles and clarify git READMEApertabug v2
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
modelcontextprotocol/servers#5483 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
XiaomiMiMo/MiMo-Code#2783 ·
I maintainer di solito rispondono entro 1 giorno
-
area: web bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
kinqsradio/orbyn-engineering#227 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
joeldesante/TurfBuilder#258 ·
I maintainer di solito rispondono entro 1 giorno