• Jay Conrod's avatar
    cmd/go: include GOEXPERIMENT flags in tool id for cache key · 4814e7d5
    Jay Conrod authored
    The go command invokes each tool with -V=full to discover its version
    to compute a tool id. For release versions (that don't include the
    word "devel"), the go command only used the third word in
    the output (e.g., "go1.13"), ignoring any toolchain experiments that
    followed. With this change, the go command will use whole version line
    in the tool id for release versions.
    
    Also, when -V=full is set and there are non-default experiments,
    experiments are no longer printed twice.
    
    Fixes #33091
    
    Change-Id: I19b96f939c7e2fbc5d8befe3659156ee4b58daef
    Reviewed-on: https://go-review.googlesource.com/c/go/+/186200
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
    4814e7d5
flag.go 3.64 KB