https://github.com/a8m/go-issue-34769
https://github.com/a8m/go-issue-34769
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/a8m/go-issue-34769
- Owner: a8m
- Created: 2019-10-24T11:30:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-24T12:12:33.000Z (over 6 years ago)
- Last Synced: 2025-03-21T05:45:43.240Z (about 1 year ago)
- Language: Go
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Running `go build` from `foo` directory returns:
```
build foo: cannot load bar: malformed module path "bar": missing dot in first path element
```
This error is returned because `bar` directory does not contain any Go file.
[CL 203118](https://go-review.googlesource.com/c/go/+/203118) change the module importer to print more friendly error. For example:
```
main.go:3:8: module bar@ found (v0.0.0-00010101000000-000000000000, replaced by ../bar), but does not contain package
```
If you ask yourself why creating a module without any Go files, 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.