-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python] Regression - Generated code gets overwritten with empty contents when included in another .fbs file #8490
Comments
I confirm that. I think it is caused by the #8292. |
I have just found that you can avoid this using the |
Using One big issue is that if you need to generate multiple .fbs files in a build system that runs multiple processes in parallel, the same file could be written to multiple times simultaneously and corrupt the file or give filesystem locking issues on Windows. Another is if For some using |
Yeah, I am experiencing an issue similar to the ones you just mentioned :-(. I have the same table imported in two other |
This may overwrite types that have already been generated and can create unwanted empty files. Fixes google#8490
This may overwrite types that have already been generated and can create unwanted empty files. Fixes google#8490
This may overwrite types that have already been generated and can create unwanted empty files. Fixes google#8490
After updating to 24.12.23, I noticed that many of the generated Python files have contents such as this:
After seeing that they are generated in some cases but not others, I have tracked down the issue to using
#include
with another .fbs file, where any included types will have its Python files overwritten.For example, let's say you have
foo.fbs
with theFoo
table, andbar.fbs
that includesfoo.fbs
. If you generatefoo.fbs
, aFoo.py
file will be generated with the proper types. However, as soon as you generatebar.fbs
, it will overwriteFoo.py
with an empty file with a comment noting that it doesn't declare any structs or enums, rendering the generated code unusable.The text was updated successfully, but these errors were encountered: