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: unnecessary go-get queries during go get golang.org/x/vgo #25565
Comments
The output from
So now I can start to understand with these sequential requests why the operation takes so long. @rsc is this something you want to try and solve for now? I'm thinking perhaps it's not worth the effort... |
What about git clone https://go.googlesource.com/vgo, since that's the source-of-truth repo being used? |
That's super quick:
It's the verifying of meta tags via
That't the output from the make-shift: package main
import (
"bufio"
"fmt"
"io"
"os"
"os/exec"
"time"
)
func main() {
r, w := io.Pipe()
cmd := exec.Command("go", "get", "-v", "-u", "golang.org/x/vgo")
cmd.Stdout = w
cmd.Stderr = w
start := time.Now()
scanner := bufio.NewScanner(r)
go func() {
if err := cmd.Run(); err != nil {
panic(err)
}
w.Close()
}()
for scanner.Scan() {
fmt.Printf("%5.2fs: %v\n", time.Now().Sub(start).Seconds(), scanner.Text())
}
if err := scanner.Err(); err != nil {
fmt.Fprintln(os.Stderr, "reading standard input:", err)
}
} |
Boy that's stupid. Not vgo though. |
I don't know if go get is just completely broken and does this all the time, or if it has to do with the fact that the imports are going into the vendor directory. Either way, once it has downloaded golang.org/x/vgo it should not be asking questions about directories like golang.org/x/vgo/vendor/cmd/go/internal/vet. |
This has to do with the overuse of the vendor directory in vgo, and it doesn't really matter since the old go get code is going away, as is vgo eventually. Going to leave as is and focus on bugs that won't take care of themselves. |
Please answer these questions before submitting your issue. Thanks!
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
)?What did you do?
From a relatively large AWS EC2 instance in Dublin, Ireland:
What did you expect to see?
The
go get
not to take so long.What did you see instead?
It took over 1 minute.
For comparison, the Github clone takes ~1.2 seconds:
But then the problem is:
The text was updated successfully, but these errors were encountered: