• Russ Cox's avatar
    cmd/go: diagnose go.mod and vendor out of sync in std and cmd · 856b57e0
    Russ Cox authored
    The most common failure mode of the current std/cmd setup is
    going to be people running "go get m@latest" and then not running
    "go mod vendor" and being confused about getting the old m.
    Diagnose and report what to do.
    
    Also, having done the check, when in the standard library,
    switch the go command to -mod=vendor mode.
    This avoids some network accesses I saw when running
    'go clean -modcache' before doing some work in cmd.
    
    Change-Id: I0ba4a66637b67225a9b97a1c89f26f9015b41673
    Reviewed-on: https://go-review.googlesource.com/c/go/+/174528
    Run-TryBot: Russ Cox <rsc@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
    856b57e0
go.mod 245 Bytes