-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Binary tokens export in Godot 4.3-dev4 breaks State Charts #90
Comments
Thank you very much for reporting this. I have a feeling this could be related to godotengine/godot#89297 . The state charts addon has some cross referencing between |
I got slightly different errors, but it seems this could very well be related. I would have thought it would be kind of weird that merely changing the text-based tokens to a binary form would cause GDScript to compile differently, but it seems that's what's happening here. I'll have to keep an eye on this issue. |
Yes, I'll keep this open for now until the upstream issue is resolved. |
I've confirmed that godotengine/godot#89472 fixes this issue. The tokenizer had issues resolving line continuation markers (\) that were followed on the next line by comments. This is the reason State Charts caused this issue, but it's not an issue with any of State Chart's code. I think it's safe to close this issue. |
That's great news, thanks a lot for the follow-up! |
Godot 4.3 is reintroducing binary export for GDScript as an export option, and it appears it will be enabled by default. When using this export option, State Charts will break. I've created a minimal example project to demonstrate this behaviour. In the Releases for this project there is a set of two builds, one exported with standard text-formatted GDScript, and one with the new binary script export enabled. The text script build lets you walk around with WASD and jump with space bar, and the State Chart debugger shows what state is active. The binary script build will not allow movement or jumping, and the State Chart debugger is blank. Running with console shows the errors caused by these binary exports:
There is an error in this log about being unable to compile "player_character.gdc", but despite this the character does still rotate toward the intended movement direction, and the Escape key exits the program, so that script appears to be running fine.
I'm not entirely sure if this is an issue with this in-development Godot build or with the State Charts addon, but it appears that the binary export makes Godot unable to find the global State class, as well as other related classes and signals. In my much more complex project there appears to be no problems with global classes or signals other than those related to State Charts, leading me to believe the problem is not Godot's implementation of binary token export. There still may be future changes to Godot that fix this, since this is an in-development update, but it seemed like a good idea to report this here now in case this is a problem with State Charts, and it can be fixed before the final release of Godot 4.3.
The text was updated successfully, but these errors were encountered: