-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Gutenberg/no jitpack updates to gutenberg 1.28 branch #11921
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
Gutenberg/no jitpack updates to gutenberg 1.28 branch #11921
Conversation
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
You can test the changes on this Pull Request by downloading the APK here. |
7b59cb8 to
bf7215f
Compare
|
Added bf7215f on top of @hypest's original avoid-jitpack changes. This change has CircleCI cache each JS bundle it generates against a key based on the gutenberg-mobile submodule hash. This means that CircleCI only generates the JS bundle the first time it builds a given gutenberg-mobile submodule hash. On all subsequent builds, it just reuses the cached JS bundle. This means that instead of the "gutenberg-bundle-build" job taking 2.5 minutes to generate a bundle every time, it now only does that the first time. For all subsequent builds where the gutenberg-mobile submodule hash has not changed, the "gutenberg-bundle-build" job only takes ~10 seconds to confirm that a cached JS bundle exists (for example: first build, subsequent build). This change depends on the assumption we should never need to rebuild the JS bundle if the gutenberg-mobile submodule hash has not changed. Let me know if you can think of any scenario where that is not true. |
|
When trying to build the |
I experience the same issue Sérgio encountered. |
|
Right after cloing the repository (with its submodules): |
Thanks @SergioEstevao and @hypest . I've seen that same kind of error 2 times myself. I haven't been able to recreate it though, so I was hoping it was just an issue with my local machine since I've been testing a lot of different things out lately with these builds. I was able to fix it by deleting the referenced folders in I'm a bit stumped on this one, so let me know if anyone has any guesses about what might be the issue. Also, if anyone else encounters this please leave a comment indicating things like:
UPDATE: Looks like there may be some promising things to try here. Investigating. |
|
After deleting the following paths: The build started to work |
|
I'm currently trying the following diff on top of diff --git a/react-native-gutenberg-bridge/android/build.gradle b/react-native-gutenberg-bridge/android/build.gradle
index 033357a..671487e 100644
--- a/react-native-gutenberg-bridge/android/build.gradle
+++ b/react-native-gutenberg-bridge/android/build.gradle
@@ -20,7 +20,7 @@ buildscript {
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
if (buildGutenbergMobileJSBundle) {
- classpath "com.moowork.gradle:gradle-node-plugin:1.2.0"
+ classpath "com.moowork.gradle:gradle-node-plugin:1.3.1"
}
}
}
@@ -40,13 +40,13 @@ if (buildGutenbergMobileJSBundle) {
node {
// Version of node to use.
- version = '12.13.1'
+ version = '12.16.1'
// Version of npm to use.
- npmVersion = '6.3.0'
+ npmVersion = '6.14.2'
// Version of Yarn to use.
- yarnVersion = '1.10.1'
+ yarnVersion = '1.22.4'
// Base URL for fetching node distributions (change if you have a mirror).
distBaseUrl = 'https://nodejs.org/dist'Update: run No1 worked without having to delete any paths like above. Runs No2 and No3 also succeeded. On to trying the diff on this PR itself. Edit: run No1 with the diff on this PR succeeded. Will try a couple more. Succeeded as well, and were super fast at that 🎉. Also, @SergioEstevao , can you try building again a couple of time (without changing or touching anyway) to see if the same symlink issue will occur anyway? |
After the first successful build all the follow up run without problems. |
|
I tried the PR by removing the diff I shared above and the nodeSetup issue happens again for me. To me that shows that the diff consistently fixes it, at least on my end. |
|
Thanks for investigating @hypest !
That's certainly encouraging. I'm worried though that your change might only be fixing it because you're no longer looking for the same, problematic node artifacts since you changed the version numbers. I'm worried that whatever caused the initial artifacts to get messed up could still exist and eventually, maybe, mess up the new ones the same way. I'm obviously just speculating though. I certainly don't see any harm in making your change. This comment seemed interesting since we have nested subprojects, but I haven't been able to investigate since I can't recreate the problem on my machine currently. |
In the effort to fix the "Couldn't follow symbolic link." issue reported here: wordpress-mobile/WordPress-Android#11921 (comment)
cameronvoell
left a comment
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.
| wp.BUILD_GUTENBERG_FROM_SOURCE | build flavor | success? |
|---|---|---|
| true | wasabiDebug | ✅ |
| false | wasabiDebug | ✅ |
| false | vanillaRelease | ✅ |
In addition to successfully building the above three, I also ran the other tests in the description, and everything behaved as expected.
After a fresh clone of WPAndroid (and submodules) I saw 1m 22 seconds for the first installWasabiDebug and 9 seconds for the second installWasabiDebug. Looks good!
| if (project.ext.buildGutenbergFromSource) { | ||
| def nodeModulesDir = new File('libs/gutenberg-mobile/node_modules') | ||
| if (!nodeModulesDir.exists()) { | ||
| def message = "Attempting to build Gutenberg from source without a libs/gutenberg-mobile/node_modules directory. \ |
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.
definitely appreciate this message as a reminder! 🙏
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.
Nothing like tripping over something multiple times yourself to make you think, "Hmmm, maybe I should give a helpful message here." 😆
In the effort to fix the "Couldn't follow symbolic link." issue reported here: wordpress-mobile/WordPress-Android#11921 (comment)
24e3dd3 to
b82f10f
Compare
b82f10f to
afb45aa
Compare
Did another round of checks after retargeting and rebase with release branch. Looks good! |
Related gutenberg-mobile PR: wordpress-mobile/gutenberg-mobile#2264
Bringing the changes to not use jitpack for Gutenberg to
develop.To test
Insure you can build the app successfully under these three scenarios:
wp.BUILD_GUTENBERG_FROM_SOURCEis false, changes to gutenberg's package.json file rerun the yarn task.wasabiDebugflavor whenwp.BUILD_GUTENBERG_FROM_SOURCEisfalseis reasonably fast since that is the build that will be generally used for development by non-Gutenberg Android devs.cleanregenerates the bundle:wp.BUILD_GUTENBERG_FROM_SOURCEset tofalse, run./gradlew installWasabiDebugand verify that you can load the Gutenberg editor from resulting app./gradlew clean installWasabiDebugand verify that you can load the Gutenberg editor from the resulting app. This build should take longer again becausecleandeletes the bundle so the build should detect that and rebuild it.PR submission checklist
RELEASE-NOTES.txtif necessary.