Skip to content

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • Add a focused regression test that reproduces a previously-observed crash by exercising lambdas, method references, and interface default/static methods under background-thread execution.
  • Ensure the CN1SS device runner includes the test so the suite can catch bytecode/translator regressions during device runs.

Description

  • Add BytecodeTranslatorRegressionTest which defines a Mapper functional interface with a default decorate method and a static suffix method and a nested Prefixer class used via method reference.
  • The test spawns a background Thread that repeatedly combines inputs via method references and default/static interface methods, verifies output, and signals completion with CN.callSerially(this::done).
  • Register the new test in Cn1ssDeviceRunner so it runs as part of the HelloCodenameOne test suite.
  • Configure the test to skip screenshots by returning false from shouldTakeScreenshot().

Testing

  • No automated tests were run as part of this change (not requested).

Codex Task

@shai-almog
Copy link
Collaborator Author

shai-almog commented Jan 16, 2026

Compared 30 screenshots: 30 matched.

Native Android coverage

  • 📊 Line coverage: 24.91% (2670/10717 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.51% (12383/50528), branch 15.39% (719/4672), complexity 17.57% (745/4241), method 33.13% (603/1820), 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.PushNotificationService – 0.00% (0/59 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 24.91% (2670/10717 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.51% (12383/50528), branch 15.39% (719/4672), complexity 17.57% (745/4241), method 33.13% (603/1820), 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.PushNotificationService – 0.00% (0/59 lines covered)

@shai-almog
Copy link
Collaborator Author

shai-almog commented Jan 16, 2026

iOS screenshot updates

Compared 30 screenshots: 23 matched, 6 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-arc — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    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 — 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: 394 seconds
  • Compilation Time: 166 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 33555 ms
Extract Extensions 20 ms
Google Services Setup 3 ms
Scan Classes 869 ms
Extract Libs 1405 ms
Inject Build Hints 43 ms
Generate Unit Tests 2 ms
Generate Stubs 1275 ms
Compile Stubs 2889 ms
Generate Icons 1508 ms
Prepare ParparVM 336 ms
ParparVM Execution 228183 ms
Post-VM Setup 271 ms
CocoaPods 6611 ms
Finalize 28 ms
Total Time 276998 msMaven Overhead : 118000 ms
CocoaPods Install (Script) 1000 ms
Simulator Boot (Run) 89000 ms
App Install 21000 ms
App Launch 47000 ms
Test Execution 182000 ms

@github-actions
Copy link

github-actions bot commented Jan 16, 2026

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog shai-almog merged commit 8ec5227 into master Jan 16, 2026
13 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