Description
Go version
go1.21.1 windows/amd64
Output of go env
in your module/workspace:
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\erikp\AppData\Local\go-build
set GOENV=C:\Users\erikp\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\erikp\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\erikp\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=Z:\golang
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.23.1
set GODEBUG=
set GOTELEMETRY=local
set GOTELEMETRYDIR=C:\Users\erikp\AppData\Roaming\go\telemetry
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=Z:\golang\go-build1240576678=/tmp/go-build -gno-record-gcc-switches
What did you do?
Hi after running go run
command I have unpredictable start times, sometimes, I change something in file like adding log and it compiles in while and sometimes I add log and do
go run -x main.go
I got log WORK=Z:\golang\go-build3974498775
and I'm waiting, and I have no idea what is happening or what is progress of it, and just before build I got full log and app is running.
There can be maybe something in templates ? I use them a lot.
And also I put build directory and go under firewall exclusion and created windows dev drive to minimalize times but nothing helped.
What did you see happen?
Nothing and I hate those predefined github templates
What did you expect to see?
Could be nice to log more of golang progress and maybe decision ? Like "You added + sign so I'm going to rebuild whole application" or something similar. My final build is 22 MB so no big application I guess.
Activity
gabyhelp commentedon Dec 5, 2024
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
seankhliao commentedon Dec 5, 2024
if -v -x don't show anything, then something is blocking go, most likely antivirus or other security software. go can't know why it's being blocked.
erikpa1 commentedon Dec 5, 2024
@seankhliao But first log is there. The rest takes too long.
Do you have some suggestions for windows ? I disabled firewall for tmp folder, for folder where project is,... (wsl ubuntu looks like it has no problem)
Also in Rust or C++ there is no problem with it ,... and they work on similar principles
erikpa1 commentedon Mar 14, 2025
@seankhliao I probably achieved victory,... I installed avast which disabled windows defender, in avast I put exception to User/AppData for "go" and "go-build" folders, performance looks amazing and startup times are sometimes logner, but I'm talking about seconds, not minutes....
(BTW, in windwos I had also exclude folder, didn't help)
This is small step for man, but big for humanity.