cmd/go: confusing error "missing dot in first path element" when importing missing package #35273
Labels
FrozenDueToAge
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
This issue was created as a follow-up to my comment in #34769 and CL 203118.
When running
go build
on a modulefoo
, that imports a local modulebar
without a package (no Go files), the returned error is:CL 203118 changes the module importer to print more friendly error as:
Full example exists here: https://github.com/a8m/go-issue-34769
If you ask yourself why creating a module without any Go files (the bar module), well, we tried to build a few Docker images and accidentally forgot to copy some of the Go files to the image. It took us hours to figure out what the "missing dot in first path element" means in this case.
The text was updated successfully, but these errors were encountered: