[BUG] Breaking public API by removing error_occurred from BenchmarkReporter::Run

オープン
#1,603 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
cpp

調査の方向性

まず参照されている commit と PR を確認し、次に error_occurred と error_message が skipped と skip_message に置き換えられた、BenchmarkReporter::Run の公開宣言を調べてください。削除されたフィールドを使用するアプリケーションへの互換性の影響を確認し、サポート対象バージョン全体で結果として生じる公開 API の動作を検証してください。

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

説明

Describe the bug
The commit https://github.com/google/benchmark/commit/adb0d3d0bf5841bddc2bcc025baad93dbc7fa39f in PR https://github.com/google/benchmark/pull/1564 removed member error_occurred from BenchmarkReporter::Run struct.

@@ -1685,8 +1720,8 @@ class BENCHMARK_EXPORT BenchmarkReporter {
     std::string aggregate_name;
     StatisticUnit aggregate_unit;
     std::string report_label;  // Empty if not set by benchmark.
-    bool error_occurred;
-    std::string error_message;
+    internal::Skipped skipped;
+    std::string skip_message;
 
     IterationCount iterations;
     int64_t threads;

This is a API breaking change that was introduced without any deprecation warning. Updating the application code to use skipped will cause a build-break for when compiled against older version of GoogleBenchmark. There are no macros to detect the version of benchmark library.

System

  • all

To reproduce
NA

Expected behavior
All code using error_occurred should compile. A deprecation warning should be emitted a few releases prior to removing the public field from a struct.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

主要言語
C++
スター
10.5k
フォーク
1.8k
平均マージ
1日 15時間
マージ済み PR(30日)
28

環境構築

はじめの一歩

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

google/benchmark のほかの issue

google/benchmark の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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