go-dev-frame/sponge

make graph

Opened this issue · 4 comments

make graph
generating graph ......
go-callvis -skipbrowser -format=svg -nostd -file=poller Poller
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=0x1 addr=0x0 pc=0x62196f]

goroutine 386 [running]:
go/types.(*Checker).handleBailout(0xc000696000, 0xc000877bf0)
/snap/go/current/src/go/types/check.go:404 +0x88
panic({0xaced20?, 0x1002da0?})
/snap/go/current/src/runtime/panic.go:785 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xc53900, 0x1009ca0})
/snap/go/current/src/go/types/sizes.go:229 +0x30f
go/types.(*Config).sizeof(...)
/snap/go/current/src/go/types/sizes.go:334
go/types.representableConst.func1({0xc53900?, 0x1009ca0?})
/snap/go/current/src/go/types/const.go:77 +0x86
go/types.representableConst({0xc572f8, 0x105a0f8}, 0xc000696000, 0x1009ca0, 0xc0008769f8)
/snap/go/current/src/go/types/const.go:93 +0x173
go/types.(*Checker).representation(0xc000696000, 0xc00026b840, 0x1009ca0)
/snap/go/current/src/go/types/const.go:257 +0x65
go/types.(*Checker).implicitTypeAndValue(0xc000696000, 0xc00026b840, {0xc53900, 0x1009ca0})
/snap/go/current/src/go/types/expr.go:377 +0x2d7
go/types.(*Checker).assignment(0xc000696000, 0xc00026b840, {0xc53900, 0x1009ca0}, {0xb6f8c0, 0xe})
/snap/go/current/src/go/types/assignments.go:70 +0x451
go/types.(*Checker).exprInternal(0xc000696000, 0x0, 0xc00026b840, {0xc56310, 0xc00026a2c0}, {0xc53950, 0xc0000f61c0})
/snap/go/current/src/go/types/expr.go:1211 +0x1e0a
go/types.(*Checker).rawExpr(0xc000696000, 0x0, 0xc00026b840, {0xc56310?, 0xc00026a2c0?}, {0xc53950?, 0xc0000f61c0?}, 0x0)
/snap/go/current/src/go/types/expr.go:981 +0x18c
go/types.(*Checker).exprWithHint(0xc000696000, 0xc00026b840, {0xc56310, 0xc00026a2c0}, {0xc53950, 0xc0000f61c0})
/snap/go/current/src/go/types/expr.go:1599 +0x65
go/types.(*Checker).indexedElts(0xc000696000, {0xc0005c6488, 0x24, 0xc000e15f20?}, {0xc53950, 0xc0000f61c0}, 0xffffffffffffffff)
/snap/go/current/src/go/types/index.go:453 +0x12f
go/types.(*Checker).exprInternal(0xc000696000, 0x0, 0xc00026b740, {0xc56310, 0xc000b7f5c0}, {0x0, 0x0})
/snap/go/current/src/go/types/expr.go:1283 +0xe7d
go/types.(*Checker).rawExpr(0xc000696000, 0x0, 0xc00026b740, {0xc56310?, 0xc000b7f5c0?}, {0x0?, 0x0?}, 0x0)
/snap/go/current/src/go/types/expr.go:981 +0x18c
go/types.(*Checker).expr(0xc000696000, 0x0?, 0xc00026b740, {0xc56310?, 0xc000b7f5c0?})
/snap/go/current/src/go/types/expr.go:1549 +0x30
go/types.(*Checker).varDecl(0xc000696000, 0xc000e15c80, {0xc00062a0a8, 0x1, 0x1}, {0x0, 0x0}, {0xc56310, 0xc000b7f5c0})
/snap/go/current/src/go/types/decl.go:513 +0x17b
go/types.(*Checker).objDecl(0xc000696000, {0xc5eb78, 0xc000e15c80}, 0x0)
/snap/go/current/src/go/types/decl.go:188 +0x9a5
go/types.(*Checker).packageObjects(0xc000696000)
/snap/go/current/src/go/types/resolver.go:714 +0x454
go/types.(*Checker).checkFiles(0xc000696000, {0xc000b18000, 0x1, 0x1})
/snap/go/current/src/go/types/check.go:459 +0x15a
go/types.(*Checker).Files(0xc0001ba0e0?, {0xc000b18000?, 0xc000b14060?, 0x6?})
/snap/go/current/src/go/types/check.go:422 +0x75
golang.org/x/tools/go/packages.(*loader).loadPackage(0xc0001ba0e0, 0xc0006f0360)
/home/jihad/go/pkg/mod/golang.org/x/tools@v0.8.0/go/packages/packages.go:1052 +0xa32
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
/home/jihad/go/pkg/mod/golang.org/x/tools@v0.8.0/go/packages/packages.go:851 +0x1a9
sync.(*Once).doSlow(0x0?, 0x0?)
/snap/go/current/src/sync/once.go:76 +0xb4
sync.(*Once).Do(...)
/snap/go/current/src/sync/once.go:67
golang.org/x/tools/go/packages.(*loader).loadRecursive(0x0?, 0x0?)
/home/jihad/go/pkg/mod/golang.org/x/tools@v0.8.0/go/packages/packages.go:839 +0x3b
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1(0x0?)
/home/jihad/go/pkg/mod/golang.org/x/tools@v0.8.0/go/packages/packages.go:846 +0x26
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1 in goroutine 132
/home/jihad/go/pkg/mod/golang.org/x/tools@v0.8.0/go/packages/packages.go:845 +0x94
make: *** [Makefile:35: graph] Error 2

I'm executing make graph locally and this error doesn't appear, my go-callvis version is v0.7.0, try updating the latest go-callvis version: go install github.com/ofabry/go-callvis@latest

and still the same error
mine is :
go-callvis -version
v0.7.0 built from git (unknown) .

i am having another issue now with consul : panic: Unexpected response code: 400 (Invalid service address)
even though i tested the connection on another pure go script , but in sponge for some reason it refuses to connect .

oh there is the issue also of make proto command , the tests are cleaned and need to fill with data again !! maybe there is should be a way to check if grpc method did not change ( or the signature did not change ) then no need to recreate the test for it . and if there is new methods then append to the tests .

Yes, every time you execute the make proto command, the xxx_client_test.go test file in the service directory will be regenerated and overwritten. In the future, the sponge version will be added with the test parameters that are reserved.