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

Documentation generation hotfixes #130

Merged
merged 4 commits into from
Nov 3, 2024
Merged

Conversation

ischeinkman
Copy link
Contributor

Hotfix for 2 bugs in the teal environment generation algorithm:

  • Fixed fields not being deduped correctly because Vec::dedup only dedupes consecutive duplicate items. This was done by sorting the fields list beforehand.
    • Also deduped static fields while I was at it, though I'm not sure if those are used?
  • Fixed the algorithm not properly escaping record fields/functions/methods/etc that share the name of an existing Lua/Teal keyword. This was coming up since the Uuid record has a function called nil for making an all-zero uuid.

Note that this still doesn't completely fix Teal document generation when using the default Bevy APIs since they're still missing a definition for ReflectedValue, but I'll likely need some guidance on that and will split that off to a separate PR.

@gallexme
Copy link

gallexme commented Nov 2, 2024

Tested it works great,

for the ReflectedValue i had to add
.process_type::crate::script_ref::ReflectedValue()
crates/bevy_script_api/src/core_providers.rs get_doc_fragment

@makspll makspll merged commit 888ec43 into makspll:main Nov 3, 2024
12 of 13 checks passed
@github-actions github-actions bot mentioned this pull request Nov 3, 2024
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.

3 participants