pprof icon indicating copy to clipboard operation
pprof copied to clipboard

internal/report: make openSourceFile cognizant of Go modules

Open odeke-em opened this issue 4 years ago • 3 comments

This change adds $GOPATH/pkg/mod as a possible base to search from given that Go modules have been the norm since Go1.11 and we are currently at Go1.16/1.17, hence support for Go modules.

Fixes #611

odeke-em avatar Mar 21 '21 05:03 odeke-em

Kindly /cc-ing @ghemawat @aalexand

odeke-em avatar Mar 21 '21 05:03 odeke-em

Codecov Report

Merging #612 (075f40d) into master (cbba55b) will increase coverage by 0.02%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #612      +/-   ##
==========================================
+ Coverage   66.94%   66.97%   +0.02%     
==========================================
  Files          78       78              
  Lines       14378    14388      +10     
==========================================
+ Hits         9626     9636      +10     
  Misses       3892     3892              
  Partials      860      860              
Impacted Files Coverage Δ
internal/report/source.go 78.43% <100.00%> (+0.23%) :arrow_up:
.../github.com/google/pprof/internal/report/source.go 78.43% <0.00%> (+0.23%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cbba55b...075f40d. Read the comment docs.

codecov-io avatar Mar 21 '21 05:03 codecov-io

@odeke-em Is it possible to add a test that fails before the the change and passes after?

aalexand avatar Mar 21 '21 19:03 aalexand