jamescourtney / FlatSharp

Fast, idiomatic C# implementation of Flatbuffers
Apache License 2.0
511 stars 51 forks source link

Include different namespaces #80

Closed FinalFortune closed 3 years ago

FinalFortune commented 4 years ago

The compiler doesn't seem to generate the code if the items used from the Include are in a different namespace.

__ e.g.

A.fbs:

Include "B.fbs"
namespace my.namespace.stuff;

table Bar {
  MyFoo:Foo
}

B.fbs

namespace my.namespace.otherstuff; 

table Foo {
}

Compiler unable to resolve Foo in A.fbs

Eshva commented 3 years ago

You need to use "full name" of the type.

Include "B.fbs";
namespace my.namespace.stuff;

table Bar {
  MyFoo:my.namespace.otherstuff.Foo;
}