fix: avoid redundant webpack build in CLI native image on Windows#116
Merged
fix: avoid redundant webpack build in CLI native image on Windows#116
Conversation
The CLI nativeCompile triggered :app:web:wasmJsBrowserProductionWebpack via the bundleWebApp task dependency. On Windows, yarn's lock file contention caused @js-joda/core to not be installed, failing webpack. - Add prebuiltWebDir Gradle property to cli/build.gradle.kts that skips the wasmJsBrowserDistribution dependency when pre-built web assets are provided - Update release.yml: build-cli now depends on build-web, downloads the pre-built web zip, and passes -PprebuiltWebDir to Gradle - This also speeds up CLI builds by not redundantly rebuilding the web app (already built in the dedicated build-web job)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prebuiltWebDirGradle property tocli/build.gradle.kts— when set, thebundleWebApptask copies from that directory instead of triggering:app:web:wasmJsBrowserDistributionrelease.yml:build-clinow depends onbuild-web, downloads the pre-built web zip artifact, and passes-PprebuiltWebDir=build/prebuilt-webto skip the webpack buildContext
The Windows CLI job failed because
./gradlew :cli:nativeCompiletriggered:app:web:wasmJsBrowserProductionWebpackvia thebundleWebApp→wasmJsBrowserDistributiondependency chain. On Windows, yarn hit a lock contention issue (Waiting for the other yarn instance to finish), resulting in@js-joda/corenot being installed innode_modules, which failed webpack.The
build-webjob on Ubuntu already builds the same web distribution successfully. Reusing that artifact eliminates the redundant webpack build and the Windows yarn concurrency issue.Test plan
./gradlew :cli:help— build script parses correctly./gradlew :cli:nativeCompilewithout-PprebuiltWebDirstill builds web assets normally