Include package dir in trimmed caller for major-version modules - #1559
Open
larrasket wants to merge 1 commit into
Open
Include package dir in trimmed caller for major-version modules#1559larrasket wants to merge 1 commit into
larrasket wants to merge 1 commit into
Conversation
For a module with a major-version suffix, the file path in the module cache has the form .../go-pkg/v2@v2.0.3/file.go, so TrimmedPath kept only the version directory and reported callers like "v2@v2.0.3/file.go:9", dropping the package name. When the penultimate path element looks like a major-version suffix (v<digits>@v<digits>.), keep one more directory, producing "go-pkg/v2@v2.0.3/file.go:9". Fixes uber-go#1209
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1559 +/- ##
=======================================
Coverage 98.62% 98.62%
=======================================
Files 53 53
Lines 3045 3061 +16
=======================================
+ Hits 3003 3019 +16
Misses 34 34
Partials 8 8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For a module with a major-version suffix, the file path in the module cache has the form
.../go-pkg/v2@v2.0.3/file.go, so TrimmedPath kept only the version directory and reported callers like"v2@v2.0.3/file.go:9", dropping the package name.When the penultimate path element looks like a major-version suffix (v@v.), keep one more directory, producing
"go-pkg/v2@v2.0.3/file.go:9".Fixes #1209