-
Notifications
You must be signed in to change notification settings - Fork 620
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
missing go.sum entry after ran go mod tidy #299
Comments
Possibly related to golang/go#44129 As a hack, you can run |
I can confirm the workaround working |
FWIW, I think the "correct" work-around is to follow the advice here and create a |
I have the same problem. I do have a // +build tools
// Place any runtime dependencies as imports in this file.
// Go modules will be forced to download and install them.
package tools
import (
_ "github.com/google/wire"
) (Go 1.16.7) |
I believe this is because you need to be importing |
Good catch! |
Yes, I'm using the There is some guidelines from here about tracking tools: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module And in my case importing // +build tools
// following https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
package main
import (
_ "github.com/google/wire/cmd/wire"
) |
add import: package tools
import (
_ "github.com/google/subcommands"
) then :
|
you can try |
You can use
go bug
to have a cool, automatically filled out bug template, orfill out the template below.
Describe the bug
Following docs, after initial command
wire
, then aftergo mod tidy
, subsequentgo generate ./...
reports:To Reproduce
I use this command to reproduce the problem:
Expected behavior
go generate ./...
should run without errorVersion
Additional context
Following the error message and run the suggest
go get
commands fixes the problem. But as soon as I rungo mod tidy
,go generate ./...
reports errorThe text was updated successfully, but these errors were encountered: