Skip to content

New package system #361

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

Merged
merged 69 commits into from
Mar 29, 2022
Merged

Conversation

CedricGuillemet
Copy link
Contributor

@CedricGuillemet CedricGuillemet commented Mar 18, 2022

  • New package react-native-iosandroid in Modules\@babylonjs that contains ios and android folder. Deps on react-native.
  • react-native package contains the Shared folder and compiled TS to .js. Dependency on @babylon/core but no deps on native
  • react-native-windows alsmost unchanged
  • publish workflow now uses reusable workflows to build TS, iOS-Android and Windows
  • react-native-iosandroid and react-native-windows have a peerdependecy on react-native with version of the package
  • podspec moved to ios-android package

Most of the changes are in gulpfile.js.

You can check the result of publish Action on my repo: https://github.com/CedricGuillemet/BabylonReactNative-1/actions

Package testing:
Download artifacts. zip, unzip then npm install path\to\unzipped\folder

@CedricGuillemet
Copy link
Contributor Author

One other change I would include is to update the VersionValidation.ts file to check the Platform.OS and verify that you have the right binary package and version installed, and if not, emit an error. This will make it easy for people updating to the new @babylonjs/react-native package understand there are additional dependencies. It would probably also be good to have an exported variable from VersionValidation.ts to indicate whether the binary packages are present, and if not, have useEngine and EngineView no-op or something (and not explode).

The react-native-iosandroid and react-native-windows have a dependency on react-native with the exact same version. isn't it enough or do you want to check smth else?

@SergioRZMasson
Copy link
Contributor

SergioRZMasson commented Mar 24, 2022

Just tested the changes consuming the generated packages as well as building from the repo:

ios package for react native 0.64 - working
android package for react native 0.64 - working
ios package for react native 0.65 - working
android package for react native 0.65 - working

android app running from repo - working
ios app running from repo - working

windows app running from repo - working
windows package for react native 0.64 - builds with no error but shows message ("Could not initialize Babylon Native")
windows package for react native 0.65 - builds with no error but shows message ("Could not initialize Babylon Native")

Some users have reported on the forum that they were having the same issue when consuming windows package, I believe this was not caused by the changes in the package system. I will open an issue for us to track this windows package problem.

@CedricGuillemet CedricGuillemet merged commit c4ce035 into BabylonJS:master Mar 29, 2022
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.

4 participants