cmd/go: improve error message for package not found? #32096
Labels
FrozenDueToAge
modules
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
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Ubuntu 16.04.6/amd64
go env
OutputWhat did you do?
The following is my tree:
snippets/
├── constants
│ └── constants.go
├── libs
│ ├── auth.go
│ ├── db.go
│ ├── init.go
│ ├── messaging.go
│ └── storage.go
└── snippets.go
I was trying to import constants from snippets.go:
cat snippets.go
And did:
go build -x -v
What did you expect to see?
No error or verbose output from go build
What did you see instead?
Quite unhelpful output:
build firebase.google.com/go/snippets: cannot load snippets/constants: cannot find module providing package snippets/constants
Now for whatever reason my import might have failed, I can understand that. But I would at least like a detailed explanation from go build. (In fact, the same is true to go get, go run etc.)
The text was updated successfully, but these errors were encountered: