Open jmillan opened 1 year ago
This is definitely a bug we want to fix, though I'm not quite sure how we want to fix it.
In the meantime you should be able to work around the problem by manually naming the variants. See this test for an example of how to use this syntax.
My current thoughts on how to fix it:
The current naming scheme doesn't use the namespace at all. As I see it, we have the following options:
Currently I think option 1 and 1a are a bad ideas, as it would make the common experience much worse.
I am currently split between options 2, 3 and 3a.
I think I am leaning towards 3, since I currently think that naming the variants is the currently feel that naming the variants is a good enough work-around. However I am definitely willing to be convinced otherwise.
In any case, I think it's a good idea to implement option 3 immediately, since we would need the code to detect ambiguity for 2 and 3a as well.
I personally think that 3a is a good solution:
2.1 fits new, small, or not yet in-use schemas. 2.2 fits schemas that are more complex to modify (or which modification would make it less maintainable) and those cases where the schemas are already in use on other languages around a service.
In the meantime you should be able to work around the problem by manually naming the variants
Thanks for this suggestion @TethysSvensson :+1:. It helps in the meantime.
As you can see in the following example, having tables with the same name in different namespaces is not supported. They are reduced to one (ie: Check for
DumpResponse
).In our case we're using a quite wide schema and having namespaces make perfect sense.
.fbs schema:
The following rust code is generated:
This is the generated code for c++: