Repository navigation
Run Flutter widget code on Codename One - #5883
shai-almog wants to merge 593 commits into
Conversation
Flutter vs Codename OneSame application, built both ways: Flutter's AOT compile of the gallery, and the identical Dart source transpiled to Java on Codename One. Lower is better for every metric, so a ratio above 1.00x means Codename One is ahead by that factor. javascript9 interleaved rounds; host load 2.24, 1.3, 0.55
Compute -- the VM workloads (
Gate: within tolerance against
Codename One wins 3 of 3 measured metrics across 1 platform(s). |
|
Compared 12 screenshots: 12 matched. |
Native fidelity (Android, Material 3)54 pairs compared -- median 95.6%, worst 91.3% ( Distribution --
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Side-by-side comparisons (worst first)
|
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Cloudflare Preview
|
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows x64Runner CPU: AMD64 Family 25 Model 1 Stepping 1, AuthenticAMD (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
|
Compared 170 screenshots: 170 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
|
|
Compared 185 screenshots: 185 matched. ParparVM vs HotSpot (JDK 25): Linux x64Runner CPU: AMD EPYC 9V74 80-Core Processor (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
|
Compared 185 screenshots: 185 matched. ParparVM vs HotSpot (JDK 25): Linux arm64Runner CPU: Neoverse-N2 (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
|
Compared 185 screenshots: 185 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows arm64Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
Result: no regression |
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 206 screenshots: 206 matched. |
Native fidelity (ios-27-metal)68 pairs compared -- median 94.6%, worst 74.5% ( Distribution --
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Side-by-side comparisons (worst first)
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2af86e5ba
ℹ️ 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".
Native fidelity (iOS Modern, Metal)68 pairs compared -- median 95.0%, worst 83.5% ( Distribution --
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Side-by-side comparisons (worst first)
|
|
Compared 163 screenshots: 163 matched. |
|
Compared 236 screenshots: 236 matched. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9bd3a88194
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 311de5406f
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9808bc8c30
ℹ️ 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".
|
Compared 179 screenshots: 179 matched. Benchmark Results
Detailed Performance Metrics
ParparVM vs HotSpot (JDK 25): macOS arm64Runner CPU: Apple M1 (Virtual) (baseline 1 performance regression:
1 improvement past the baseline, which fails until rebaselined:
Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 15% (time) / 15% (RAM) away from its baseline in
A change that moves performance ON PURPOSE records the new baseline in Result: performance regression |
…mports, package self-imports, insertAll, takeWhile/skipWhile - A `part of` file came back as an empty library, so its declarations (model.g.dart and friends) vanished. Program.add now merges a part into its owning library, matched by the owner's `part` uri, the part's `part of` uri or library name, in either source order; an orphan part is kept as a library of its own rather than lost. - A conditional import/export recorded every alternative concatenated as one path. The parser now picks the first `if (dart.library.X)` clause whose library this runtime provides, else the default uri. - package:<own app>/x.dart was treated as external, so two project libraries declaring the same name resolved to the last registration. cn1:import-flutter-project records the pubspec name (.flutter-package) and the transpiler maps the project's own package uris to its files. - List.insertAll and List/Set takeWhile/skipWhile now lower to the runtime (DartList.insertAll copies the iterable first, so lazy views and self-insertion work). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b88c8d154e
ℹ️ 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".
…, RTL insets, overlay mount state, asset names with "..", shouldReload - dart-transpiler: a Dart override that narrows a parameter (updateShouldNotify(PageStatus), gen-l10n's shouldReload(_AppDelegate)) was emitted as a Java overload, so the runtime calling the base signature ran the base's default. The emitter now adds a bridge with the base's erased signature that casts and delegates. - dart-runtime: DartList, DartSet, DartMap's keys/values/entries and DartLongMap's iterators check for a change in hasNext() too, as Dart's moveNext does, and throw Dart's ConcurrentModificationError; clearing or shrinking during iteration used to end the loop quietly. - flutter-runtime: EdgeInsetsDirectional resolves against the ambient Directionality in Padding, Container, Card and TextField layout, so start is the right edge under RTL. - flutter-runtime: a new OverlayEntry is unmounted until inserted. - flutter-runtime: LocalizationsDelegate.shouldReload, consulted when a rebuilt app supplies a same-typed delegate. - build-engine: the importer rejects only a ".." path segment, so assets such as assets/logo..png are copied. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb95e125f0
ℹ️ 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".
…eType nulls, startsWith(RegExp), clipboard, launchUrl, controller no-op - dart-transpiler: no covariant bridge for a type-variable base parameter. RestorableProperty<T>.initWithValue(T) overridden as initWithValue(Set<X>) is already a Java override by substitution, and the Object bridge clashed with it (two methods with the same erasure), breaking the gallery build on every bench platform. Bridges also skip mismatched primitive returns and carry no @OverRide, so a mapping miss degrades to the old overload instead of a compile error. - flutter-runtime: Form is stateful. FormState is its State, reached by Form.of and GlobalKey<FormState>.currentState; FormFieldState is a State that registers with its form, runs the validator and onSaved, resets and autovalidates. TextFormField builds on it, and the error replaces the helper line. - dart-runtime: whereType<T?>() and whereType<dynamic>() keep nulls; removeWhere and identity-map iterator removals count as structural changes for the checked iterators. - String.startsWith(RegExp) lowers to a prefix match at the index. - Clipboard.getData completes with null when there is nothing to paste; launchUrl reports false when the port says it cannot open the URL; TextEditingController ignores an equal text, so a listener writing the text back no longer recurses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05f7ea1ed3
ℹ️ 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".
…sent, popup outside-dismiss, PageView controller swap, listener-started animation runs - StatefulElement calls RestorationMixin.restoreState(null, true) after initState and before the first build, so states register their restorable properties. - RestorableRouteFuture.present runs onPresent against the navigator of the registering State, and onComplete receives the pushed route's result: restorablePush/restorablePushNamed answer a unique id mapped to the route's result future. - RestorableDateTime extends RestorableValue<DateTime>, as its stub says. - A popup menu disposed by an outside tap goes through PopupMenus.dismiss (tree unmounted, tint restored, isOpen false). - A PageView given a replacement controller applies that controller's pending jump or initial page instead of the old pane offset. - AnimationController.finishRun stops at a generation change: a value listener that starts another run (reverse() at the end of forward()) leaves that run's status and future alone, and the finished run's own future completes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d4cabfb2e
ℹ️ 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".
…va level on Flutter import; release version guard - flutter-bench: Android +0.64% and JavaScript +0.53% code from the review fixes that made inert APIs real (Form validation, covariant-override bridges, restoreState, RestorableRouteFuture.present); run 38850077516. - android.nativeThemes.keepAll (declared in the catalog) keeps every Android native theme, for an app that selects the mode through a property name no build-time scan can see; mirrors ios.nativeThemes.keepAll. - cn1:import-flutter-project raises a Java 8 project's maven-compiler source/target/release and codename1.arg.java.version to 17: the transpiled sources are Java 17 (records) and failed to compile at -source 8. - update-version.sh fails if the profile-only dart-runtime or flutter-runtime POM still names the old version (versions:set does rewrite them on JDK 8 today; checked rather than assumed). - release.yml: comment at the Flutter runtime step on why it runs on JDK 17. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9243b9b27d
ℹ️ 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".
…tion, Matrix4.setRotationZ; Dart enum toString - dart-transpiler: class, enum and top-level function/variable lookups go through the import directives and honour show/hide, so `import 'a.dart' hide Foo; import 'b.dart' show Foo;` binds Foo to b. - dart-transpiler: a program enum's toString is Dart's "Mode.only" (Java's is the bare name); .name is unchanged. Found by the same fixture. - dart-runtime: Uri.parse normalizes a registered-name host as Dart does (unreserved escapes decoded, other escapes upper-case hex, ASCII lower case), so https://%65XAMPLE.com is https://example.com. - flutter-runtime: Matrix4.setRotationZ resets the whole upper 3x3 and the perspective row, keeping only the translation, as vector_math does. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0da3c26f62
ℹ️ 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".
…olution, lazy skip/skipWhile, Iterable.generate(n, null) - dart-transpiler: `a.Foo()` / `a.make()` keeps its import prefix through the bare-call lowering, and class and function resolution use the library that prefix imports; a.Foo() and b.Foo() no longer follow import order to the same declaration. - dart-transpiler: an imported library provides what it re-exports (export chains with their show/hide), for classes, enums and top-level owners, so a barrel import no longer falls back to an unrelated same-named declaration. - dart-runtime: skip and skipWhile are lazy until the iterator advances; Iterable.generate with an explicit null generator yields the indices. - SimpleDateFormat.clone keeps sharing the zone, with the reason in a comment: Codename One's TimeZone has no instance mutators. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad846c4ca1
ℹ️ 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".
… imported lib/assets sources, OpenContainer.onClosed, outgoing-page transitions - FlutterUI.wrap's root decides "removed or hidden" by whether it still belongs to a form, not by its own parent: removing an ancestor clears only the ancestor's parent, so a nested root kept its Flutter tree, State, listeners and animations alive for good. - cn1:import-flutter-project records the Dart files it copied from lib/ (.flutter-lib-sources); lib/ is copied flat, so lib/assets/x.dart sits in the assets/ root, and the transpiler now parses the recorded files there instead of skipping the whole directory as assets. - OpenContainer reports onClosed from the pushed route's result future, so the back button and a plain Navigator.pop report too, with the result. - SharedAxisTransition and FadeThroughTransition listen to both animations (new Listenable.merge): on the outgoing page only the secondary one moves, and the page never rebuilt. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb065ce701
ℹ️ 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".
…ream finishes, dialog replacement over the base page, TextFormField formatters and reset - dart-runtime: Set.identity()'s iterator is checked like every DartSet's (shared checkedIterator), so removing its last element mid-loop throws ConcurrentModificationError. - dart-runtime: a stream finished by its producer (close/endOfStream) runs its cancel hook once the last listener has its done event -- at once, or when a paused listener drains or discards it -- so StreamController.onCancel and an event channel's StreamHandler.onCancel run; never-listened streams run nothing. - flutter-runtime: pushReplacementNamed with a dialog over the base page replaces the dialog and leaves the base beneath (canPop stays true). - flutter-runtime: TextFormField forwards inputFormatters and TextFieldRenderElement applies them, in order, to every user edit before the field, controller and onChanged see it; reset restores an external controller's text from creation instead of blanking it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca289c96ef
ℹ️ 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".
…/asset collisions on import, theme pruning scans library jars, top-level runtime dependency check - developer-guide-docs.yml installs dart-runtime and flutter-runtime (the job is on JDK 17), which docs/demos/common now depends on. - cn1:import-flutter-project never lets an asset overwrite a file copied from lib/ at the same flattened path; the source is kept on every import and the clash is reported (Result.assetCollisions, warned by the mojo). - Native-theme pruning (Android, iOS, native macOS) also scans the application's library jars, listed right after the app is unzipped and before the port's archives land beside them, so a theme a library selects or opens is kept. - FlutterPomUpdater counts the runtime as wired only when it is in the project's top-level <dependencies>; a dependencyManagement entry puts nothing on the classpath. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>




















































































































































































































































































































































































Compiles Dart widget source to Java at build time and runs it on Codename One's own renderer. There is no Dart VM in the result, no embedded engine and no platform view — a Dart screen becomes ordinary Codename One components, so it inherits the theme, the event thread, the accessibility tree and the native build.
Two entry points, which are the two things a user actually wants to do:
FlutterUI.wrap(widget)returns aContainerthat goes anywhere an ordinary component does, for putting one Dart screen inside an existing app. It deliberately does not install the Material base theme, so it will not restyle the screen around it.FlutterUI.runApp(widget)mounts the tree as the whole UI, and does install it.The build wiring is the archetype's own: the
transcode-fluttergoal is already bound and is a silent no-op untilsrc/main/flutterexists. No Dart SDK is involved — the transpiler is Java and the Dart is input, never executed.Benchmark
scripts/flutter-benchbuilds one application two ways — the Flutter toolchain's release build, and the identical Dart source transpiled by Codename One — and publishes size, start-up and idle memory per platform to the PR and to port status.Neither application is vendored.
prepare.shtakes the gallery from the Flutter SDK CI clones and copies the same 159 files into both trees, so the comparison cannot drift: there is no second copy for an edit to land on. An earlier round of this work compared two different galleries and every number it produced was meaningless. The Codename One side is generated from the shipping archetype with the runtime dependency enabled — the two steps the guide tells a user to take — so a change that breaks the documented wiring breaks the benchmark too.Three measurement decisions, each because the obvious alternative flattered us:
FIRSTCONTENTis a UI-thread callback that runs before that frame is rasterised, while ourFIRSTFRAMEfires once the form is on screen. Comparing them charges one runtime for rasterising its first screen and not the other — which is what the harness this replaces did. Flutter's figure is reported as a range and the ratio uses the end least favourable to us.Runneris a thin launcher and the Dart image sits inFrameworks/App.framework. Sizing the executable compared our whole runtime against their stub.And two refusals rather than a substituted number:
Nothing contacts the build server: the
*-sourceandlocal-*targets build on the runner. Only our own numbers are gated, so a Flutter SDK upgrade that grows their build cannot turn ours red.Fidelity work in this PR
RoundBorderdraws itself when there is no shadow and nouiidmode, instead of going through a component-sized offscreen image. The cache hides the cost for a static shape; for one that animates its size it does not — a circle growing to 1618×1618 threw away a 10MB surface per frame.Component.paintInternalImplclips every component to its own rectangle, soFractionalTranslationdrew most of itself into the discarded region — the feature-discovery circle rendered as a quadrant with two straight edges meeting at its centre.FittedBoxwas a pass-through. Flutter lays its child out unbounded and scales the result, which is why text inside one shrinks instead of wrapping.Cardrebuilt its border every time, andRoundRectBordercaches its shadow against the border instance, so every rebuild re-rendered it with a gaussian blur. With the cache off it also translates the liveGraphicsby the shadow offset and never undoes it, so cards drifted 9px down and 4px across, accumulating down the page.Verification
/demo/card14.98% → 2.30%,/demo/grid-lists26.30% → 0.32%prepare.shverified end to end; the generated project builds 563 Java files from 159 Dart files, which also exercises the documented user pathNot yet proven
No benchmark platform adapter has been exercised end to end —
run_bench.py --listreports that rather than implying otherwise, and the first CI run is the thing to review. The native compile steps (xcodebuild, gradle, clang-cl, GTK3) have not run on a runner.This is also the first mention of the feature in
docs/, which has carried none until now.