Note: I am building with GO111MODULE=on, from within my GOPATH.
I am building a command that imports a module defined as: module github.com/Figure53/figure53.com
Within that module, I import a package at github.com/Figure53/figure53.com/backend/remote, and it builds without issues.
I created a new file within a pre-existing package, and copy and pasted that import path. Somewhere along the way, I introduced a typo into the import path. The domain name in the import path was misspelled as gitdub.com.
I ran go build with GO111MODULE=on, and it hung silently until I cancelled it. I tried again a few times and got confused. It didn't seem to be CPU issue and I haven't experienced a feedback-less slow build for a while. After I stashed my changes, it built fine.
I read my diff, discovered my typo, fixed it, and the build worked again.
What did you expect to see?
I expected some indicator that go build was hung on trying to fetch a module, after shorter period of time. I also thought some sort of shorter timeout might make sense.
What did you see instead?
go build hung indefinitely.
Once I ran go build -v [...], I could see what it was working on, and the build hung indefinitely at:
gitdub.com is a parked domain, and appears to hang indefinitely for HTTPS requests. We probably can't fix the hang, because we can't distinguish between a slow server and an invalid one, but we can at least do something to clarify which operation is hung.