{"action":"opened","issue":{"url":"https://api.github.com/repos/goadesign/goa/issues/854","repository_url":"https://api.github.com/repos/goadesign/goa","labels_url":"https://api.github.com/repos/goadesign/goa/issues/854/labels{/name}","comments_url":"https://api.github.com/repos/goadesign/goa/issues/854/comments","events_url":"https://api.github.com/repos/goadesign/goa/issues/854/events","html_url":"https://github.com/goadesign/goa/issues/854","id":187819593,"number":854,"title":"Ran into issue with using type name with ArrayOf for recursive data types","user":{"login":"illyabusigin","id":814431,"avatar_url":"https://avatars.githubusercontent.com/u/814431?v=3","gravatar_id":"","url":"https://api.github.com/users/illyabusigin","html_url":"https://github.com/illyabusigin","followers_url":"https://api.github.com/users/illyabusigin/followers","following_url":"https://api.github.com/users/illyabusigin/following{/other_user}","gists_url":"https://api.github.com/users/illyabusigin/gists{/gist_id}","starred_url":"https://api.github.com/users/illyabusigin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/illyabusigin/subscriptions","organizations_url":"https://api.github.com/users/illyabusigin/orgs","repos_url":"https://api.github.com/users/illyabusigin/repos","events_url":"https://api.github.com/users/illyabusigin/events{/privacy}","received_events_url":"https://api.github.com/users/illyabusigin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-07T20:33:31Z","updated_at":"2016-11-07T20:33:31Z","closed_at":null,"body":"Hi there!\r\n\r\n## Issue\r\nI was trying to setup a recursive Type value like so:\r\n```go\r\n// StructureNodePayload represnts a node in the structure hierarchy user type\r\nvar StructureNodePayload = Type(\"StructureNodePayload\", func() {\r\n\tAttribute(\"id\", String, \"The identifier for the node. This should correspond to structure identifier.\", func() {\r\n\t\tExample(\"fQLPQBLFjGKmmmw8sWmGU\")\r\n\t})\r\n\r\n\tAttribute(\"children\", ArrayOf(\"StructureNodePayload\"), \"Child nodes associated with the structure, if any.\")\r\n\tRequired(\"id\")\r\n})\r\n```\r\n\r\nI attempted to generate the code using the following `goagen` command: `goagen app -d test_goa_issue/design`\r\n\r\nThe above code causes a goroutine stack limit panic:\r\n```\r\nexit status 2\r\nruntime: goroutine stack exceeds 1000000000-byte limit\r\nfatal error: stack overflow\r\n\r\nruntime stack:\r\nruntime.throw(0x416d14, 0xe)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/panic.go:566 +0x95\r\nruntime.newstack()\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/stack.go:1061 +0x416\r\nruntime.morestack()\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/asm_amd64.s:366 +0x7f\r\n\r\ngoroutine 1 [running]:\r\nreflect.(*rtype).MethodByName(0x39b580, 0x42af68, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/type.go:858 fp=0xc440500278 sp=0xc440500270\r\nreflect.Value.MethodByName(0x39b580, 0xc42693e300, 0x15, 0x42af68, 0x5, 0x15, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/value.go:1142 +0x78 fp=0xc440500348 sp=0xc440500278\r\ntext/template.(*state).evalField(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0x42af68, 0x5, 0x6059e0, 0xc4201708a0, 0xc440500828, 0x1, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:548 +0x153 fp=0xc440500630 sp=0xc440500348\r\ntext/template.(*state).evalFieldChain(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0x39b580, 0xc42693e300, 0x15, 0x6059e0, 0xc4201708a0, 0xc4201721e0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:520 +0x22f fp=0xc4405006e8 sp=0xc440500630\r\ntext/template.(*state).evalFieldNode(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0xc4201708a0, 0xc440500828, 0x1, 0x1, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:484 +0x114 fp=0xc4405007a0 sp=0xc4405006e8\r\ntext/template.(*state).evalArg(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0x6093c0, 0x37d180, 0x6059e0, 0xc4201708a0, 0xc426935100, 0xc426936f28, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:723 +0xdcc fp=0xc440500888 sp=0xc4405007a0\r\ntext/template.(*state).evalCall(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0x391ae0, 0x455a60, 0x13, 0x605920, 0xc420170840, 0x42af63, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:633 +0x29f fp=0xc440500a98 sp=0xc440500888\r\ntext/template.(*state).evalFunction(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0xc420170870, 0x605920, 0xc420170840, 0xc4201621c0, 0x3, 0x4, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:530 +0x195 fp=0xc440500b90 sp=0xc440500a98\r\ntext/template.(*state).evalCommand(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0xc420170840, 0x0, 0x0, 0x0, 0xc440500cb8, 0x171442, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:427 +0x6f7 fp=0xc440500c58 sp=0xc440500b90\r\ntext/template.(*state).evalPipeline(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0xc420176320, 0x37d940, 0xc426935120, 0x198)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:400 +0xee fp=0xc440500d48 sp=0xc440500c58\r\ntext/template.(*state).evalArg(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0x6093c0, 0x37d180, 0x605c20, 0xc420176320, 0x37d940, 0xc426935120, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:727 +0x6e2 fp=0xc440500e30 sp=0xc440500d48\r\ntext/template.(*state).evalCall(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0x39cd40, 0x455ac0, 0x13, 0x605920, 0xc4201707b0, 0x42af41, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:633 +0x29f fp=0xc440501040 sp=0xc440500e30\r\ntext/template.(*state).evalFunction(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0xc4201707e0, 0x605920, 0xc4201707b0, 0xc42016e280, 0x4, 0x4, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:530 +0x195 fp=0xc440501138 sp=0xc440501040\r\ntext/template.(*state).evalCommand(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0xc4201707b0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:427 +0x6f7 fp=0xc440501200 sp=0xc440501138\r\ntext/template.(*state).evalPipeline(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0xc4201762d0, 0xc41fcb60e6, 0xc4405013c0, 0x106ee)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:400 +0xee fp=0xc4405012f0 sp=0xc440501200\r\ntext/template.(*state).walk(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0x605800, 0xc4201748a0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:226 +0x423 fp=0xc440501378 sp=0xc4405012f0\r\ntext/template.(*state).walk(0xc440501490, 0x39b580, 0xc42693e300, 0x15, 0x605b00, 0xc420170750)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:234 +0x13d fp=0xc440501400 sp=0xc440501378\r\ntext/template.(*Template).execute(0xc42016e1c0, 0x5fea00, 0xc426938460, 0x39b580, 0xc42693e300, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:189 +0x204 fp=0xc4405014e8 sp=0xc440501400\r\ntext/template.(*Template).Execute(0xc42016e1c0, 0x5fea00, 0xc426938460, 0x39b580, 0xc42693e300, 0x61e530, 0xc4269350f0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:175 +0x53 fp=0xc440501530 sp=0xc4405014e8\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RunTemplate(0xc42016e1c0, 0x39b580, 0xc42693e300, 0xc440501620, 0xc4269350f0)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/types.go:561 +0x8f fp=0xc440501580 sp=0xc440501530\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer(0xc4201de280, 0xc4269350d0, 0xa, 0x3, 0xc440501bb0, 0x1, 0x1, 0x0, 0x2)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:90 +0x86e fp=0xc440501850 sp=0xc440501580\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer.func1(0x40d185, 0x8, 0xc4201de280, 0x8, 0xc42017d410)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:74 +0x748 fp=0xc440501a50 sp=0xc440501850\r\ntest_goa_issue/vendor/github.com/goadesign/goa/design.Object.IterateAttributes(0xc4201b98f0, 0xc440501c78, 0xc420169288, 0xc440501b76)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/design/types.go:537 +0x1e1 fp=0xc440501b30 sp=0xc440501a50\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer(0xc4201de080, 0x42af5f, 0x1, 0x2, 0x63e5c0, 0x1, 0x1, 0x0, 0x0)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:83 +0x28a fp=0xc440501e00 sp=0xc440501b30\r\nruntime.call128(0xc4203b43c0, 0x455ac0, 0xc426940280, 0x3800000048)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/asm_amd64.s:481 +0x66 fp=0xc440501e90 sp=0xc440501e00\r\nreflect.Value.call(0x39cd40, 0x455ac0, 0x13, 0x401ccd, 0x4, 0xc426940230, 0x4, 0x3, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/value.go:434 +0x5c8 fp=0xc4405021e0 sp=0xc440501e90\r\nreflect.Value.Call(0x39cd40, 0x455ac0, 0x13, 0xc426940230, 0x3, 0x3, 0x605c20, 0xc420176320, 0x37d180)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/value.go:302 +0xa4 fp=0xc440502248 sp=0xc4405021e0\r\ntext/template.(*state).evalCall(0xc4405028a8, 0x39b580, 0xc42693e270, 0x15, 0x39cd40, 0x455ac0, 0x13, 0x605920, 0xc4201707b0, 0x42af41, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:658 +0x530 fp=0xc440502458 sp=0xc440502248\r\ntext/template.(*state).evalFunction(0xc4405028a8, 0x39b580, 0xc42693e270, 0x15, 0xc4201707e0, 0x605920, 0xc4201707b0, 0xc42016e280, 0x4, 0x4, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:530 +0x195 fp=0xc440502550 sp=0xc440502458\r\ntext/template.(*state).evalCommand(0xc4405028a8, 0x39b580, 0xc42693e270, 0x15, 0xc4201707b0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:427 +0x6f7 fp=0xc440502618 sp=0xc440502550\r\ntext/template.(*state).evalPipeline(0xc4405028a8, 0x39b580, 0xc42693e270, 0x15, 0xc4201762d0, 0xc41fcb60ea, 0xc4405027d8, 0x106ee)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:400 +0xee fp=0xc440502708 sp=0xc440502618\r\ntext/template.(*state).walk(0xc4405028a8, 0x39b580, 0xc42693e270, 0x15, 0x605800, 0xc4201748a0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:226 +0x423 fp=0xc440502790 sp=0xc440502708\r\ntext/template.(*state).walk(0xc4405028a8, 0x39b580, 0xc42693e270, 0x15, 0x605b00, 0xc420170750)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:234 +0x13d fp=0xc440502818 sp=0xc440502790\r\ntext/template.(*Template).execute(0xc42016e1c0, 0x5fea00, 0xc4269383f0, 0x39b580, 0xc42693e270, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:189 +0x204 fp=0xc440502900 sp=0xc440502818\r\ntext/template.(*Template).Execute(0xc42016e1c0, 0x5fea00, 0xc4269383f0, 0x39b580, 0xc42693e270, 0x61e530, 0xc426935030)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:175 +0x53 fp=0xc440502948 sp=0xc440502900\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RunTemplate(0xc42016e1c0, 0x39b580, 0xc42693e270, 0xc440502a38, 0xc426935030)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/types.go:561 +0x8f fp=0xc440502998 sp=0xc440502948\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer(0xc4201de280, 0xc426935010, 0xa, 0x3, 0xc440502fc8, 0x1, 0x1, 0x0, 0x2)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:90 +0x86e fp=0xc440502c68 sp=0xc440502998\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer.func1(0x40d185, 0x8, 0xc4201de280, 0x8, 0xc42017d410)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:74 +0x748 fp=0xc440502e68 sp=0xc440502c68\r\ntest_goa_issue/vendor/github.com/goadesign/goa/design.Object.IterateAttributes(0xc4201b98f0, 0xc440503090, 0xc420169288, 0xc440502f8e)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/design/types.go:537 +0x1e1 fp=0xc440502f48 sp=0xc440502e68\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer(0xc4201de080, 0x42af5f, 0x1, 0x2, 0x63e5c0, 0x1, 0x1, 0x0, 0x0)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:83 +0x28a fp=0xc440503218 sp=0xc440502f48\r\nruntime.call128(0xc4203b43c0, 0x455ac0, 0xc4269401e0, 0x3800000048)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/asm_amd64.s:481 +0x66 fp=0xc4405032a8 sp=0xc440503218\r\nreflect.Value.call(0x39cd40, 0x455ac0, 0x13, 0x401ccd, 0x4, 0xc426940190, 0x4, 0x3, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/value.go:434 +0x5c8 fp=0xc4405035f8 sp=0xc4405032a8\r\nreflect.Value.Call(0x39cd40, 0x455ac0, 0x13, 0xc426940190, 0x3, 0x3, 0x605c20, 0xc420176320, 0x37d180)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/value.go:302 +0xa4 fp=0xc440503660 sp=0xc4405035f8\r\ntext/template.(*state).evalCall(0xc440503cc0, 0x39b580, 0xc42693e1e0, 0x15, 0x39cd40, 0x455ac0, 0x13, 0x605920, 0xc4201707b0, 0x42af41, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:658 +0x530 fp=0xc440503870 sp=0xc440503660\r\ntext/template.(*state).evalFunction(0xc440503cc0, 0x39b580, 0xc42693e1e0, 0x15, 0xc4201707e0, 0x605920, 0xc4201707b0, 0xc42016e280, 0x4, 0x4, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:530 +0x195 fp=0xc440503968 sp=0xc440503870\r\ntext/template.(*state).evalCommand(0xc440503cc0, 0x39b580, 0xc42693e1e0, 0x15, 0xc4201707b0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:427 +0x6f7 fp=0xc440503a30 sp=0xc440503968\r\ntext/template.(*state).evalPipeline(0xc440503cc0, 0x39b580, 0xc42693e1e0, 0x15, 0xc4201762d0, 0xc41fcb60ef, 0xc440503bf0, 0x106ee)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:400 +0xee fp=0xc440503b20 sp=0xc440503a30\r\ntext/template.(*state).walk(0xc440503cc0, 0x39b580, 0xc42693e1e0, 0x15, 0x605800, 0xc4201748a0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:226 +0x423 fp=0xc440503ba8 sp=0xc440503b20\r\ntext/template.(*state).walk(0xc440503cc0, 0x39b580, 0xc42693e1e0, 0x15, 0x605b00, 0xc420170750)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:234 +0x13d fp=0xc440503c30 sp=0xc440503ba8\r\ntext/template.(*Template).execute(0xc42016e1c0, 0x5fea00, 0xc426938380, 0x39b580, 0xc42693e1e0, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:189 +0x204 fp=0xc440503d18 sp=0xc440503c30\r\ntext/template.(*Template).Execute(0xc42016e1c0, 0x5fea00, 0xc426938380, 0x39b580, 0xc42693e1e0, 0x61e530, 0xc426934f70)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:175 +0x53 fp=0xc440503d60 sp=0xc440503d18\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RunTemplate(0xc42016e1c0, 0x39b580, 0xc42693e1e0, 0xc440503e50, 0xc426934f70)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/types.go:561 +0x8f fp=0xc440503db0 sp=0xc440503d60\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer(0xc4201de280, 0xc426934f50, 0xa, 0x3, 0xc4405043e0, 0x1, 0x1, 0x0, 0x2)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:90 +0x86e fp=0xc440504080 sp=0xc440503db0\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer.func1(0x40d185, 0x8, 0xc4201de280, 0x8, 0xc42017d410)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:74 +0x748 fp=0xc440504280 sp=0xc440504080\r\ntest_goa_issue/vendor/github.com/goadesign/goa/design.Object.IterateAttributes(0xc4201b98f0, 0xc4405044a8, 0xc420169288, 0xc4405043a6)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/design/types.go:537 +0x1e1 fp=0xc440504360 sp=0xc440504280\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer(0xc4201de080, 0x42af5f, 0x1, 0x2, 0x63e5c0, 0x1, 0x1, 0x0, 0x0)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:83 +0x28a fp=0xc440504630 sp=0xc440504360\r\nruntime.call128(0xc4203b43c0, 0x455ac0, 0xc426940140, 0x3800000048)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/asm_amd64.s:481 +0x66 fp=0xc4405046c0 sp=0xc440504630\r\nreflect.Value.call(0x39cd40, 0x455ac0, 0x13, 0x401ccd, 0x4, 0xc4269400f0, 0x4, 0x3, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/value.go:434 +0x5c8 fp=0xc440504a10 sp=0xc4405046c0\r\nreflect.Value.Call(0x39cd40, 0x455ac0, 0x13, 0xc4269400f0, 0x3, 0x3, 0x605c20, 0xc420176320, 0x37d180)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/value.go:302 +0xa4 fp=0xc440504a78 sp=0xc440504a10\r\ntext/template.(*state).evalCall(0xc4405050d8, 0x39b580, 0xc42693e150, 0x15, 0x39cd40, 0x455ac0, 0x13, 0x605920, 0xc4201707b0, 0x42af41, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:658 +0x530 fp=0xc440504c88 sp=0xc440504a78\r\ntext/template.(*state).evalFunction(0xc4405050d8, 0x39b580, 0xc42693e150, 0x15, 0xc4201707e0, 0x605920, 0xc4201707b0, 0xc42016e280, 0x4, 0x4, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:530 +0x195 fp=0xc440504d80 sp=0xc440504c88\r\ntext/template.(*state).evalCommand(0xc4405050d8, 0x39b580, 0xc42693e150, 0x15, 0xc4201707b0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:427 +0x6f7 fp=0xc440504e48 sp=0xc440504d80\r\ntext/template.(*state).evalPipeline(0xc4405050d8, 0x39b580, 0xc42693e150, 0x15, 0xc4201762d0, 0xc41fcb60f3, 0xc440505008, 0x106ee)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:400 +0xee fp=0xc440504f38 sp=0xc440504e48\r\ntext/template.(*state).walk(0xc4405050d8, 0x39b580, 0xc42693e150, 0x15, 0x605800, 0xc4201748a0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:226 +0x423 fp=0xc440504fc0 sp=0xc440504f38\r\ntext/template.(*state).walk(0xc4405050d8, 0x39b580, 0xc42693e150, 0x15, 0x605b00, 0xc420170750)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:234 +0x13d fp=0xc440505048 sp=0xc440504fc0\r\ntext/template.(*Template).execute(0xc42016e1c0, 0x5fea00, 0xc426938310, 0x39b580, 0xc42693e150, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:189 +0x204 fp=0xc440505130 sp=0xc440505048\r\ntext/template.(*Template).Execute(0xc42016e1c0, 0x5fea00, 0xc426938310, 0x39b580, 0xc42693e150, 0x61e530, 0xc426934eb0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:175 +0x53 fp=0xc440505178 sp=0xc440505130\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RunTemplate(0xc42016e1c0, 0x39b580, 0xc42693e150, 0xc440505268, 0xc426934eb0)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/types.go:561 +0x8f fp=0xc4405051c8 sp=0xc440505178\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer(0xc4201de280, 0xc426934e90, 0xa, 0x3, 0xc4405057f8, 0x1, 0x1, 0x0, 0x2)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:90 +0x86e fp=0xc440505498 sp=0xc4405051c8\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer.func1(0x40d185, 0x8, 0xc4201de280, 0x8, 0xc42017d410)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:74 +0x748 fp=0xc440505698 sp=0xc440505498\r\ntest_goa_issue/vendor/github.com/goadesign/goa/design.Object.IterateAttributes(0xc4201b98f0, 0xc4405058c0, 0xc420169288, 0xc4405057be)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/design/types.go:537 +0x1e1 fp=0xc440505778 sp=0xc440505698\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer(0xc4201de080, 0x42af5f, 0x1, 0x2, 0x63e5c0, 0x1, 0x1, 0x0, 0x0)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:83 +0x28a fp=0xc440505a48 sp=0xc440505778\r\nruntime.call128(0xc4203b43c0, 0x455ac0, 0xc4269400a0, 0x3800000048)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/asm_amd64.s:481 +0x66 fp=0xc440505ad8 sp=0xc440505a48\r\nreflect.Value.call(0x39cd40, 0x455ac0, 0x13, 0x401ccd, 0x4, 0xc426940050, 0x4, 0x3, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/value.go:434 +0x5c8 fp=0xc440505e28 sp=0xc440505ad8\r\nreflect.Value.Call(0x39cd40, 0x455ac0, 0x13, 0xc426940050, 0x3, 0x3, 0x605c20, 0xc420176320, 0x37d180)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/value.go:302 +0xa4 fp=0xc440505e90 sp=0xc440505e28\r\ntext/template.(*state).evalCall(0xc4405064f0, 0x39b580, 0xc42693e0c0, 0x15, 0x39cd40, 0x455ac0, 0x13, 0x605920, 0xc4201707b0, 0x42af41, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:658 +0x530 fp=0xc4405060a0 sp=0xc440505e90\r\ntext/template.(*state).evalFunction(0xc4405064f0, 0x39b580, 0xc42693e0c0, 0x15, 0xc4201707e0, 0x605920, 0xc4201707b0, 0xc42016e280, 0x4, 0x4, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:530 +0x195 fp=0xc440506198 sp=0xc4405060a0\r\ntext/template.(*state).evalCommand(0xc4405064f0, 0x39b580, 0xc42693e0c0, 0x15, 0xc4201707b0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:427 +0x6f7 fp=0xc440506260 sp=0xc440506198\r\ntext/template.(*state).evalPipeline(0xc4405064f0, 0x39b580, 0xc42693e0c0, 0x15, 0xc4201762d0, 0xc41fcb60f8, 0xc440506420, 0x106ee)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:400 +0xee fp=0xc440506350 sp=0xc440506260\r\ntext/template.(*state).walk(0xc4405064f0, 0x39b580, 0xc42693e0c0, 0x15, 0x605800, 0xc4201748a0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:226 +0x423 fp=0xc4405063d8 sp=0xc440506350\r\ntext/template.(*state).walk(0xc4405064f0, 0x39b580, 0xc42693e0c0, 0x15, 0x605b00, 0xc420170750)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:234 +0x13d fp=0xc440506460 sp=0xc4405063d8\r\ntext/template.(*Template).execute(0xc42016e1c0, 0x5fea00, 0xc4269382a0, 0x39b580, 0xc42693e0c0, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:189 +0x204 fp=0xc440506548 sp=0xc440506460\r\ntext/template.(*Template).Execute(0xc42016e1c0, 0x5fea00, 0xc4269382a0, 0x39b580, 0xc42693e0c0, 0x61e530, 0xc426934df0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:175 +0x53 fp=0xc440506590 sp=0xc440506548\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RunTemplate(0xc42016e1c0, 0x39b580, 0xc42693e0c0, 0xc440506680, 0xc426934df0)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/types.go:561 +0x8f fp=0xc4405065e0 sp=0xc440506590\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer(0xc4201de280, 0xc426934dd0, 0xa, 0x3, 0xc440506c10, 0x1, 0x1, 0x0, 0x2)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:90 +0x86e fp=0xc4405068b0 sp=0xc4405065e0\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer.func1(0x40d185, 0x8, 0xc4201de280, 0x8, 0xc42017d410)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:74 +0x748 fp=0xc440506ab0 sp=0xc4405068b0\r\ntest_goa_issue/vendor/github.com/goadesign/goa/design.Object.IterateAttributes(0xc4201b98f0, 0xc440506cd8, 0xc420169288, 0xc440506bd6)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/design/types.go:537 +0x1e1 fp=0xc440506b90 sp=0xc440506ab0\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RecursiveFinalizer(0xc4201de080, 0x42af5f, 0x1, 0x2, 0x63e5c0, 0x1, 0x1, 0x0, 0x0)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/finalizer.go:83 +0x28a fp=0xc440506e60 sp=0xc440506b90\r\nruntime.call128(0xc4203b43c0, 0x455ac0, 0xc426940000, 0x3800000048)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/asm_amd64.s:481 +0x66 fp=0xc440506ef0 sp=0xc440506e60\r\nreflect.Value.call(0x39cd40, 0x455ac0, 0x13, 0x401ccd, 0x4, 0xc426931f90, 0x4, 0x3, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/value.go:434 +0x5c8 fp=0xc440507240 sp=0xc440506ef0\r\nreflect.Value.Call(0x39cd40, 0x455ac0, 0x13, 0xc426931f90, 0x3, 0x3, 0x605c20, 0xc420176320, 0x37d180)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/reflect/value.go:302 +0xa4 fp=0xc4405072a8 sp=0xc440507240\r\ntext/template.(*state).evalCall(0xc440507908, 0x39b580, 0xc42693e030, 0x15, 0x39cd40, 0x455ac0, 0x13, 0x605920, 0xc4201707b0, 0x42af41, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:658 +0x530 fp=0xc4405074b8 sp=0xc4405072a8\r\ntext/template.(*state).evalFunction(0xc440507908, 0x39b580, 0xc42693e030, 0x15, 0xc4201707e0, 0x605920, 0xc4201707b0, 0xc42016e280, 0x4, 0x4, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:530 +0x195 fp=0xc4405075b0 sp=0xc4405074b8\r\ntext/template.(*state).evalCommand(0xc440507908, 0x39b580, 0xc42693e030, 0x15, 0xc4201707b0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:427 +0x6f7 fp=0xc440507678 sp=0xc4405075b0\r\ntext/template.(*state).evalPipeline(0xc440507908, 0x39b580, 0xc42693e030, 0x15, 0xc4201762d0, 0xc41fcb60fc, 0xc440507838, 0x106ee)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:400 +0xee fp=0xc440507768 sp=0xc440507678\r\ntext/template.(*state).walk(0xc440507908, 0x39b580, 0xc42693e030, 0x15, 0x605800, 0xc4201748a0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:226 +0x423 fp=0xc4405077f0 sp=0xc440507768\r\ntext/template.(*state).walk(0xc440507908, 0x39b580, 0xc42693e030, 0x15, 0x605b00, 0xc420170750)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:234 +0x13d fp=0xc440507878 sp=0xc4405077f0\r\ntext/template.(*Template).execute(0xc42016e1c0, 0x5fea00, 0xc426938230, 0x39b580, 0xc42693e030, 0x0, 0x0)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:189 +0x204 fp=0xc440507960 sp=0xc440507878\r\ntext/template.(*Template).Execute(0xc42016e1c0, 0x5fea00, 0xc426938230, 0x39b580, 0xc42693e030, 0x61e530, 0xc426934d30)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/text/template/exec.go:175 +0x53 fp=0xc4405079a8 sp=0xc440507960\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen.RunTemplate(0xc42016e1c0, 0x39b580, 0xc42693e030, 0xc440507a98, 0xc426934d30)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/codegen/types.go:561 +0x8f fp=0xc4405079f8 sp=0xc4405079a8\r\n...additional frames elided...\r\n\r\ngoroutine 17 [syscall, locked to thread]:\r\nruntime.goexit()\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/asm_amd64.s:2086 +0x1\r\n\r\ngoroutine 25 [syscall]:\r\nos/signal.signal_recv(0xc4201b47a8)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/sigqueue.go:116 +0x157\r\nos/signal.loop()\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/os/signal/signal_unix.go:22 +0x22\r\ncreated by os/signal.init.1\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/os/signal/signal_unix.go:28 +0x41\r\n\r\ngoroutine 26 [chan receive]:\r\ntest_goa_issue/vendor/github.com/goadesign/goa/goagen/utils.Catch(0x0, 0x0, 0x0, 0xc420173fe0)\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/utils/signal.go:15 +0x93\r\ncreated by test_goa_issue/vendor/github.com/goadesign/goa/goagen/gen_app.(*Generator).Generate\r\n\t/Users/illyabusigin/Documents/code/go/src/test_goa_issue/vendor/github.com/goadesign/goa/goagen/gen_app/generator.go:57 +0xfa\r\n\r\ngoroutine 15 [select, locked to thread]:\r\nruntime.gopark(0x455840, 0x0, 0x407d49, 0x6, 0x18, 0x2)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/proc.go:259 +0x13a\r\nruntime.selectgoImpl(0xc42002cf30, 0x0, 0x18)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/select.go:423 +0x11d9\r\nruntime.selectgo(0xc42002cf30)\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/select.go:238 +0x1c\r\nruntime.ensureSigM.func1()\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/signal1_unix.go:304 +0x2d1\r\nruntime.goexit()\r\n\t/usr/local/Cellar/go/1.7.3/libexec/src/runtime/asm_amd64.s:2086 +0x1\r\n```\r\n\r\n### Steps To Reproduce\r\n\r\napi.go\r\n```\r\npackage design\r\n\r\nimport (\r\n\t. \"github.com/goadesign/goa/design\"\r\n\t. \"github.com/goadesign/goa/design/apidsl\"\r\n)\r\n\r\n// This is the api definition used by goa to generate the API\r\nvar _ = API(\"test-api\", func() {\r\n\tScheme(\"https\")\r\n\r\n\tTitle(\"API\")\r\n\tDescription(\"TBD\")\r\n\r\n\tDocs(func() {\r\n\t\tDescription(\"\")\r\n\t\tURL(\"\")\r\n\t})\r\n\r\n\t// Use basic auth to obtain a JWT token\r\n\tBasicAuthSecurity(\"password\", func() {\r\n\t\tDescription(\"Basic auth is used to obtain a JSON web token for a tenant\")\r\n\t})\r\n\r\n})\r\n```\r\n\r\nrecursive.go\r\n```\r\npackage design\r\n\r\nimport (\r\n\t. \"github.com/goadesign/goa/design\"\r\n\t. \"github.com/goadesign/goa/design/apidsl\"\r\n)\r\n\r\n// StructureNodePayload represnts a node in the structure hierarchy user type\r\nvar StructureNodePayload = Type(\"StructureNodePayload\", func() {\r\n\tAttribute(\"id\", String, \"The identifier for the node. This should correspond to structure identifier.\", func() {\r\n\t\tExample(\"fQLPQBLFjGKmmmw8sWmGU\")\r\n\t})\r\n\r\n\tAttribute(\"children\", ArrayOf(\"StructureNodePayload\"), \"Child nodes associated with the structure, if any.\")\r\n\tRequired(\"id\")\r\n})\r\n```\r\n\r\nRun: `goagen app -d test_goa_issue/design`\r\n\r\n"}}
{"actor":{"display_login":"illyabusigin"}}