Hm, I'm on the "it may just be confusing" side: my intuition is either
* "vendor" is meaningless outside of mod=vendor mode, acting like a normal package (which would be confusing be cause mod=vendor would result in a different build when it's on or off)
* the only directory that's allowed to be named vendor must be in the root directory of a module, and when mod=vendor is off, all the source contained in that directory is ignored, and an error is reported if code is contained directly in vendor/
What version of Go are you using (
Does this issue reproduce with the latest release?
Yes, also reproduces with 1.14rc1.
What operating system and processor architecture are you using (
What did you do?
Created a regular package in a directory named
vendor, not created with
go mod vendor, not using
What did you expect to see?
Errors reported for packages in
-mod=vendoris not active.
These are being treated as regular packages. Other modules won't be able to import these packages, since vendor directories are excluded from module zip files.
What did you see instead?
go listtreats these like regular packages:
cc @matloob @bcmills
The text was updated successfully, but these errors were encountered: