Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

The setup-workspace.sh script was experiencing significant delays and failures (exit code 128) during the "Setup workspace" stage, particularly on macOS. This was caused by the download-cn1-binaries Maven profile activating despite the -Dcn1.binaries system property being set. The profile would attempt to clone the cn1-binaries repository into the target directory, conflicting with the script's logic which already provisions these binaries in a separate location. This change explicitly disables the profile (-P !download-cn1-binaries) for all Maven invocations within the script, ensuring the build relies solely on the pre-provisioned binaries and eliminating the redundant git operations.


PR created automatically by Jules for task 9229016740564091027 started by @shai-almog

Explicitly disable the `download-cn1-binaries` Maven profile during the `setup-workspace.sh` script execution. The script already provisions these binaries externally and passes the path via `-Dcn1.binaries`, but the profile was still activating and attempting a redundant `git clone` into the target directory, causing concurrency errors (exit code 128) and significant delays.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@shai-almog
Copy link
Collaborator

shai-almog commented Dec 17, 2025

Android screenshot updates

Compared 30 screenshots: 26 matched, 4 updated.

  • graphics-draw-line — updated screenshot. Screenshot differs (320x616 px, bit depth 8).

    graphics-draw-line
    Preview info: JPEG preview quality 60; JPEG preview quality 60.
    Full-resolution PNG saved as graphics-draw-line.png in workflow artifacts.

  • graphics-draw-string — updated screenshot. Screenshot differs (320x616 px, bit depth 8).

    graphics-draw-string
    Preview info: JPEG preview quality 50; JPEG preview quality 50.
    Full-resolution PNG saved as graphics-draw-string.png in workflow artifacts.

  • graphics-draw-string-decorated — updated screenshot. Screenshot differs (320x616 px, bit depth 8).

    graphics-draw-string-decorated
    Preview info: JPEG preview quality 60; JPEG preview quality 60.
    Full-resolution PNG saved as graphics-draw-string-decorated.png in workflow artifacts.

  • kotlin — updated screenshot. Screenshot differs (320x616 px, bit depth 8).

    kotlin
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as kotlin.png in workflow artifacts.

Native Android coverage

  • 📊 Line coverage: 24.87% (2653/10667 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.48% (12320/50336), branch 15.50% (719/4640), complexity 17.56% (741/4220), method 32.89% (597/1815), class 34.98% (106/303)
    • Lowest covered classes
      • com.codename1.impl.android.com.codename1.impl.android.AndroidContactsManager – 0.00% (0/400 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$Video – 0.00% (0/168 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.IntentIntegrator – 0.00% (0/139 lines covered)
      • com.codename1.impl.android.util.com.codename1.impl.android.util.Base64 – 0.00% (0/117 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$SocketImpl – 0.00% (0/77 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidTextureView – 0.00% (0/76 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidSurfaceView – 0.00% (0/73 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.LocalNotificationPublisher – 0.00% (0/65 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.FridaDetectionUtil – 0.00% (0/64 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidDB – 0.00% (0/57 lines covered)

Enhance build performance in `scripts/setup-workspace.sh` by:
1. Adding `-T 1C` to Maven commands to enable parallel builds using one thread per core.
2. Adding `-Dmaven.javadoc.skip=true` and `-Dmaven.source.skip=true` to skip time-consuming and unnecessary documentation and source artifact generation during the workspace setup phase.
3. Explicitly disabling the `download-cn1-binaries` profile (`-P !download-cn1-binaries`) to prevent redundant `git clone` operations that were causing "Result: 128" errors and delays.
1. Optimize `scripts/setup-workspace.sh` build time by enabling parallel builds (`-T 1C`) and skipping unnecessary Javadoc/Source generation.
2. Fix "Result: 128" git errors by explicitly disabling the `download-cn1-binaries` profile (`-P !download-cn1-binaries`).
3. Fix "Stubber.jar not found" build failure by explicitly passing `-Dcn1.binaries="$CN1_BINARIES"` to Maven commands, ensuring the external binaries are located.
4. Update `.github/workflows/pr.yml` to trigger the PR CI workflow when `scripts/setup-workspace.sh` is modified, enabling validation of these changes.
@shai-almog
Copy link
Collaborator

shai-almog commented Dec 17, 2025

iOS screenshot updates

Compared 30 screenshots: 24 matched, 5 updated, 1 missing reference.

  • BrowserComponent — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    BrowserComponent
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as BrowserComponent.png in workflow artifacts.

  • graphics-draw-gradient — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-gradient
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-gradient.png in workflow artifacts.

  • graphics-draw-round-rect — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-draw-round-rect.png.

    graphics-draw-round-rect
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-round-rect.png in workflow artifacts.

  • graphics-draw-string — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 422x918.
    Full-resolution PNG saved as graphics-draw-string.png in workflow artifacts.

  • graphics-draw-string-decorated — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string-decorated
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-string-decorated.png in workflow artifacts.

  • kotlin — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    kotlin
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as kotlin.png in workflow artifacts.

Benchmark Results

  • VM Translation Time: 351 seconds
  • Compilation Time: 88 seconds

1.  **Optimize `scripts/setup-workspace.sh`:**
    *   Enable parallel builds (`-T 1C`) for faster execution.
    *   Skip Javadoc and Source generation to save time.
    *   Explicitly disable the `download-cn1-binaries` profile (`-P !download-cn1-binaries`) to prevent redundant git operations and "Result: 128" errors.
    *   Pass `-Dcn1.binaries="$CN1_BINARIES"` to ensure the build can locate the pre-provisioned binaries.

2.  **Fix `scripts/build-android-port.sh`:**
    *   Apply the same fixes as above (disable download profile, pass binaries path, optimization flags) to resolve "Result: 128" errors during the Android port build stage.

3.  **Update `.github/workflows/pr.yml`:**
    *   Add `!scripts/setup-workspace.sh` to the `paths-ignore` list for both `push` and `pull_request` triggers. This ensures that changes to the setup script properly trigger the CI workflow for validation.
@github-actions
Copy link

github-actions bot commented Dec 17, 2025

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

1.  **Optimize `scripts/setup-workspace.sh`**:
    *   Enable parallel Maven builds (`-T 1C`) for faster execution.
    *   Skip Javadoc and source generation (`-Dmaven.javadoc.skip=true`, `-Dmaven.source.skip=true`).
    *   Disable the `download-cn1-binaries` profile (`-P !download-cn1-binaries`) to prevent redundant cloning and "Result: 128" errors.
    *   Explicitly pass `-Dcn1.binaries="$CN1_BINARIES"` to ensure binaries are located correctly.

2.  **Fix `scripts/build-android-port.sh`**:
    *   Define `CN1_BINARIES` variable with fallback logic to prevent "unbound variable" errors.
    *   Apply the same Maven optimizations and profile deactivation as in `setup-workspace.sh` to resolve build failures.

3.  **Update `.github/workflows/pr.yml`**:
    *   Add `!scripts/setup-workspace.sh` to `paths-ignore` for both `push` and `pull_request` triggers to ensure CI runs when this script is modified.
@shai-almog shai-almog marked this pull request as ready for review December 17, 2025 16:55
@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.

@shai-almog shai-almog merged commit e257e6b into master Dec 17, 2025
9 checks passed
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.

2 participants