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

Update tfjs-react-native dependencies #8062

Merged
merged 5 commits into from
Nov 14, 2023

Conversation

paradite
Copy link
Contributor

@paradite paradite commented Nov 10, 2023

Fix #7454 and fix #7323

This is a follow-up on discussion in #7415 to fix and update the dependencies for tfjs-react-native library, and allow it to work out of the box without tinkering or patching.

The package with new dependencies has been tested (published using a different package name tfjs-react-native-para-patch) using a sample app I created at https://github.com/paradite/tfjs-sample-expo-app

I also updated the docs on how to handle the potential peer conflicts in future when the other dependencies eventually get updated (using yarn would not result in error even if the peer dependency conflicts with the direct dependency).

I will be continuing to work on this app to reach feature parity of the old sample app in the tf.js repo and submit another PR to replace it. The new app will be based on Expo and eliminate the need to having iOS and Android native code.


Just a side note, @tensorflow/tfjs-react-native has not been updated in the past two years and obviously does not get published together with other packages, so someone might need to take a look at the process to publish a new version: https://www.npmjs.com/package/@tensorflow/tfjs-react-native?activeTab=versions. In my testing, running npm run build is sufficient to get it working.

@pyu10055
Copy link
Collaborator

/gcbrun

Copy link
Member

@mattsoulanille mattsoulanille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking this on! These changes look good to me. As for publishing, we can add tfjs-react-native back to our publishing flow once you feel it's ready. Like you said, without native modules, npm run build should be sufficient.

@paradite
Copy link
Contributor Author

@pyu10055 can I get your blessing for approval and merge? Thanks!

@pyu10055 pyu10055 merged commit 7270e44 into tensorflow:master Nov 14, 2023
2 checks passed
@paradite
Copy link
Contributor Author

Hi @mattsoulanille @pyu10055, thanks for the help. I think the package at this state can be published on npm as it should work out of the box, and help to address the installation errors with the old version.

I didn't look closely at the publishing process but I believe it is a manual process. Please do help to publish a new package whenever it is convenient. Let me know if there is anything I can help with.

After a new package is published, I could test it with my sample app and proceed with next step on updating the sample app in tfjs repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants