{"action":"created","issue":{"url":"https://api.github.com/repos/google/flatbuffers/issues/294","labels_url":"https://api.github.com/repos/google/flatbuffers/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/google/flatbuffers/issues/294/comments","events_url":"https://api.github.com/repos/google/flatbuffers/issues/294/events","html_url":"https://github.com/google/flatbuffers/issues/294","id":111545282,"number":294,"title":"flatc should be improve at complie protobuffer schema into flatbuffer schema.","user":{"login":"hash-X","id":13306859,"avatar_url":"https://avatars.githubusercontent.com/u/13306859?v=3","gravatar_id":"","url":"https://api.github.com/users/hash-X","html_url":"https://github.com/hash-X","followers_url":"https://api.github.com/users/hash-X/followers","following_url":"https://api.github.com/users/hash-X/following{/other_user}","gists_url":"https://api.github.com/users/hash-X/gists{/gist_id}","starred_url":"https://api.github.com/users/hash-X/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hash-X/subscriptions","organizations_url":"https://api.github.com/users/hash-X/orgs","repos_url":"https://api.github.com/users/hash-X/repos","events_url":"https://api.github.com/users/hash-X/events{/privacy}","received_events_url":"https://api.github.com/users/hash-X/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-15T04:59:29Z","updated_at":"2015-10-21T15:45:11Z","closed_at":null,"body":"You know, Protobuf is existing everywhere. There days , I am doing a innovation work about rewrite  protobuf which in serialization and deserialization FSImage which contains in HDFS (hadoop distrubuted file system) . and here is the schema website ( https://github.com/hash-X/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/fsimage.proto ).  The issue is here : \r\nI have protobuf schema like this :+1: and named in test.proto. With that, I use command of \"flatc --proto test.proto\" to complie the schema. But something happened, error: expecting optional/required/repeated, got: 3. So, I really hope we can solve this problem as soon as possible. Thank you. \r\n\r\n    test.proto\r\n```\r\nmessage IntelINode {\r\n    enum IntelType {\r\n        FILE = 1;\r\n        DIRECTORY = 2;\r\n        SYMLINK = 3;\r\n    };\r\n   required uint64 id = 1\r\n}\r\n```\r\n    flatc --proto test.proto\r\n    error: expecting optional/required/repeated, got: 3\r\n\r\n\r\n "},"comment":{"url":"https://api.github.com/repos/google/flatbuffers/issues/comments/149938616","html_url":"https://github.com/google/flatbuffers/issues/294#issuecomment-149938616","issue_url":"https://api.github.com/repos/google/flatbuffers/issues/294","id":149938616,"user":{"login":"aardappel","id":4663648,"avatar_url":"https://avatars.githubusercontent.com/u/4663648?v=3","gravatar_id":"","url":"https://api.github.com/users/aardappel","html_url":"https://github.com/aardappel","followers_url":"https://api.github.com/users/aardappel/followers","following_url":"https://api.github.com/users/aardappel/following{/other_user}","gists_url":"https://api.github.com/users/aardappel/gists{/gist_id}","starred_url":"https://api.github.com/users/aardappel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aardappel/subscriptions","organizations_url":"https://api.github.com/users/aardappel/orgs","repos_url":"https://api.github.com/users/aardappel/repos","events_url":"https://api.github.com/users/aardappel/events{/privacy}","received_events_url":"https://api.github.com/users/aardappel/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T15:45:11Z","updated_at":"2015-10-21T15:45:11Z","body":"Use `FlatBufferBuilder.sizedByteArray()` to get the bytes, much simpler.\r\n\r\nHow you write those to file is up to you.. what you do above looks similar to `writeDelimitedTo`, but I've never used it."}}