2

I'm trying to run flatc -s test.idl without success. This used to work but after changing laptops I'm not able to compile the schemas anymore. If I intentionally break the test.idl, I get errors, but with correct syntax it just fails silently.

test.idl looks like this:

namespace Foo;
enum Type : byte {
  type_request = 1,
  type_reply = 2,
}

struct UUID {
  low_bytes: ulong;
  high_bytes: ulong;
}

table Request {
  req_id: UUID    ( required );
}
root_type Request;

table Reply {
  req_id: UUID    ( required );
}
root_type Reply;

Any ideas? I'm likely running different version of flatc (currently 1.7.0), has something changed?

Mikko
  • 1,877
  • 1
  • 25
  • 37

1 Answers1

1

I found the answer, it seems (only?) .fbs extensions are supported now, so changing the name and running flatc -s test.fbs works fine.

Mikko
  • 1,877
  • 1
  • 25
  • 37
  • Yes, any other extension it will assume it's JSON or something it doesn't need to generate code for. That's still a bug, it should warn you. – Aardappel Aug 10 '17 at 22:15
  • Was fixed here: https://github.com/google/flatbuffers/commit/a6a3f5925393146e879ba03d919a3380b9af7994 – Aardappel Aug 11 '17 at 15:39
  • @Aardappel, great and thanks for the fix! If you found out the bug from this Q/A and feel like it was beneficial for you, feel free to upvote. – Mikko Aug 11 '17 at 16:17