google / wire

Compile-time Dependency Injection for Go
Apache License 2.0
13.13k stars 623 forks source link

Sometimes it succeeds, sometimes it fails #406

Closed mzccddkk closed 8 months ago

mzccddkk commented 8 months ago

Describe the bug

When I execute thewire . command, sometimes it succeeds and sometimes it fails(irregular), and the code does not change. When it fails, the error message is no provider found

To Reproduce

Just run the wire . command multiple times

Version

v0.6.0

Additional context

go env

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="~/Library/Caches/go-build"
GOENV="~/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="~/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="~/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.20.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="~/code/wire/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bl/cn33hc291zx8p0mrgmv94fyr0000gn/T/go-build3773963246=/tmp/go-build -gno-record-gcc-switches -fno-common"
mzccddkk commented 8 months ago

It's working fine now