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

[NO QA] Add YAPL build step to HybridApp builds #55426

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,6 @@ You can only build HybridApp if you have been granted access to [`Mobile-Expensi
[url "https://github.com/"]
insteadOf = ssh://[email protected]/
```
3. The first time you build the app you will need to build YAPL (OldDot javascript logic). Simply run `npm run grunt:build:shared` from the `Mobile-Expensify` submodule
- The following runtime error often indicates that YAPL has not been built correctly: `undefined is not an object (evaluating'Store.ReportHistory.bindCacheClearingEvents')`

At this point, the default behavior of some `npm` scripts will change to target HybridApp:
- `npm run android` - build HybridApp for Android
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"postinstall": "./scripts/postInstall.sh",
"clean": "./scripts/clean.sh",
"clean-standalone": "STANDALONE_NEW_DOT=true ./scripts/clean.sh",
"android": "./scripts/set-pusher-suffix.sh && ./scripts/run-build.sh --android",
"android": "./scripts/set-pusher-suffix.sh && cd Mobile-Expensify && npm run grunt:build:shared && cd .. && ./scripts/run-build.sh --android",
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to run this on iOS too?

Copy link
Contributor Author

@Julesssss Julesssss Jan 17, 2025

Choose a reason for hiding this comment

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

I'm not sure. I saw this iOS build step which made me think no... and we only added the step to the Android workflows when our builds were crashing. Not 100% sure though

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be running via grunt, but for whatever reason it's not working and engineers miss the error.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@Julesssss Julesssss Jan 17, 2025

Choose a reason for hiding this comment

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

Oooh that would be better. Perhaps our current grade task name no longer matches this logic:

theTask.name.matches("(assemble|bundle).*(Debug|Adhoc|Release)")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll look into this further when I have time next week

Copy link
Contributor

@staszekscp staszekscp Jan 20, 2025

Choose a reason for hiding this comment

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

I think that cleanest solution would be to indeed to include the task in the gradle script. Now I think there is a chance that the React Native CLI may interfere into the build phases, or indeed change it in some way so the buildGrunt doesn't trigger.

Maybe changing the pattern to (install|assemble|bundle).*(Debug|Adhoc|Release) would be enough?

"android-standalone": "./scripts/set-pusher-suffix.sh && STANDALONE_NEW_DOT=true ./scripts/run-build.sh --android",
"ios": "./scripts/set-pusher-suffix.sh && ./scripts/run-build.sh --ios",
"ios-standalone": "./scripts/set-pusher-suffix.sh && STANDALONE_NEW_DOT=true ./scripts/run-build.sh --ios",
Expand Down
Loading