You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use reflection.fbs as the basis for an independent FlatBuffer implementation. This is nice because it allows flatc to be the IDL parser so I don't need to worry about grammar / parsing rules.
The fundamental issue I'm having is that the SchemaFiles vector in BFBS output doesn't allow me to distinguish between these two cases:
File was directly passed to flatc as an input
File was discovered while processing include directives, but wasn't explicitly passed in
This affects me for the following case:
User has a common set of FBS schemas that are shared between multiple libraries in their project. They want to generate these type definitions once in the common library so that the types are universal across their project.
User has another library with a specialized set of FBS schemas that include the common set. The user doesn't want to regenerate the common set of schemas here because those have already been generated by the common location, so doing so again would lead to compiler errors due to type name conflicts.
This seems almost possible today. However, when parsing the specialized FBS files list, everything is thrown together in the SchemaFiles list without indication as to which were include-only (for lack of a better word).
So, what I'd like is the ability to distinguish between the two cases so my tool will know how to generate files for situations such as this. For now, there is a workaround by just lumping everything into one "FBS schemas" project. The simplest form of this is likely just adding a bool to the SchemaFile table that indicates if it was an explicit input or not.
Thanks!
The text was updated successfully, but these errors were encountered:
I use
reflection.fbs
as the basis for an independent FlatBuffer implementation. This is nice because it allowsflatc
to be the IDL parser so I don't need to worry about grammar / parsing rules.The fundamental issue I'm having is that the
SchemaFiles
vector in BFBS output doesn't allow me to distinguish between these two cases:This affects me for the following case:
User has a common set of FBS schemas that are shared between multiple libraries in their project. They want to generate these type definitions once in the common library so that the types are universal across their project.
User has another library with a specialized set of FBS schemas that include the common set. The user doesn't want to regenerate the common set of schemas here because those have already been generated by the common location, so doing so again would lead to compiler errors due to type name conflicts.
This seems almost possible today. However, when parsing the specialized FBS files list, everything is thrown together in the
SchemaFiles
list without indication as to which were include-only (for lack of a better word).So, what I'd like is the ability to distinguish between the two cases so my tool will know how to generate files for situations such as this. For now, there is a workaround by just lumping everything into one "FBS schemas" project. The simplest form of this is likely just adding a bool to the
SchemaFile
table that indicates if it was an explicit input or not.Thanks!
The text was updated successfully, but these errors were encountered: