cmd/go: go build in modules module does not build dependencies #33496
Labels
FrozenDueToAge
modules
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
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
)?set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\martin\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\Development\Go\Test123\vendor
set GOPROXY=
set GORACE=
set GOROOT=D:\Golang
set GOTMPDIR=
set GOTOOLDIR=D:\Golang\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=D:\Development\Go\Test123\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\martin\AppData\Local\Temp\go-build709166158=/tmp/go-build -gno-record-gcc-switches
go env
OutputWhat did you do?
Well this is not really a bug. I am using go modules. I think it would be very helpful if go build (when running in go modules mode) does also build the dependencies. For instance I want to use a protoc-gen-go library which is tightly coupled with the current protobuf library. I have a go.mod that specified "github.com/golang/protobuf v1.3.2" but that only downloads the runtime libraries. The compiler is stripped from the download as (I guess it's not referenced anywhere). I don't really need this kind of tidying. I know I can make a custom script that does
go get -u github.com/golang/protobuf/protoc-gen-go@v1.xxx
but that is redundant since I already specified version in go.mod.
Are there any plans for this thing???
The text was updated successfully, but these errors were encountered: