-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go generate ./... no longer works with go 1.22.0 and wire 0.6.0 #403
Comments
Have the same issue for It is fixable by removing "-mod=mod" from the generated wire_gen.go file. But it returns after the next code generation. Here is the problematic line: https://github.com/google/wire/blame/e57deea2f8bbe2386b756f2555e02de33e20a3f0/internal/wire/wire.go#L270 It makes wire not fully compatible with go workspaces |
One solution that would work for me: |
I meet the same problem. In my case |
Describe the bug
wire ./...
seems to work fine, butgo generate ./...
now fails due to the use of go run with -mod=modTo Reproduce
Create a wired module and try to run generate to re-wire it.
Expected behavior
go generate should work just as well as wire - the generated
//go:generate
line should not be so different that it cannot run.Version
0.6.0
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: