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

オープン 初心者向け
#2,311 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
c, wasm
領域
cli

調査の方向性

戻り値は web/eigs_wasm.c の eigs_run_source で計算されており、g_exit_code を読まずに g_has_error ? 1 : 0 を返しています。まずそこから始めて、exit of N がどのように g_exit_code を設定するかを確認してください。exit of 3 が 3 を返し、exit of 0 が 0 を返し、実行時エラーは引き続き 1 を返し、tests/test_playground_wasm_2301.sh の exit of 3 の行が null を受け入れるのではなく値を固定していれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
C
スター
3
フォーク
7
平均マージ
6時間 26分
マージ済み PR(30日)
318

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

InauguralSystems/EigenScript のほかの issue

InauguralSystems/EigenScript の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。