Comments (3)
I have the same issue. Has anyone looked at it yet?
from wire.
@Chris-Sheridan the proposed fix is in #401
from wire.
Yep, the same issue here.
After upgrade to the release Go version 1.22.0
:
$ go run github.com/google/wire/cmd/wire@latest ./...
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102eaa670]
goroutine 92 [running]:
go/types.(*Checker).handleBailout(0x140007a6000, 0x1400089dc78)
/Users/user/sdk/go1.22.0/src/go/types/check.go:367 +0x9c
panic({0x102ff98c0?, 0x103196580?})
/Users/user/sdk/go1.22.0/src/runtime/panic.go:770 +0x124
go/types.(*StdSizes).Sizeof(0x0, {0x103038e18, 0x10319a880})
/Users/user/sdk/go1.22.0/src/go/types/sizes.go:228 +0x320
go/types.(*Config).sizeof(...)
/Users/user/sdk/go1.22.0/src/go/types/sizes.go:333
go/types.representableConst.func1({0x103038e18?, 0x10319a880?})
/Users/user/sdk/go1.22.0/src/go/types/const.go:76 +0x9c
go/types.representableConst({0x10303a808, 0x10318ef40}, 0x140007a6000, 0x10319a880, 0x1400089c078)
/Users/user/sdk/go1.22.0/src/go/types/const.go:92 +0x138
go/types.(*Checker).representation(0x140007a6000, 0x14000890bc0, 0x10319a880)
/Users/user/sdk/go1.22.0/src/go/types/const.go:256 +0x68
go/types.(*Checker).implicitTypeAndValue(0x140007a6000, 0x14000890bc0, {0x103038e18, 0x10319a880})
/Users/user/sdk/go1.22.0/src/go/types/expr.go:375 +0x340
go/types.(*Checker).convertUntyped(0x140007a6000, 0x14000890bc0, {0x103038e18, 0x10319a880})
/Users/user/sdk/go1.22.0/src/go/types/const.go:289 +0x30
go/types.(*Checker).matchTypes(0x140007a6000, 0x14000890b80, 0x14000890bc0)
/Users/user/sdk/go1.22.0/src/go/types/expr.go:926 +0x7c
go/types.(*Checker).binary(0x140007a6000, 0x14000890b80, {0x103039aa0, 0x14000511680}, {0x103039b30, 0x1400050ace0}, {0x10303a070, 0x1400050ad00}, 0x28, 0x133)
/Users/user/sdk/go1.22.0/src/go/types/expr.go:800 +0x114
go/types.(*Checker).exprInternal(0x140007a6000, 0x0, 0x14000890b80, {0x103039aa0, 0x14000511680}, {0x0, 0x0})
/Users/user/sdk/go1.22.0/src/go/types/expr.go:1416 +0x1d4
go/types.(*Checker).rawExpr(0x140007a6000, 0x0, 0x14000890b80, {0x103039aa0?, 0x14000511680?}, {0x0?, 0x0?}, 0x0)
/Users/user/sdk/go1.22.0/src/go/types/expr.go:979 +0x12c
go/types.(*Checker).expr(0x140007a6000, 0x1030391b0?, 0x14000890b80, {0x103039aa0?, 0x14000511680?})
/Users/user/sdk/go1.22.0/src/go/types/expr.go:1513 +0x38
go/types.(*Checker).stmt(0x140007a6000, 0x0, {0x103039e90, 0x140004c7940})
/Users/user/sdk/go1.22.0/src/go/types/stmt.go:570 +0xdb0
go/types.(*Checker).stmtList(0x140007a6000, 0x0, {0x1400050ae60?, 0x0?, 0x0?})
/Users/user/sdk/go1.22.0/src/go/types/stmt.go:121 +0x88
go/types.(*Checker).funcBody(0x140007a6000, 0x103038e18?, {0x140004eb790?, 0x10319aa60?}, 0x140008908c0, 0x14000511710, {0x0?, 0x0?})
/Users/user/sdk/go1.22.0/src/go/types/stmt.go:41 +0x21c
go/types.(*Checker).funcDecl.func1()
/Users/user/sdk/go1.22.0/src/go/types/decl.go:852 +0x44
go/types.(*Checker).processDelayed(0x140007a6000, 0x0)
/Users/user/sdk/go1.22.0/src/go/types/check.go:467 +0x12c
go/types.(*Checker).checkFiles(0x140007a6000, {0x140000580b8, 0x1, 0x1})
/Users/user/sdk/go1.22.0/src/go/types/check.go:411 +0x188
go/types.(*Checker).Files(...)
/Users/user/sdk/go1.22.0/src/go/types/check.go:372
golang.org/x/tools/go/packages.(*loader).loadPackage(0x140001501e0, 0x1400049dd40)
/Users/user/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:819 +0x4f4
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
/Users/user/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:677 +0x178
sync.(*Once).doSlow(0x0?, 0x0?)
/Users/user/sdk/go1.22.0/src/sync/once.go:74 +0x100
sync.(*Once).Do(...)
/Users/user/sdk/go1.22.0/src/sync/once.go:65
golang.org/x/tools/go/packages.(*loader).loadRecursive(0x0?, 0x0?)
/Users/user/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:664 +0x50
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1(0x0?)
/Users/user/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:671 +0x30
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1 in goroutine 65
/Users/user/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:670 +0x84
exit status 2
from wire.
Related Issues (20)
- Missed receiver in generated inject method
- Support for concurrent initialization
- function generated by Wire_gen.go "Cannot find declaration to go to" by Golang JetBrains but still run success HOT 5
- Calling wire.Build with a provider set from a structure variable (For modular buildings)
- wire `sync.Map` throw error HOT 2
- I has bean tried for two days, but failed. I define four struct and it's constructor, I define a init function in wire.go, but I can
- I can't use the init function which from my wire.go in my main.go HOT 3
- wire.NewSet support generics HOT 1
- internal/wire: update the path of wire which go generate run wire cmd
- Wire: not enough arguments in call to xxx
- is wire.FieldsOf support any field ? HOT 2
- Support for request scoped DI code generation HOT 2
- Injecting the subpackage into the parent package results in the error "no provider found for invalid type". HOT 3
- How to use wire.Bind() if concrete implementation is resolved at runtime? HOT 2
- please create new tag for 0675cdc
- go generate ./... no longer works with go 1.22.0 and wire 0.6.0 HOT 3
- go build -mod=vendor ./cmd/wire doesn't work after update to 0.6.0
- go: -mod may only be set to readonly or vendor when in workspace mode, but it is set to "mod" HOT 2
- Sometimes it succeeds, sometimes it fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wire.