Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: poor error message with '-mod=vendor' when loading a package that is not vendored #41936

bcmills opened this issue Oct 12, 2020 · 0 comments


Copy link

@bcmills bcmills commented Oct 12, 2020

(This issue is split out from #41916. #38748 is closely related.)

What version of Go are you using (go version)?$ go version
go version devel +9449a125e Sun Oct 11 17:54:59 2020 +0000 linux/amd64

What did you do?

go mod vendor
go list

-- go.mod --

go 1.16

require v0.0.0-20191119224855-298f0cb1881e
-- main.go --
package main

import _ ""

func main() {}

What did you expect to see?

An error message that explicitly mentions the user-provided path ( the fact that that path is not vendored, and (perhaps) the fact that -mod=vendor is set by default because the vendor directory exists.

What did you see instead?

cannot find package "." in:

CC @matloob @jayconrod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant