Skip to content

[debug/export] 语法错误和构建失败未可靠显示在诊断界面 #8

Description

@jamiesun

Context Boundary

  • Repo/module: talkincode/GameKit, runtime diagnostics, preview status, and export feedback
  • Version/commit: main, 9eb811e7bc3db3193b57609425723c478e438d32
  • Runtime: browser preview plus ZIP export
  • OS/browser: not recorded; one parser case was verified against standard SyntaxError text, but no browser E2E was run
  • Dependencies/config: pygbag 0.9.3; no feature flag involved

Expectation vs. Reality

Expected: Runtime and build failures appear as stable, actionable Problems/Console feedback, and an error state is not reset by stale startup messages.

Actual: problemsFromConsole returns no problem unless it finds the literal Traceback (most recent call last):; standard SyntaxError text without that header is therefore missed. The preview poller reports ready every 400 ms while the terminal still contains default.tmpl: done, and noteReady unconditionally sets the run state to running, which can overwrite a later error. Exporting after deleting main.py throws from buildWebBundle without being converted into a user notice.

Reproduction Path

  1. Call problemsFromConsole with standard SyntaxError output that has a File ... line ... frame but no Traceback header; it returns [].
  2. Start a preview, leave default.tmpl: done in the terminal, then trigger a runtime exception; observe whether the repeated ready poll changes the state back to running.
  3. Delete main.py and choose an export format; observe the unhandled build error instead of an in-app message.

Minimal reproduction: problemsFromConsole(' File "main.py", line 1\nSyntaxError: invalid syntax') returns an empty list.

Blast Radius

  • Affected users/paths: users relying on the Problems panel for syntax/runtime failures or exporting an invalid project.
  • Frequency: SyntaxError format, persistent startup terminal text after a runtime failure, or missing main.py during export.
  • Severity rationale: failures are harder to diagnose and can be reported with the wrong run state; recommend P2.
  • Workaround: inspect the Console and restore main.py before exporting.

Evidence

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions