Skip to content

fix: avoid redundant webpack build in CLI native image on Windows#116

Merged
linroid merged 1 commit intomainfrom
fix/windows-cli-yarn-concurrency
Feb 24, 2026
Merged

fix: avoid redundant webpack build in CLI native image on Windows#116
linroid merged 1 commit intomainfrom
fix/windows-cli-yarn-concurrency

Conversation

@linroid
Copy link
Owner

@linroid linroid commented Feb 24, 2026

Summary

  • Add prebuiltWebDir Gradle property to cli/build.gradle.kts — when set, the bundleWebApp task copies from that directory instead of triggering :app:web:wasmJsBrowserDistribution
  • Update release.yml: build-cli now depends on build-web, downloads the pre-built web zip artifact, and passes -PprebuiltWebDir=build/prebuilt-web to skip the webpack build

Context

The Windows CLI job failed because ./gradlew :cli:nativeCompile triggered :app:web:wasmJsBrowserProductionWebpack via the bundleWebAppwasmJsBrowserDistribution dependency chain. On Windows, yarn hit a lock contention issue (Waiting for the other yarn instance to finish), resulting in @js-joda/core not being installed in node_modules, which failed webpack.

The build-web job 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
  • Local: ./gradlew :cli:nativeCompile without -PprebuiltWebDir still builds web assets normally
  • CI: re-run release workflow — Windows CLI should succeed using pre-built web assets

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)
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@linroid linroid merged commit 0296cf2 into main Feb 24, 2026
4 checks passed
@linroid linroid deleted the fix/windows-cli-yarn-concurrency branch February 24, 2026 11:50
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.

1 participant