Skip to content

ビルド失敗時の案内改善(ログパス表示・再インストール手順の提示) - #186

Open
k-yoshimi wants to merge 3 commits into
developfrom
fix/179-failure-ux
Open

ビルド失敗時の案内改善(ログパス表示・再インストール手順の提示)#186
k-yoshimi wants to merge 3 commits into
developfrom
fix/179-failure-ux

Conversation

@k-yoshimi

Copy link
Copy Markdown
Collaborator

概要

Refs #179(項目 1・2 を実装。項目 3 の -h/usage は install.sh 共通化 #184 で一括対応するため見送り)

1. 失敗時にログパスを表示(util.sh、1 箇所で全アプリに有効)

check() 失敗時、$LOG が設定されていれば See log for details: <path> を出力します。53/54 の install.sh が LOG を export 済みなので、ほぼ全ビルド失敗で案内が出ます(export していないのは何もビルドしない gcc-wrapper のみ)。

2. Error: $PREFIX exists に次のアクションを追記(全 54 install.sh)

To reinstall, remove it first or increase the MA_REVISION in version.sh を直後に追加。機械的 sed による一括挿入で、全ファイルで挿入数が 1 であることを確認済み。

検証(macOS で実施)

  • 全 54 install.sh + util.sh が sh -n 通過
  • check falseFailed: に続き See log for details: が出ること、LOG 未設定時は従来どおりであることを確認
  • 一時 MA_ROOT で setup → PREFIX を事前作成 → apps/komega/install.sh 実行で、新メッセージ 2 行 + exit 127 を実機確認

補足

scripts/util.shcheck()#178 も同関数の隣接行を修正しているため、マージ順によっては軽微な競合が出ます(解消は自明)。

🤖 Generated with Claude Code

k-yoshimi and others added 3 commits July 8, 2026 06:52
- util.sh check(): print the log path on failure when $LOG is set,
  so users can find $BUILD_DIR/<name>-<ver>-<rev>.log without
  reading the scripts
- All install.sh: follow "Error: $PREFIX exists" with the concrete
  next step (remove it or bump MA_REVISION in version.sh)

Refs #179 (the -h/usage item is deferred to the install.sh
consolidation in #184)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
check() printed "See log for details: $LOG" for any non-empty LOG,
including one inherited from the user's environment when running
download.sh/setup.sh standalone. The hint now requires LOG to point
under BUILD_DIR and the file to exist.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Tutorials (review2 en/ja): document the build log location, the
  'See log for details' hint, and both recovery options for
  'Error: <dir> exists'
- Reinstall message now names <NAME>_MA_REVISION, matching the
  actual variable in version.sh
- how_to_use (en): BUILD_DIR was mistranslated as 'Installation
  directory'; now 'Build working directory' (ja was already correct)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@k-yoshimi

Copy link
Copy Markdown
Collaborator Author

AI review cycle (Codex + Antigravity) 結果

Phase 1 (Codex): must_fix 0 / should_fix 1。

  • 指摘: check() のログヒントが「非空の $LOG」だけを条件にしており、ユーザー環境から継承した無関係な LOGdownload.sh 等を単体実行すると誤ったパスを案内し得る → 修正: LOG$BUILD_DIR 配下を指し、かつファイルが実在する場合のみヒントを表示するようガードを強化。4 シナリオ(継承 LOG 無視 / インストーラログで表示 / ファイル欠落で非表示 / 未設定で正常)+ 実際の komega ビルド失敗で See log for details: が出ることを検証。Codex 再レビュー済み・指摘ゼロ。

Phase 2 (Antigravity): must_fix_docs 0 → 追加対応:

  • チュートリアル(review2 en/ja)の「エラーが出た場合」節に、ビルドログの場所・See log for details ヒント・Error: <dir> exists の 2 つの復旧方法を追記
  • メッセージの変数名を実際の version.sh の変数に合わせ <NAME>_MA_REVISION に明確化(54 ファイル、機械的 sed + 全数確認)
  • 既存の誤訳を発見・修正: 英語版 how_to_use で BUILD_DIR が「Installation directory」になっていた(日本語版は正しかった)→「Build working directory」

→ 両フェーズ収束。

マージ順の注意: 本 PR は #178 (check() 隣接行)・#173/#178 (how_to_use) と軽微に競合し得ます。いずれも解消は自明です。

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants