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

Correct return type of getTotalLength in RNSVGRenderableManager #2309

Closed
wants to merge 1 commit into from

Conversation

cortinico
Copy link

Summary

Opening this in draft as React Native 0.74.x comes with better support for Int32 & Float inside codegen (previously they would be converted to Double).

As I noticed you folks have this in your specs:

getTotalLength(tag: Double | null): Float;

react-native-svg will stop working with the next patch RN (most likely 0.74.4).

To avoid this kind of problems in the future you folks can use includesGeneratedCode in the package.json:

https://github.com/facebook/react-native/blame/75451d5b89d7f6c33688df23b57bea521374c2dc/packages/react-native-test-library/package.json#L44

Test Plan

This is sadly not easy to test as is. Once 0.74.4 will be out, I suspect react-native-svg will break. This PR will fix it and a patch release will be needed afterwards.

@cortinico
Copy link
Author

Closing as we reverted the whole Int32/Float support for codegen in 0.74 to avoid scenarios like this one.

Regardless I think here:

getTotalLength(tag: Double | null): Float;

you folks should change the return parameter to Double

@cortinico cortinico closed this Jun 20, 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.

1 participant