2.4 KiB
2.4 KiB
FAIL
Ran: cargo test -p ely-platform -p ely-ui (all pass, including tests/startup.rs and the harness-less tests/startup_panic.rs: "2 cases pass"), cargo clippy -p ely-platform -p ely-ui --all-targets (clean). I also ran the startup_panic "launch" child without ELY_NO_DIALOG. A system alert came up that named ElyDoc, the reason and a log path, and it blocked until the process was killed. Read gpui 1a28cff gpui_apple/src/metal_renderer.rs:190-210: graphics::check uses the same Device::all() / system_default() test that gpui uses before its process::exit(1).
Round 1:
- Startup panic aborting on macOS: fixed.
startup::guard(startup.rs:36-48) callsfailfrom the panic hook. That runs before the non-unwinding abort.startup_panic.rs"launch" proves it inside gpui's launch callback: exit 1, stderr text and log line. - Metal device missing, so gpui exits silently: fixed.
graphics::checkruns beforerun(run.rs:17-19), and its probe matches gpui's own. The failure branch is honestly listed under 未验证. - Late panics labelled as a failed start: fixed. The
STARTEDflag is set on the first frame (run.rs:48).startup_panic.rs"late" shows a later panic exits 101 with the ordinary panic text and no "could not start". - Unbacked claims in TASKS: fixed. The window-open branch and the probe-failure branch moved to 未验证. The panic path has a test.
New:
- crates/ely-platform/src/startup.rs:19-22 —
failnames a log file it has not checked exists. It rebuilds the path fromdata_dir(app)and does not ask where logging actually writes, or whether logging started at all. Scenario A:~/Library/Application Support/ElyOffice/ely-docis not writable.logging::initfails and run.rs:15 callsfail. The dialog and stderr then say "日志 / Log: …/ely-doc/ely.log", but that file was never created, and thelog::error!on line 18 goes nowhere because no logger is set. The user is sent to a log that does not exist (rule 2: no default standing in for missing data). Scenario B, seen in this review: thestartup_panicchild logs to its temp dir, yet the dialog points at the real user data dir. Neither test checks the path, so this went unnoticed. Fix direction: have logging record the path it actually opened (for exampleinitreturns it or stores it), and havefailprint that path. When logging did not start, say there is no log. Add an assertion on the printed log path totests/startup.rs.