Skip to content

Commit 3b5fe83

Browse files
shai-almogclaude
andcommitted
Merge master into desktop-compat-layer
Conflicts resolved: - Escape analysis: master landed the same fix (EXACT_CALL, lastClusterStore, resolveReceiverCall); took master's and kept the private-method nestmate resolution in resolveReceiverCall. - URLEncoder/URLDecoder (JavaAPI): took master's codec. - Linux/Windows ports: kept the core JDK host installer, added master's window size hints; Linux a11y keeps the pointer pass-through on master's batching. - Lock/FileClass integration tests: kept the deletion (covered by bulk runs). - Gate lists, spotbugs excludes and guide accept lists: kept both sides. CI fixes in the same commit: - Stream pipelines unbox through helpers, so the cast-semantics gate no longer sees a checkcast inside the try/catch(Throwable) blocks. - iOS packaging and Metal screenshot timeouts raised: the hello app now ships the Swing/JavaFX runtimes, about 22% more translated C. - Bulk conformance case 38 uses an empty charset name, which both runtimes refuse under master's lazier encoder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 parents ff8af79 + 6141fc8 commit 3b5fe83

2,143 files changed

Lines changed: 253221 additions & 3136 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: Dart and Flutter tests
2+
3+
# Runs the unit and behavior tests of the Dart transpiler and the two runtimes
4+
# it targets (maven/dart-transpiler, maven/dart-runtime, maven/flutter-runtime).
5+
#
6+
# Nothing else does. pr.yml runs core-unittests only, and flutter-bench.yml
7+
# builds these modules with -DskipTests. The transpiler's BehaviorTest and
8+
# CompileGeneratedTest are also SKIPPED, not failed, when JAVA17_HOME or the
9+
# runtime jars are missing, so a leg that merely forgot JAVA17_HOME would stay
10+
# green having executed nothing. CN1_DART_TESTS_REQUIRED=1 below turns those
11+
# skips into failures, and the last step checks the reports independently.
12+
13+
on:
14+
pull_request:
15+
paths:
16+
- 'maven/dart-transpiler/**'
17+
- 'maven/dart-runtime/**'
18+
- 'maven/flutter-runtime/**'
19+
# Everything those modules compile against: the runtimes depend on core,
20+
# whose sources are CodenameOne/src, and -am builds factory with it.
21+
- 'CodenameOne/src/**'
22+
- 'Factory/src/**'
23+
- 'maven/core/**'
24+
- 'maven/factory/**'
25+
- 'maven/pom.xml'
26+
- 'scripts/ci/retry.sh'
27+
- '.github/workflows/dart-flutter-tests.yml'
28+
push:
29+
branches:
30+
- master
31+
paths:
32+
- 'maven/dart-transpiler/**'
33+
- 'maven/dart-runtime/**'
34+
- 'maven/flutter-runtime/**'
35+
- 'CodenameOne/src/**'
36+
- 'Factory/src/**'
37+
- 'maven/core/**'
38+
- 'maven/factory/**'
39+
- 'maven/pom.xml'
40+
- 'scripts/ci/retry.sh'
41+
- '.github/workflows/dart-flutter-tests.yml'
42+
workflow_dispatch:
43+
44+
permissions:
45+
contents: read
46+
# The pr-ci-container image lives on ghcr; without this the job dies in
47+
# "Initialize containers" with a bare "denied".
48+
packages: read
49+
50+
concurrency:
51+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
52+
cancel-in-progress: true
53+
54+
jobs:
55+
dart-flutter-tests:
56+
runs-on: ubuntu-24.04
57+
timeout-minutes: 45
58+
container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
59+
env:
60+
# The behavior tests write UTF-8 sources and read UTF-8 output.
61+
LANG: C.UTF-8
62+
LC_ALL: C.UTF-8
63+
defaults:
64+
run:
65+
shell: bash
66+
steps:
67+
- uses: actions/checkout@v6
68+
69+
- name: Check the container's JDK 17
70+
run: |
71+
if [ -z "${JAVA_HOME_17:-}" ] || [ ! -x "$JAVA_HOME_17/bin/javac" ]; then
72+
echo "JAVA_HOME_17 is unset or has no javac: '${JAVA_HOME_17:-<unset>}'" >&2
73+
exit 1
74+
fi
75+
echo "JAVA_HOME=$JAVA_HOME_17" >> "$GITHUB_ENV"
76+
echo "JAVA17_HOME=$JAVA_HOME_17" >> "$GITHUB_ENV"
77+
echo "$JAVA_HOME_17/bin" >> "$GITHUB_PATH"
78+
79+
- name: Cache Maven dependencies
80+
uses: actions/cache@v5
81+
with:
82+
path: ~/.m2
83+
key: ${{ runner.os }}-m2-dart-${{ hashFiles('**/pom.xml') }}
84+
restore-keys: |
85+
${{ runner.os }}-m2-dart-
86+
${{ runner.os }}-m2
87+
88+
# JDK 17, because the runtimes compile at release 17: maven/pom.xml adds
89+
# them to the reactor only on 17+ (flutter-modules), and the transpiler
90+
# only gets them on its test classpath there (transpiler-tests).
91+
#
92+
# verify rather than test: the transpiler's harness links the generated
93+
# Java against the runtime JARS in each module's target/, which test never
94+
# packages. Javadoc and the static analysis gates are skipped -- they are
95+
# not what this job is for, and the core's run in pr.yml.
96+
- name: Run the transpiler and runtime tests
97+
env:
98+
CN1_DART_TESTS_REQUIRED: '1'
99+
# Retry only a dependency-resolution failure, never a failing test.
100+
RETRY_ONLY_MATCHING: transient
101+
run: |
102+
cd maven
103+
bash ../scripts/ci/retry.sh mvn -B verify \
104+
-pl core,dart-runtime,flutter-runtime,dart-transpiler -am \
105+
-Dmaven.javadoc.skip=true -Dmaven.source.skip=true \
106+
-Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
107+
108+
# Independent of the switch above: a module whose tests silently stopped
109+
# running (a profile that no longer activates, a surefire include that
110+
# matches nothing) produces no report at all, which no test can notice.
111+
- name: Check that every suite ran
112+
run: |
113+
python3 - <<'EOF'
114+
import glob, os, sys
115+
import xml.etree.ElementTree as ET
116+
117+
def totals(pattern):
118+
tests = skipped = 0
119+
files = glob.glob(pattern)
120+
for f in files:
121+
r = ET.parse(f).getroot()
122+
tests += int(r.get("tests", 0))
123+
skipped += int(r.get("skipped", 0))
124+
return len(files), tests, skipped
125+
126+
failed = False
127+
for module in ("dart-runtime", "flutter-runtime", "dart-transpiler"):
128+
n, tests, skipped = totals("maven/%s/target/surefire-reports/TEST-*.xml" % module)
129+
print("%s: %d reports, %d tests, %d skipped" % (module, n, tests, skipped))
130+
if tests == 0:
131+
print("::error::%s ran no tests" % module)
132+
failed = True
133+
134+
harness = "maven/dart-transpiler/target/surefire-reports/TEST-com.codename1.dart.transpiler.harness.%s.xml"
135+
cases = [d for d in os.listdir("maven/dart-transpiler/src/test/resources/behavior")
136+
if os.path.isdir(os.path.join("maven/dart-transpiler/src/test/resources/behavior", d))]
137+
for name, expected in (("BehaviorTest", len(cases)), ("CompileGeneratedTest", 2)):
138+
n, tests, skipped = totals(harness % name)
139+
print("%s: %d tests, %d skipped (expected %d)" % (name, tests, skipped, expected))
140+
if n == 0 or tests < expected or skipped != 0:
141+
print("::error::%s did not run every case: %d run, %d skipped, %d expected"
142+
% (name, tests, skipped, expected))
143+
failed = True
144+
sys.exit(1 if failed else 0)
145+
EOF

‎.github/workflows/developer-guide-docs.yml‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ on:
77
- 'docs/developer-guide/**'
88
- 'docs/demos/**'
99
- 'scripts/developer-guide/**'
10+
# The Wayline chapters include the sample's own sources by tag, so moving
11+
# or deleting a tagged region there changes the guide without touching
12+
# docs/. Only the trigger, not the `docs` filter below: the Asciidoctor
13+
# lint runs on every trigger and fails on a tag it cannot find, and the
14+
# sample itself is compiled and tested by wayline.yml, so the demo build
15+
# and the figure render have nothing to add for it.
16+
- 'scripts/wayline/**'
1017
# The API-name check derives the published pages from the javadoc's own
1118
# sources, and the guide links into the java.* compatibility classes --
1219
# java/util/List.html among them. A change that renames or deletes one
@@ -151,8 +158,14 @@ jobs:
151158
if: github.event_name != 'pull_request' || steps.changes.outputs.docs == 'true' || steps.changes.outputs.demos == 'true' || steps.changes.outputs.workflow == 'true'
152159
run: |
153160
set -euo pipefail
154-
xvfb-run -a mvn -B -ntp -f maven/pom.xml \
155-
-pl core,javase,android,css-compiler,codenameone-maven-plugin,backend,backend-test \
161+
# Through retry.sh, transient failures only, like the demo install below:
162+
# this is the step that resolves the most from Central, and a single 502
163+
# on a plugin dependency (maven-shared-utils) failed the whole guide build.
164+
# dart-runtime and flutter-runtime: docs/demos/common depends on the Flutter
165+
# runtime at this version, which nothing else selected here pulls in; they are
166+
# in the reactor because this job runs on JDK 17 (the flutter-modules profile).
167+
RETRY_ONLY_MATCHING=transient xvfb-run -a bash scripts/ci/retry.sh mvn -B -ntp -f maven/pom.xml \
168+
-pl core,javase,android,css-compiler,codenameone-maven-plugin,backend,backend-test,dart-runtime,flutter-runtime \
156169
-am install \
157170
-Plocal-dev-javase \
158171
-DskipTests \

0 commit comments

Comments
 (0)