Playground: `exit of N` returns rc 1 from eigs_run_source instead of N

Abierto Apto para principiantes
#2,311 1 comentario 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
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
c, wasm
Área
cli

Línea de trabajo

El valor de retorno se calcula en eigs_run_source en web/eigs_wasm.c, que devuelve g_has_error ? 1 : 0 sin leer g_exit_code. Empieza ahí y comprueba cómo exit of N asigna g_exit_code. Está terminado cuando exit of 3 devuelve 3, exit of 0 devuelve 0, los errores de ejecución siguen devolviendo 1 y la fila exit of 3 de tests/test_playground_wasm_2301.sh fija el valor en lugar de aceptar null.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

needs-triage

Found while fixing #2301 (PR #2302, hq#58 ES-OWF-1).

Problem

In the browser playground, exit of N does not propagate N. eigs_run_source (web/eigs_wasm.c) returns g_has_error ? 1 : 0 and never reads g_exit_code, so:

program CLI exit status playground eigs_run_source rc
exit of 3 3 1
exit of 0 0 not pinned (expected 0)

(rc 1 measured on a real emcc 3.1.74 build in PR #2302's CI.) The playground cannot distinguish exit of 3 from a runtime error. tests/test_playground_wasm_2301.sh accepts any number for this row (wantRc null), so nothing pins the value.

Done when

  • eigs_run_source("exit of 3") returns 3, and eigs_run_source("exit of 0") returns 0, in a real emcc build of web/build.sh.
  • A runtime error still returns 1, and a plain run after any of these in the same module still returns 0 with its output.
  • The exit of 3 row in the playground test pins the rc (no null wildcard). The test runs in pages.yml before the receipt and goes red on the current g_has_error ? 1 : 0 return.
  • web/app.js shows the exit code if the UI surfaces rc. If it does not, the PR says so.

Generated by Claude Code

Lenguaje dominante
C
Estrellas
3
Forks
7
Merge medio
6 h 21 min
PR fusionados (30 d)
323

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 InauguralSystems/EigenScript

Todos los issues de InauguralSystems/EigenScript

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.