{"action":"created","issue":{"url":"https://api.github.com/repos/nanopb/nanopb/issues/210","repository_url":"https://api.github.com/repos/nanopb/nanopb","labels_url":"https://api.github.com/repos/nanopb/nanopb/issues/210/labels{/name}","comments_url":"https://api.github.com/repos/nanopb/nanopb/issues/210/comments","events_url":"https://api.github.com/repos/nanopb/nanopb/issues/210/events","html_url":"https://github.com/nanopb/nanopb/issues/210","id":168961928,"number":210,"title":"Callback fields inside of oneof are not supported","user":{"login":"rodriguise","id":3108711,"avatar_url":"https://avatars.githubusercontent.com/u/3108711?v=3","gravatar_id":"","url":"https://api.github.com/users/rodriguise","html_url":"https://github.com/rodriguise","followers_url":"https://api.github.com/users/rodriguise/followers","following_url":"https://api.github.com/users/rodriguise/following{/other_user}","gists_url":"https://api.github.com/users/rodriguise/gists{/gist_id}","starred_url":"https://api.github.com/users/rodriguise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodriguise/subscriptions","organizations_url":"https://api.github.com/users/rodriguise/orgs","repos_url":"https://api.github.com/users/rodriguise/repos","events_url":"https://api.github.com/users/rodriguise/events{/privacy}","received_events_url":"https://api.github.com/users/rodriguise/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-02T18:59:27Z","updated_at":"2016-08-03T04:40:17Z","closed_at":null,"body":"I have a very simple message\r\n\r\nvariant.proto\r\n```\r\nsyntax = \"proto2\";\r\npackage models;\r\n\r\nmessage Variant {\r\n   oneof value {\r\n    string stringValue = 1;\r\n    int32 intValue = 2;\r\n    uint32 uintValue = 3;\r\n    int64 int64Value = 4;\r\n    uint64 uint64Value = 5;\r\n    sint32 sintValue = 6;\r\n    sint64 sint64Value = 7;\r\n    float floatValue = 8;\r\n    bool boolValue = 9;\r\n    bytes byteValue = 10;\r\n    double doubleValue = 11;\r\n  }\r\n}\r\n```\r\n\r\nvariant.options\r\n```\r\nVariant.value.stringValue       max_size:128\r\nVariant.value.byteValue         max_size:128\r\n```\r\n\r\nThis compiles fine for other langs (google cpp, golang, etc). But I get the following exception with nano.\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/Cellar/nanopb-generator/0.3.5/libexec/nanopb_generator.py\", line 1553, in <module>\r\n    main_plugin()\r\n  File \"/usr/local/Cellar/nanopb-generator/0.3.5/libexec/nanopb_generator.py\", line 1533, in main_plugin\r\n    other_files[fdesc.name] = parse_file(fdesc.name, fdesc, options)\r\n  File \"/usr/local/Cellar/nanopb-generator/0.3.5/libexec/nanopb_generator.py\", line 1420, in parse_file\r\n    f = ProtoFile(fdesc, file_options)\r\n  File \"/usr/local/Cellar/nanopb-generator/0.3.5/libexec/nanopb_generator.py\", line 973, in __init__\r\n    self.parse()\r\n  File \"/usr/local/Cellar/nanopb-generator/0.3.5/libexec/nanopb_generator.py\", line 999, in parse\r\n    self.messages.append(Message(names, message, message_options))\r\n  File \"/usr/local/Cellar/nanopb-generator/0.3.5/libexec/nanopb_generator.py\", line 785, in __init__\r\n    self.oneofs[f.oneof_index].add_field(field)\r\n  File \"/usr/local/Cellar/nanopb-generator/0.3.5/libexec/nanopb_generator.py\", line 674, in add_field\r\n    + \" (field %s)\" % field.name)\r\nException: Callback fields inside of oneof are not supported (field stringValue)\r\n--nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.\r\n```"},"comment":{"url":"https://api.github.com/repos/nanopb/nanopb/issues/comments/237136343","html_url":"https://github.com/nanopb/nanopb/issues/210#issuecomment-237136343","issue_url":"https://api.github.com/repos/nanopb/nanopb/issues/210","id":237136343,"user":{"login":"PetteriAimonen","id":922265,"avatar_url":"https://avatars.githubusercontent.com/u/922265?v=3","gravatar_id":"","url":"https://api.github.com/users/PetteriAimonen","html_url":"https://github.com/PetteriAimonen","followers_url":"https://api.github.com/users/PetteriAimonen/followers","following_url":"https://api.github.com/users/PetteriAimonen/following{/other_user}","gists_url":"https://api.github.com/users/PetteriAimonen/gists{/gist_id}","starred_url":"https://api.github.com/users/PetteriAimonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PetteriAimonen/subscriptions","organizations_url":"https://api.github.com/users/PetteriAimonen/orgs","repos_url":"https://api.github.com/users/PetteriAimonen/repos","events_url":"https://api.github.com/users/PetteriAimonen/events{/privacy}","received_events_url":"https://api.github.com/users/PetteriAimonen/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T04:40:16Z","updated_at":"2016-08-03T04:40:16Z","body":"You have to specify a maximum size for the string, so that it doesn't need a callback field. See issue #175 for further discussion."}}
{"actor":{"display_login":"PetteriAimonen"}}