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

[aot] Proper type checking in C-API header generator #7979

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

Conversation

PENGUINLIONG
Copy link
Member

@PENGUINLIONG PENGUINLIONG commented May 11, 2023

Issue: #

Brief Summary

🤖 Generated by Copilot at 0e63d20

Refactored and fixed bugs in the scripts for generating the C API and the Unity language binding. Improved the JSON schema handling and versioning.

Walkthrough

🤖 Generated by Copilot at 0e63d20

  • Refactor the get_declr functions in generate_c_api.py and generate_unity_language_binding.py to use isinstance instead of type for checking the entry type (link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Fix a bug in generate_c_api.py where the enumeration case name was not converted to snake case before passing it to get_api_field_ref (link)
  • Fix a bug in generate_unity_language_binding.py where the regular expression for matching the module name was missing the raw string prefix (link)
  • Add assertions to check that the symbol and entry types are resolved successfully in generate_c_api.py and taichi_json.py (link, link, link, link)
  • Add type annotations to the classes and functions in taichi_json.py for better type checking and readability (link, link, link, link, link, link, link)
  • Refactor the get_type_name function in generate_unity_language_binding.py to use isinstance instead of type for checking the entry type (link)

@netlify
Copy link

netlify bot commented May 11, 2023

Deploy Preview for docsite-preview canceled.

Name Link
🔨 Latest commit 7129296
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/645ca9da1f33990008c6622c

@taichi-gardener taichi-gardener added this to In progress in AOT May 11, 2023
@PENGUINLIONG
Copy link
Member Author

PENGUINLIONG commented May 11, 2023

/rebase

1 similar comment
@PENGUINLIONG
Copy link
Member Author

/rebase

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

Successfully merging this pull request may close these issues.

None yet

1 participant