{"action":"created","issue":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/26","repository_url":"https://api.github.com/repos/kaitai-io/kaitai_struct","labels_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/26/comments","events_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/26/events","html_url":"https://github.com/kaitai-io/kaitai_struct/issues/26","id":176165909,"number":26,"title":"Unable to determine type for `field` in type List(kaitai_struct)","user":{"login":"aki017","id":1407394,"avatar_url":"https://avatars.githubusercontent.com/u/1407394?v=3","gravatar_id":"","url":"https://api.github.com/users/aki017","html_url":"https://github.com/aki017","followers_url":"https://api.github.com/users/aki017/followers","following_url":"https://api.github.com/users/aki017/following{/other_user}","gists_url":"https://api.github.com/users/aki017/gists{/gist_id}","starred_url":"https://api.github.com/users/aki017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aki017/subscriptions","organizations_url":"https://api.github.com/users/aki017/orgs","repos_url":"https://api.github.com/users/aki017/repos","events_url":"https://api.github.com/users/aki017/events{/privacy}","received_events_url":"https://api.github.com/users/aki017/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"GreyCat","id":157154,"avatar_url":"https://avatars.githubusercontent.com/u/157154?v=3","gravatar_id":"","url":"https://api.github.com/users/GreyCat","html_url":"https://github.com/GreyCat","followers_url":"https://api.github.com/users/GreyCat/followers","following_url":"https://api.github.com/users/GreyCat/following{/other_user}","gists_url":"https://api.github.com/users/GreyCat/gists{/gist_id}","starred_url":"https://api.github.com/users/GreyCat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreyCat/subscriptions","organizations_url":"https://api.github.com/users/GreyCat/orgs","repos_url":"https://api.github.com/users/GreyCat/repos","events_url":"https://api.github.com/users/GreyCat/events{/privacy}","received_events_url":"https://api.github.com/users/GreyCat/received_events","type":"User","site_admin":false},"assignees":[{"login":"GreyCat","id":157154,"avatar_url":"https://avatars.githubusercontent.com/u/157154?v=3","gravatar_id":"","url":"https://api.github.com/users/GreyCat","html_url":"https://github.com/GreyCat","followers_url":"https://api.github.com/users/GreyCat/followers","following_url":"https://api.github.com/users/GreyCat/following{/other_user}","gists_url":"https://api.github.com/users/GreyCat/gists{/gist_id}","starred_url":"https://api.github.com/users/GreyCat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreyCat/subscriptions","organizations_url":"https://api.github.com/users/GreyCat/orgs","repos_url":"https://api.github.com/users/GreyCat/repos","events_url":"https://api.github.com/users/GreyCat/events{/privacy}","received_events_url":"https://api.github.com/users/GreyCat/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-09-10T07:42:55Z","updated_at":"2016-09-11T10:02:01Z","closed_at":null,"body":"Reproduce gist: https://gist.github.com/aki017/70266d164354696535b9eabcd5a9306c\r\n\r\nIt occur when nest type and using `_parent.field`\r\n\r\nwork\r\n```yaml\r\n- id: work\r\n  size: _parent.size\r\n```\r\n\r\nbroken\r\n```yaml\r\n- id: broken\r\n  size: _parent.size\r\n```\r\n\r\n== Error\r\n\r\n```\r\n... compiling it for ruby... ... => ./ruby/broken.rb\r\njava.lang.RuntimeException: Unable to determine type for main_size in type List(kaitai_struct)\r\n\tat io.kaitai.struct.ClassCompiler.determineType(ClassCompiler.scala:162)\r\n\tat io.kaitai.struct.translators.BaseTranslator.detectType(BaseTranslator.scala:260)\r\n\tat io.kaitai.struct.translators.BaseTranslator.translate(BaseTranslator.scala:45)\r\n\tat io.kaitai.struct.languages.LanguageCompiler.expression(LanguageCompiler.scala:74)\r\n\tat io.kaitai.struct.languages.RubyCompiler.parseExpr(RubyCompiler.scala:201)\r\n\tat io.kaitai.struct.languages.EveryReadIsExpression$class.attrBytesTypeParse(EveryReadIsExpression.scala:80)\r\n\tat io.kaitai.struct.languages.RubyCompiler.attrBytesTypeParse(RubyCompiler.scala:10)\r\n\tat io.kaitai.struct.languages.EveryReadIsExpression$class.attrParse2(EveryReadIsExpression.scala:61)\r\n\tat io.kaitai.struct.languages.RubyCompiler.attrParse2(RubyCompiler.scala:10)\r\n\tat io.kaitai.struct.languages.EveryReadIsExpression$class.attrParse(EveryReadIsExpression.scala:39)\r\n\tat io.kaitai.struct.languages.RubyCompiler.attrParse(RubyCompiler.scala:10)\r\n\tat io.kaitai.struct.ClassCompiler$$anonfun$compileClass$3.apply(ClassCompiler.scala:100)\r\n\tat io.kaitai.struct.ClassCompiler$$anonfun$compileClass$3.apply(ClassCompiler.scala:100)\r\n\tat scala.collection.immutable.List.foreach(List.scala:381)\r\n\tat io.kaitai.struct.ClassCompiler.compileClass(ClassCompiler.scala:100)\r\n\tat io.kaitai.struct.ClassCompiler$$anonfun$compileClass$5.apply(ClassCompiler.scala:108)\r\n\tat io.kaitai.struct.ClassCompiler$$anonfun$compileClass$5.apply(ClassCompiler.scala:108)\r\n\tat scala.collection.immutable.Map$Map1.foreach(Map.scala:116)\r\n\tat io.kaitai.struct.ClassCompiler.compileClass(ClassCompiler.scala:108)\r\n\tat io.kaitai.struct.ClassCompiler$$anonfun$compileClass$5.apply(ClassCompiler.scala:108)\r\n\tat io.kaitai.struct.ClassCompiler$$anonfun$compileClass$5.apply(ClassCompiler.scala:108)\r\n\tat scala.collection.immutable.Map$Map2.foreach(Map.scala:137)\r\n\tat io.kaitai.struct.ClassCompiler.compileClass(ClassCompiler.scala:108)\r\n\tat io.kaitai.struct.ClassCompiler.compile(ClassCompiler.scala:80)\r\n\tat io.kaitai.struct.Main$.compileOne(Main.scala:84)\r\n\tat io.kaitai.struct.Main$$anonfun$compileAll$1.apply(Main.scala:97)\r\n\tat io.kaitai.struct.Main$$anonfun$compileAll$1.apply(Main.scala:93)\r\n\tat scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)\r\n\tat scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)\r\n\tat io.kaitai.struct.Main$.compileAll(Main.scala:93)\r\n\tat io.kaitai.struct.Main$$anonfun$main$1.apply(Main.scala:118)\r\n\tat io.kaitai.struct.Main$$anonfun$main$1.apply(Main.scala:111)\r\n\tat scala.collection.immutable.List.foreach(List.scala:381)\r\n\tat io.kaitai.struct.Main$.main(Main.scala:111)\r\n\tat io.kaitai.struct.Main.main(Main.scala)\r\n```"},"comment":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/comments/246172102","html_url":"https://github.com/kaitai-io/kaitai_struct/issues/26#issuecomment-246172102","issue_url":"https://api.github.com/repos/kaitai-io/kaitai_struct/issues/26","id":246172102,"user":{"login":"GreyCat","id":157154,"avatar_url":"https://avatars.githubusercontent.com/u/157154?v=3","gravatar_id":"","url":"https://api.github.com/users/GreyCat","html_url":"https://github.com/GreyCat","followers_url":"https://api.github.com/users/GreyCat/followers","following_url":"https://api.github.com/users/GreyCat/following{/other_user}","gists_url":"https://api.github.com/users/GreyCat/gists{/gist_id}","starred_url":"https://api.github.com/users/GreyCat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreyCat/subscriptions","organizations_url":"https://api.github.com/users/GreyCat/orgs","repos_url":"https://api.github.com/users/GreyCat/repos","events_url":"https://api.github.com/users/GreyCat/events{/privacy}","received_events_url":"https://api.github.com/users/GreyCat/received_events","type":"User","site_admin":false},"created_at":"2016-09-11T10:02:01Z","updated_at":"2016-09-11T10:02:01Z","body":"That is definitely some problem with handling nested types with same names - i.e. `broken::main::foo` and `broken::dummy::foo` - it looks like parent type derivation breaks in some cases. I'll try to investigate it further."}}
{"actor":{"display_login":"GreyCat"}}