Skip to content
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

Removing aborts from Flecs #1586

Open
GsLogiMaker opened this issue Feb 21, 2025 · 1 comment
Open

Removing aborts from Flecs #1586

GsLogiMaker opened this issue Feb 21, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@GsLogiMaker
Copy link
Contributor

Describe the problem you are trying to solve.
I'm encountering issues with aborts as I port Flecs (C API) to the Godot Engine. Godot holds the philosophy that a game should never crash and that it should be able to keep running even in the presence of errors. Although I have tried to maintain this philosophy I'm finding it impractical in some situations because of Flecs's use of aborts.

While I've tried to write custom checks that would bypass these aborts there are just some functions in Flecs that can't be prevented from crashing with simple checks. For example, ecs_entity_from_json can't be prevented from crashing without reimplementing most of what that method does. I might as well write it from scratch. I have opted to just not bind that function for now, but this is not the only problematic function.

I have found that these aborts makes a stable port of Flecs to Godot difficult and makes a good developer experience when using it impossible. I will not go into specifics here, but Godot games crashing is a big problem when working with Godot and it normally never happens.

Describe the solution you'd like
I would like to propose an effort to remove aborts from Flecs. I imagine this would be a giant undertaking, but maybe it could be done incrementally over time.

(I may be able to contribute to this effort. I would focus primarily on whatever aborts are most problematic for my Godot
port, but I will not have the time to start for at least 8 weeks.)

@GsLogiMaker GsLogiMaker added the enhancement New feature or request label Feb 21, 2025
@SanderMertens
Copy link
Owner

You can do this by defining FLECS_SOFT_ASSERT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants