Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Improve logging on build failure by displaying file contents of `meson-log.txt`

オープン
#246 コメント 33 件 リアクション 5 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
build-system

調査の方向性

まず、issue に示されている meson-log.txt パスを使って、Meson に起因する pip のビルド失敗がどのように報告され、クリーンアップされるかを追跡します。ログを保持する方法と、その内容を stdout に表示する方法を比較し、失敗するビルドを再現して利用可能な出力を調べます。一時ビルドディレクトリがクリーンアップされた後でも、ユーザーが根本原因を診断できれば完了です。

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

説明

enhancement

The current output from pip when encountering a build error is very poor. gh-231 will fix one part of that, by reducing the traceback of irrelevant pip/meson-python internals. There is a second part however which we need to improve on, which is showing the actual root cause of a build failure when possible. Now what happens is the user sees something like:

../../scipy/meson.build:40:0: ERROR: Command "/usr/bin/python3 -c import os; os.chdir(".."); import numpy; print(numpy.get_include())" failed with status 1.

A full log can be found at /tmp/pip-install-3okqoo15/scipy_a5afe2fae16c4250875f20d9db43706f/.mesonpy-u88p7q3f/build/meson-logs/meson-log.txt

and is then left wondering "why does import numpy fail, given numpy is a build dependency?". The answer is in meson-log.txt, which pip has unhelpfully already cleaned up. So it's impossible to diagnose the issue (latest example for scipy here).

Two options to improve here that I can think of:

  1. Don't clean up the log file
  2. Print to log file contents to stdout (possibly followed by repeating the root cause from the original stdout content)

(2) is probably better than (1).

主要言語
Python
スター
180
フォーク
93
平均マージ
18時間 33分
マージ済み PR(30日)
19

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

mesonbuild/meson-python のほかの issue

mesonbuild/meson-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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