gorma
gorma copied to clipboard
Panic when BuildsFrom does not find an action with the Payload correctly set
Hi,
as in the issue title..
Everything works fine when adding the Payload to the action design.
Maybe I can send a PR, or someone else who is very confident with the project can.. I'm pretty new to goa but I think that we can show a friendly error message here.
The error:
goagen bootstrap -d blabla/design
exit status 2
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13a3942]
goroutine 1 [running]:
myproject.com/vendor/github.com/goadesign/gorma/dsl.Payload(0x13e6cc0, 0xc42025f9a0, 0x1478069, 0x4)
/Users/myuser/Work/web/go/src/myproject.com/vendor/github.com/goadesign/gorma/dsl/relationalmodel.go:152 +0xf2
myproject.com/design.glob..func5.1.1.1()
/Users/myuser/Work/web/go/src/myproject.com/design/models.go:14 +0x7d
myproject.com/vendor/github.com/goadesign/goa/dslengine.Execute(0x14aa338, 0x16a00a0, 0xc4202971a0, 0x16a00a0)
/Users/myuser/Work/web/go/src/myproject.com/vendor/github.com/goadesign/goa/dslengine/runner.go:132 +0x93
myproject.com/vendor/github.com/goadesign/goa/dslengine.runSet(0xc42025f990, 0x1, 0x1, 0x0, 0x0)
/Users/myuser/Work/web/go/src/myproject.com/vendor/github.com/goadesign/goa/dslengine/runner.go:298 +0x17a
myproject.com/vendor/github.com/goadesign/gorma.(*StorageGroupDefinition).IterateSets.func1.1.2(0xc4202971a0, 0x0, 0x0)
/Users/myuser/Work/web/go/src/myproject.com/vendor/github.com/goadesign/gorma/storagegroup.go:90 +0x87
myproject.com/vendor/github.com/goadesign/gorma.(*RelationalModelDefinition).IterateBuildSources(0xc420212ea0, 0xc4201fbc10, 0x0, 0x0)
/Users/myuser/Work/web/go/src/myproject.com/vendor/github.com/goadesign/gorma/relationalmodel.go:174 +0x58
myproject.com/vendor/github.com/goadesign/gorma.(*StorageGroupDefinition).IterateSets.func1.1(0xc420212ea0, 0xc420296f00, 0x1477be1)
/Users/myuser/Work/web/go/src/myproject.com/vendor/github.com/goadesign/gorma/storagegroup.go:92 +0xf9
myproject.com/vendor/github.com/goadesign/gorma.(*RelationalStoreDefinition).IterateModels(0xc4202886c0, 0xc4201fbd48, 0x1, 0x0)
/Users/myuser/Work/web/go/src/myproject.com/vendor/github.com/goadesign/gorma/relationalstore.go:51 +0x1c9
myproject.com/vendor/github.com/goadesign/gorma.(*StorageGroupDefinition).IterateSets.func1(0xc4202886c0, 0xc420296b70, 0x147a2ec)
/Users/myuser/Work/web/go/src/myproject.com/vendor/github.com/goadesign/gorma/storagegroup.go:95 +0xbe
myproject.com/vendor/github.com/goadesign/gorma.(*StorageGroupDefinition).IterateStores(0xc42024ca80, 0xc4201fbe68, 0x1, 0x0)
/Users/myuser/Work/web/go/src/myproject.com/vendor/github.com/goadesign/gorma/storagegroup.go:35 +0x1d2
myproject.com/vendor/github.com/goadesign/gorma.(*StorageGroupDefinition).IterateSets(0xc42024ca80, 0x14aa3a0)
/Users/myuser/Work/web/go/src/myproject.com/vendor/github.com/goadesign/gorma/storagegroup.go:97 +0xb5
myproject.com/vendor/github.com/goadesign/goa/dslengine.Run(0x16a16e0, 0xc4202652e0)
/Users/myuser/Work/web/go/src/myproject.com/vendor/github.com/goadesign/goa/dslengine/runner.go:97 +0x103
main.main()
/Users/myuser/Work/web/go/src/myproject.com/goagen859935429/main.go:25 +0x5a
go env:
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/myuser/Work/web/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/z4/pz3l5h_s7m775dq8y480th1r0000gn/T/go-build343316665=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
would love a PR, I'm traveling solid for the next month won't be able to look at this for quite a while!
I really hope to make it!