Check if removal of `MethodByName()` call can improve dead code elimination.

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go
領域
testing-qa

調査の方向性

location/location.go の115行目と、golang/protobuf の upstream issue 1561 から始めます。MethodByName() の呼び出しありとなしでビルドを比較し、non-test package のテストも含め、関連するコードが削除されるかを調べます。結果を確認し、必要な変更を文書化または報告できれば完了です。

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

説明

See https://github.com/golang/protobuf/issues/1561

We use it here: https://github.com/dogmatiq/testkit/blob/f03ed614360ed189c44809ccafd139523d65cf3f/location/location.go#L115

It may not matter much since this code would generally only be used from test packages, but it'd be good to confirm that they are still eliminated properly. It's also not that uncommon to have some tests in the non-test package to test unexported functions, though this should be rare with Dogma applications.

主要言語
Go
スター
1
フォーク
1
平均マージ
18分
マージ済み PR(30日)
7

環境構築

はじめの一歩

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

dogmatiq/testkit のほかの issue

dogmatiq/testkit の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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