-
Notifications
You must be signed in to change notification settings - Fork 57
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
Remove auto-generated files from bundle and add to .gitignore #2694
Conversation
Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job! |
👋 Cameron, I had a quick look at the diff and here are my thoughts:
|
About
I haven't been involved in the addition of any of those files so I can't really be completely sure if they are needed or not without further investigation. |
It doesn't seem like those are needed anywhere from what I can see. I can find all json files inlined inside the bundle itself. I think we should definitely stop versioning those 👍 |
@hypest My thinking was that the primary issue I was seeking to address is Alternatively, we could just do the smaller clean up job of removing |
b8e9a89
to
85f6fe6
Compare
85f6fe6
to
9188571
Compare
ca756c1
to
62a14e8
Compare
@etoledom Re-added translation files 62a14e8 (should see they're no longer in the PR file diff)
@hypest That change was just from running |
Thanks for elaborating Cameron! I should have been more clear: I think that currently we do rely on the bundle file existence in the build pipeline, to determine if the bundle needs to be rebuilt or not. See https://github.com/WordPress/gutenberg/blob/736890da82c4eeb479ee9f1b5b12fadd3bf1dbb6/packages/react-native-bridge/android/build.gradle#L202. So, my assumption is that (again, currently) when we commit the bundle we bring it up-to-date with the sources and Gradle is able to avoid rebuilding it. That said, I'm not exactly sure that this optimization does indeed happen in practice. Until we figure this out, yeah, I'd opt for not removing the bundles yet but totally think we need to remove the block.json files which are way more numerous too, adding too much noise. WDYT? |
We do not check that bundle file to see if it is up-to-date currently in the build pipeline. Instead, we only check if the bundle file that we generate and copy to a build directory in the
That build pipeline is going to be changed to no longer regenerate the bundle files in the next few months (@oguzkocer already has a rough working prototype, and I believe the work is expected for November), so I don't think we need to worry too much about optimizing for that process.
Those reasons do resonate with me. At the same time, they are a bit speculative (does being inconsistent with iOS on this really hurt us, and we don't know whether future build improvements will need them.) That makes me think it may be worthwhile to go ahead and remove those files to see how things go. It will be easy to add them back later if/when we discover we need them. In the end, I don't feel strongly either way. |
That's exactly how I feel too at this stage @mchowning. We wanted to have the bundles be up-to-date corresponding to the source code, but after more than two years in the project we never really depended on that mirroring of the bundle files themselves. And, if as you said in your comment (wow, |
To summarize current state:
I also performed the checks from the PR description, and CI passed on this PR, as well as on the test PRs for WPAndroid, and WPiOS. As an additional protection, I'll be wrangling the next release and will be able to restore these files if we see any issues with the release. Let me know if there are any other concerns needed for PR approval @hypest @mchowning @etoledom 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fixes #2693
This change removes autogenerated files in the bundle directory from source control.
WPAndroid Test PR:wordpress-mobile/WordPress-Android#13068
WPiOS Test PR: wordpress-mobile/WordPress-iOS#15060
To test:
WPAndroid
WPiOS
DemoApp
3. Run Demo app from gutenberg-mobile on Android and iOS and make sure everything works as expected
.4 Run demo app from gutenberg on Android and iOS and make sure everything works as expected.
PR submission checklist: