-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
When a file in package is empty, go list
fails with this error:
$ go list -e -json ~/mod1
{
"Dir": "$HOME/rstambler/mod1",
"ImportPath": "mod1",
...
"GoFiles": [
"const.go",
"mod1.go"
],
"Error": {
"ImportStack": [
"mod1"
],
"Pos": "",
"Err": "\nmod2.go:1:1: expected 'package', found 'EOF'"
}
}
Where mod1
contains files const.go
, mod1.go
, and mod2.go
, the empty file. We had previously worked around this in go/packages
(see CL 201220) by adding the file in the error message to the list of GoFiles. However, it has recently been noticed that this result is also missing the list of dependencies for the given package. Would it be possible for go list
to return the correct list of deps for the other files in the package?
/cc @heschik @matloob
dmitshur
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.