Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Bun host support: TypeScript 7 sync transport crashes on stdout._handle.fd

Abierto
#293 2 comentarios 0 reacciones 0 asignados Ver en GitHub

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de vercel-labs/scriptc

Todos los issues de vercel-labs/scriptc

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.