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

fix: add sorbet-schema shim for better T:Struct extension compatability #123

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

maxveldink
Copy link
Owner

@maxveldink maxveldink commented Aug 14, 2024

Closes #87

There has been issues with the deserialize_from method on T::Struct in downstream projects where the type had to be cast for the struct. We can use T.attached_class for this, however it complicates the type check for the underlying serializers here.

Further, we have an issue of the sigs for the T::Struct extension not being picked up by Tapioca and a shim needing to be in place for that.

Instead of adding sigs to the extension, I'm going to try and export the rbi as a shim that should be picked up by Tapioca, and use a slightly less safe call in order to give better type information to callers.

@maxveldink maxveldink merged commit b47cafb into main Aug 14, 2024
5 checks passed
@maxveldink maxveldink deleted the mv/shim branch August 14, 2024 15:31
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.

Figure out why RBI for T::Struct isn't being generated correctly
1 participant