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: add regression test for 'go build' error in module mode when no 'git' binary is available #28948
Comments
Please provide all the files, including Go files and |
Hmm. I just ran through that "Quick Start Example" by copy/pasting from the wiki, and it seemed to work. Prep by cleaning slate: rm -rf /tmp/scratchpad/hello Commands copied from the wiki: mkdir -p /tmp/scratchpad/hello
cd /tmp/scratchpad/hello
go mod init github.com/you/hello
cat <<EOF > hello.go
package main
import (
"fmt"
"rsc.io/quote"
)
func main() {
fmt.Println(quote.Hello())
}
EOF
go build
./hello Output:
And here is the resulting
@horseboxer In addition to the questions @mvdan asked, what do you see if you do |
@horseboxer just wanted to check in to see if you were able to look at this a bit more? (For example, see the immediately prior comment as well as the suggestions from @mvdan). Note that |
Turns out freshly installed Ubuntu VMs don't have git installed :-(. Fixed the user-error and it works now. Sorry to waste your time. |
I think
@bcmills note that this only happens with a
|
@bcmills for what it's worth, I can't reproduce the issue on Frustratingly enough, there's no 1.12 docker image at the moment, so I can't be 100% sure. But locally, |
@mvdan, thanks for investigating in detail! My results match yours: I don't know why, but this seems to be fixed in 1.12.
|
@bcmills perhaps we should add a regression test, particularly since noone seems to know how we fixed this :) |
A regression test does seem like a good idea. |
I can submit my reproducer above as a test script by tomorrow. |
Change https://golang.org/cl/155537 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Followed the quick-start example from the Go 1.11 Wiki page.
Link: https://github.com/golang/go/wiki/Modules#quick-start-example
What did you expect to see?
It work
What did you see instead?
Error after running
go build
the first time.The text was updated successfully, but these errors were encountered: