-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add getMessage to JThrowable and getSimpleName to JClass #78
Add getMessage to JThrowable and getSimpleName to JClass #78
Conversation
@passy are you able to take this one? |
@cortinico I don't know the internals of this well enough (i.e. not at all) but I'm happy to import it and try to find an internal reviewer. |
I can import and review the changes 😊 |
Thanks @lblasa I can help with the review |
Thank you for the help. @cortinico @passy @lblasa Would anyone know how to build the library locally and try it with RN? I've described my steps in the description. I thought I'll build it and publish it to my local maven and then use it RN, but got an error mentioned above. |
Answered on Discord but I'll follow up here also for completeness: Seems like prefab support is not working for -SNAPSHOT version (here the problem https://github.com/DanAlbert/prefab/blob/ab8529aa5163f071da02deb023037f3511bf90ce/api/src/main/kotlin/com/google/prefab/api/Package.kt#L31-L32). It seems like this might be fixed in a later version of AGP though so there is probably nothing to report to Google. To unblock you can
|
@lblasa has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Friendly ping @krystofwoldrich to move this forward |
@krystofwoldrich has updated the pull request. You must reimport the pull request before landing. |
@lblasa has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@krystofwoldrich has updated the pull request. You must reimport the pull request before landing. |
I've tested it here facebook/react-native@main...krystofwoldrich:react-native:kw-use-new-class-methods-from-fbjni-for-mixed-stack-traces Everything looks good. |
) Summary: When a new version of `fbjni` is released, we can simplify `getName` and `getMessage` calls on throwables. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [ANDROID] [CHANGED] - Use new `getCanonicalName` and `getMessage` methods exposed by `fbjni` Pull Request resolved: #37879 Test Plan: facebookincubator/fbjni#78 Reviewed By: cortinico Differential Revision: D46966561 Pulled By: javache fbshipit-source-id: f30720a30146cf8fe5125336435a1512063c253d
…bump to 0.5.1 (facebook#37879) Summary: When a new version of `fbjni` is released, we can simplify `getName` and `getMessage` calls on throwables. <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [ANDROID] [CHANGED] - Use new `getCanonicalName` and `getMessage` methods exposed by `fbjni` Pull Request resolved: facebook#37879 Test Plan: facebookincubator/fbjni#78 Reviewed By: cortinico Differential Revision: D46966561 Pulled By: javache fbshipit-source-id: f30720a30146cf8fe5125336435a1512063c253d
…bump to 0.5.1 (facebook#37879) Summary: When a new version of `fbjni` is released, we can simplify `getName` and `getMessage` calls on throwables. <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [ANDROID] [CHANGED] - Use new `getCanonicalName` and `getMessage` methods exposed by `fbjni` Pull Request resolved: facebook#37879 Test Plan: facebookincubator/fbjni#78 Reviewed By: cortinico Differential Revision: D46966561 Pulled By: javache fbshipit-source-id: f30720a30146cf8fe5125336435a1512063c253d
Motivation
Why are you making this change?
To enable RN to retrieve details about Throwables.
Relates to facebook/react-native#36925. Where these changes will be used.
Summary
What did you change?
Added
getMessage
to JThrowable.Added
getSimpleName
to JClass.How does the code work?
Uses dynamic Java method call like other similar methods.
Test Plan
How did you test this change?
Could anyone guide me on how to test my changes of
fbjni
in RN?I wanted to publish the package to my local Maven and add it to RN to verify the functionality, but it didn't work.
What I tried:
./gradlew publishToMavenLocal
generated0.3.1-SNAPSHOT
mavenLocal()
topackages/rn-tester/android/app/build.gradle
.I got this error:
Any change that adds functionality should add a unit test as well.