cmd/go: go list
has confusing/inconsistent semantics for Match and DepOnly
#60794
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?(Also reproduced at HEAD.)
Does this issue reproduce with the latest release?
Yes.
What did you do?
What did you expect to see?
The documentation for DepOnly and Match is:
It's not clear whether packages built on behalf of tests "match" the pattern, but the output seems clearly inconsistent in some ways:
context.test
has DepOnly == false, that implies cmd/go does think ofcontext.test
as "explicitly listed" by./...
. It also clearly thinks of, say,net
as "explicitly listed" by./...
. So it seems odd thatnet [context.test]
(and several others) have DepOnly == true, indicating that they're not "explicitly listed".context.test
is "explicitly listed", yet cmd/go can't tell me what pattern it matched.What did you see instead?
DepOnly is true for some of these and false for others in ways I can't rationalize.
For some packages, DepOnly == true, but a Match pattern is also listed.
For some packages, DepOnly == false, but a Match pattern is listed.
The text was updated successfully, but these errors were encountered: