Skip to content

Conversation

@shai-almog
Copy link
Collaborator

Summary

  • replace output mode selection if/else with a switch statement
  • move iOS, clean, and default output generation into dedicated handler methods to shorten the main flow

Testing

  • not run (not requested)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +238 to +246
File cn1Globals = new File(srcRoot, "cn1_globals.h");
copy(ByteCodeTranslator.class.getResourceAsStream("/cn1_globals.h"), new FileOutputStream(cn1Globals));
if (System.getProperty("INCLUDE_NPE_CHECKS", "false").equals("true")) {
replaceInFile(cn1Globals, "//#define CN1_INCLUDE_NPE_CHECKS", "#define CN1_INCLUDE_NPE_CHECKS");
}
File xmlvm = new File(srcRoot, "xmlvm.h");
copy(ByteCodeTranslator.class.getResourceAsStream("/xmlvm.h"), new FileOutputStream(xmlvm));
File nativeMethods = new File(srcRoot, "nativeMethods.m");
copy(ByteCodeTranslator.class.getResourceAsStream("/nativeMethods.m"), new FileOutputStream(nativeMethods));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Copy cn1_globals.m for clean output

The new handleCleanOutput() copies cn1_globals.h and nativeMethods.m but never copies cn1_globals.m, even though the generated C code (and nativeMethods.m) rely on implementations defined there such as monitorEnter/GC helpers. The iOS handler still copies both header and .m (lines 293–299), so the clean target now ships only declarations and will fail to link when using the clean output mode.

Useful? React with 👍 / 👎.

@github-actions
Copy link

github-actions bot commented Dec 11, 2025

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Collaborator Author

shai-almog commented Dec 11, 2025

iOS screenshot updates

Compared 28 screenshots: 0 matched, 3 updated, 25 missing references.

  • 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-affine-scale — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-affine-scale.png.

    graphics-affine-scale
    Preview info: JPEG preview quality 40; JPEG preview quality 40; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-affine-scale.png in workflow artifacts.

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

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

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

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

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

    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-image-rect — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-draw-image-rect.png.

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

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

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

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

    graphics-draw-rect
    Preview info: JPEG preview quality 20; JPEG preview quality 20; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-rect.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-shape — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-draw-shape.png.

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

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

    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 — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-draw-string-decorated.png.

    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.

  • graphics-fill-arc — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-fill-arc.png.

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

  • graphics-fill-polygon — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-fill-polygon.png.

    graphics-fill-polygon
    Preview info: JPEG preview quality 30; JPEG preview quality 30; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-fill-polygon.png in workflow artifacts.

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

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

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

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

  • graphics-fill-shape — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-fill-shape.png.

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

  • graphics-fill-triangle — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-fill-triangle.png.

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

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

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

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

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

  • graphics-stroke-test — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-stroke-test.png.

    graphics-stroke-test
    Preview info: JPEG preview quality 20; JPEG preview quality 20; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-stroke-test.png in workflow artifacts.

  • graphics-tile-image — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-tile-image.png.

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

  • graphics-transform-camera — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-transform-camera.png.

    graphics-transform-camera
    Preview info: JPEG preview quality 50; JPEG preview quality 50; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-transform-camera.png in workflow artifacts.

  • graphics-transform-perspective — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-transform-perspective.png.

    graphics-transform-perspective
    Preview info: JPEG preview quality 40; JPEG preview quality 40; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-transform-perspective.png in workflow artifacts.

  • graphics-transform-rotation — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-transform-rotation.png.

    graphics-transform-rotation
    Preview info: JPEG preview quality 50; JPEG preview quality 50; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-transform-rotation.png in workflow artifacts.

  • graphics-transform-translation — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-transform-translation.png.

    graphics-transform-translation
    Preview info: JPEG preview quality 40; JPEG preview quality 40; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-transform-translation.png in workflow artifacts.

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

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

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

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

@github-actions
Copy link

github-actions bot commented Dec 11, 2025

✅ ByteCodeTranslator Quality Report

Test & Coverage

Static Analysis

  • ✅ SpotBugs: no findings (report was not generated by the build).
  • ⚠️ PMD report not generated.
  • ⚠️ Checkstyle report not generated.

Generated automatically by the PR CI workflow.

@shai-almog shai-almog merged commit 14af4d5 into master Dec 11, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants