Bun host support: TypeScript 7 sync transport crashes on stdout._handle.fd
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- bun, typescript
Línea de trabajo
Reproduce el fallo con el comando hello.ts proporcionado y, a continuación, inspecciona @scriptc/compiler/dist/frontend/ts7/program-adapter.js y typescript/dist/api/syncChannel.js de TypeScript alrededor del acceso al stream-handle indicado. Determina si es viable un transporte síncrono compatible o una integración que preserve la API de TS7; se considera terminado cuando Bun emite IR correctamente o informa de un diagnóstico accionable de unsupported-host.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Running scriptc 0.0.36 under Bun 1.4.0 on macOS arm64 fails while starting the TypeScript 7 frontend, before compiling even a minimal input. This also affects installations where the node executable resolves to Bun.
I realize the README currently requires Node.js 24+. This report requests Bun host-runtime support and identifies the current blocker; it is not a report about Bun APIs in compiled programs.
Reproduction
With scriptc 0.0.36 already installed and its CLI executed by Bun (for example, when node resolves to Bun), create hello.ts containing:
console.log(42);
Run:
scriptc build hello.ts --emit=ir
Actual result: exit code 1, with this error (installation prefixes omitted):
TypeError: undefined is not an object (evaluating 'stdout._handle.fd')
at new SyncRpcChannel (typescript/dist/api/syncChannel.js:131:34)
at new Client (typescript/dist/api/sync/client.js:36:25)
at new API (typescript/dist/api/sync/api.js:40:23)
at new Ts7Host (@scriptc/compiler/dist/frontend/ts7/program-adapter.js:81:20)
Expected for Bun support: emit IR successfully. At minimum, an unsupported host should produce an actionable diagnostic instead of an internal dependency stack trace.
Investigation
Ts7Host constructs the synchronous API from typescript/unstable/sync. In TypeScript 7.0.2, SyncRpcChannel obtains POSIX descriptors through the private Node stream properties stdout._handle.fd and stdin._handle.fd. Bun's child-process streams do not provide the required handle in this reproduction. Consequently, changing the native compiler or linker cannot fix this failure: --emit=ir fails too.
The current scriptc frontend uses the TS7 adapter throughout; the existing typescript5 dependency is not a drop-in frontend fallback. Actual Bun support needs a compatible synchronous transport in the dependency or an integration that preserves TS7's synchronous API and filesystem callbacks.
I checked existing issues and PRs for Bun, SyncRpcChannel, and _handle and found no matching report.
- Lenguaje dominante
- TypeScript
- Estrellas
- 5.1k
- Forks
- 130
- Merge medio
- 1 h 13 min
- PR fusionados (30 d)
- 254
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vercel-labs/scriptc
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
vercel-labs/scriptc#577 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
vercel-labs/scriptc#576 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
vercel-labs/scriptc#575 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
vercel-labs/scriptc#522 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 42/100
vercel-labs/scriptc#265 ·
Los mantenedores suelen responder en 1 día
Todos los issues de vercel-labs/scriptc
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
lichess-org/api#678 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
PostHog/posthog.com#20628 ·
Los mantenedores suelen responder en 1 día
-
bug status:Needs Triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
jupyterlab/jupyterlab#19964 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
agentscope-ai/QwenPaw#8064 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area: notebooks-jupyter bug theme: new notebook frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
posit-dev/positron#16347 · 1 comentario ·
Los mantenedores suelen responder en 1 día