-
-
Notifications
You must be signed in to change notification settings - Fork 61
golang.org/x/tools deps bumped up #208
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
golang.org/x/tools deps bumped up #208
Conversation
|
Provide an example how to reproduce this in a clean project. |
|
yes, it was not trivial. I tried to reproduce it for a very long time in a clean project. but something worked out. go.mod module example.com/issue
go 1.24.5
require github.com/stephenafamo/bob v0.38.0
require (
github.com/aarondl/json v0.0.0-20221020222930-8b0db17ef1bf // indirect
github.com/aarondl/opt v0.0.0-20230114172057-b91f370c41f0 // indirect
github.com/dave/jennifer v1.6.0 // indirect
github.com/jmattheis/goverter v1.9.0 // indirect
github.com/qdm12/reprint v0.0.0-20200326205758-722754a53494 // indirect
github.com/stephenafamo/scan v0.7.0 // indirect
golang.org/x/mod v0.26.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/tools v0.35.0 // indirect
)
tool github.com/jmattheis/goverter/cmd/goverterconverter.go package govertertest
import (
_ "example.com/issue/model"
)model/model.go package model
import (
"github.com/stephenafamo/bob"
"github.com/stephenafamo/bob/dialect/psql"
"github.com/stephenafamo/bob/dialect/psql/dialect"
)
type Bob struct{}
type BobSlice []*Bob
var Bobs = psql.NewTablex[*Bob, BobSlice, *BobSetter]("", "bob")
type BobSetter struct{}
func (b BobSetter) SetColumns() []string { return nil }
func (b BobSetter) Apply(*dialect.InsertQuery) { return }
func (b BobSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { return nil }so, the issue: $ go run github.com/jmattheis/goverter/cmd/goverter@latest gen example.com/issue
2025/07/24 06:36:53 internal error: package "example.com/issue/model" without types was imported from "example.com/issue"
exit status 1the workaround and in a real project this workaround generates files just as well as my bumpedup version PS. $ go run github.com/gstarikov/goverter/cmd/goverter@hotfix gen example.com/issue |
44ecb85 to
af8aa76
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #208 +/- ##
=======================================
Coverage 95.46% 95.46%
=======================================
Files 49 49
Lines 3243 3243
=======================================
Hits 3096 3096
Misses 114 114
Partials 33 33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for the detailed steps. I've changed this to update only to x/tools v0.31.0 to support building with go1.23. |
I have a problem. My project uses golang.org/x/tools version 0.35.0, but goverter is stuck at version 0.25.0. We use goverter in a build pipeline, and there is a tool conflict - go run goverter returns the error "... imported ... without packages..."