Skip to content

Fix typos in ComponentTraits.md and returning error code upon creating a struct with a syntax error but no members #1693

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

999pingGG
Copy link
Contributor

@999pingGG 999pingGG commented Jun 8, 2025

I noticed ecs_meta_from_desc() prints an error when passed the description { about missing the closing brace, but still returns 0 (success). This commit fixes that. Let me know about any issues with this! I'm not sure about how to add test cases for this tho.

@999pingGG 999pingGG changed the title Fix typos and examples in ComponentTraits.md Fix typos in ComponentTraits.md and returning error code upon creating a struct with a syntax error but no members Jun 9, 2025
@SanderMertens
Copy link
Owner

Looks good! Can you add a test case (in test/meta) for the issue that is fixed by the 2nd commit?

@999pingGG
Copy link
Contributor Author

After sending this PR, I noticed some more issues related to empty structs even with my fix, and those require further investigation. I mean, you shouldn't be trying to parse and create empty structs, but resiliency is always good. I came across those bugs while writing my LuaJIT bindings and writing my own tests, let's prevent crashes as much as possible. I will investigate the problematic cases and write tests for them later.

@SanderMertens
Copy link
Owner

Sounds good! Can you split off the changes to ComponentTraits.md into a separate PR?

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

Successfully merging this pull request may close these issues.

2 participants