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

Improve Type Verification #225

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Improve Type Verification #225

merged 1 commit into from
Nov 27, 2024

Commits on Nov 22, 2024

  1. It turns out immediate Type verification when calling define_method, …

    …define_attr, define_enum, define_iter doesn't work on large C++ code bases because of C++ forwarding support.
    
    Therefore instead of immediately failing, this commit updates the TypeRegistry to track undefined types. Then when figure_type is called for the first time, which will happen when Ruby calls a C++ function that returns an object, the TypeRegistry will check the undefined types. If any still remain undefined, because they are not in the list of defined types, it will throw will throw an exception.
    
    So if an exception is thrown it should hopefully happen almost immediately at program startup and not at some random point in the future when a method with an undefined type is called.
    cfis committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    c2541a9 View commit details
    Browse the repository at this point in the history