surprising behavior with -instrument and godep

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go

調査の方向性

まず godebug run コマンドとその -instrument の処理から始め、次に issue に記載された godep workspace のケースを再現します。完了条件は、import されていないパッケージについて警告するか、flag を削除するか、またはその動作を改善するかを決定し、パフォーマンス上のトレードオフをドキュメント化またはテストすることです。

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

説明

I am debugging a program that has a dependency on package foo, and I want to step into function calls in foo. So I run:

$ godebug run -instrument=foo myProg.go

godebug runs without complaint. Yet, to my surprise, I still can't step into foo. Why? Because I had forgotten that I was using godep. I would have been fine if I had instead run:

$ godebug run -instrument=my/package/name/Godeps/_workspace/src/foo

It would be nice if godebug caught this for me. At a minimum, it could have noticed that I didn't import package foo anywhere, and warned me that it was useless to pass that package in the instrument flag.

Alternatively, maybe we should get rid of the -instrument flag entirely. Having it sacrifices some usability for performance, but I don't understand the tradeoff very well. How much performance would we lose by instrumenting everything? Can we make that better? How often does the flag cause surprising behavior?

主要言語
Go
スター
2.5k
フォーク
102
PR マージ指標
30日以内にマージされた PR はありません

環境構築

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

はじめの一歩

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

mailgun/godebug のほかの issue

mailgun/godebug の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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