fix(tao): give the GraalVM test image the classes it was compiled against - #657
Merged
Merged
Conversation
…inst `examples/tao-native-test` compiles decorated-window-tao's test suites into a native image, but `taoTestArtifacts` published only the classes, so every dependency of that test source set had to be repeated in the consumer. Material 3 was not, and the first case that reaches an `AlertDialog` throws `NoClassDefFoundError: androidx/compose/material3/MaterialThemeKt` **on the Tao main thread**, which closes the loop and fails the whole `test-graalvm` job on all three platforms. The configuration now extends `testImplementation`, so a dependency added to the suites reaches the image without being repeated — reproduced and verified on the JVM (`:examples:tao-native-test:run --args=headful`), which shares the classpath. While the film cases were finally running, three things they had never been green on: - Their content is composed into a `ColumnScope` next to the harness's default `fillMaxSize` background, so it was laid out at zero height: the forty rows of text that exist to make the owner's per-frame present cost something rendered nowhere. `paintDefaultBackground = false`. - The grabber started *before* the warm-up and spent its whole frame budget on it, leaving the curve with nothing after the timestamp it measures from — reported as "the dialog never showed up on screen". - One capture session covered both halves, so the appearance consumed the budget and the disappearance got no frames at all, which is what the comparison cases were failing on. Each half films in its own session now, within the same total budget. Under Xvfb + openbox the `appearance` series goes from 6 failures to 0. The `native popup layer matches the in-scene layer` comparison is borderline there (slide-in measured 15 px vs 10 px against a 4 px tolerance) because a 6 ms sample period is coarse for a 10 dp slide; the tolerances are left as calibrated. Not addressed: `graphicsLayer translation filmed — native popup layer` hangs on Linux, which is what makes that leg reach the 900 s watchdog. It draws a `GraphicsLayer` created from the *owner window's* `GraphicsContext` inside the popup's own GL context, with alpha forcing the saveLayer path; the in-scene variant of the same case passes. Pre-existing and its own investigation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test-graalvmfails on all three platforms withNoClassDefFoundError: androidx/compose/material3/MaterialThemeKt, thrown on the Tao main thread, which closes the event loop and takes the whole job down.examples/tao-native-testcompilesdecorated-window-tao's test suites into a native image, buttaoTestArtifactspublished only the compiled classes — every dependency of that test source set had to be repeated in the consumer, and Material 3 was not. The configuration now extendstestImplementation, so a dependency added to the suites reaches the image without being repeated.Reproduced and verified on the JVM (
:examples:tao-native-test:run --args=headful), which shares that classpath — two minutes instead of a 24-minute native build.With the film cases finally reaching their own code, three things they had never been green on:
ColumnScopenext to the harness's defaultfillMaxSizebackground, so the forty rows of text that exist to make the owner's per-frame present cost something rendered nowhere.paintDefaultBackground = false.matches the in-scene layercases were failing on. Each half films in its own session now, within the same total budget.Test plan
:examples:tao-native-test:run --args=headful— theNoClassDefFoundErroris gone and the suite runs past the Material 3 casestaoHeadfulTest -Dnucleus.tao.headful.filter=appearanceunder Xvfb + openbox: 6 failures → 0, two consecutive runs:decorated-window-tao:test,ktlintCheck,detekt,apiCheck;:examples:tao-native-test:compileKotlintest-graalvmon all three platforms in CIKnown, not addressed here
graphicsLayer translation filmed — native popup layerhangs on Linux, which is what makes that leg reach the 900 s watchdog. It draws aGraphicsLayercreated from the owner window'sGraphicsContextinside the popup's own GL context, with alpha forcing the saveLayer path; the in-scene variant of the same case passes. Pre-existing, and its own investigation.The
native popup layer matches the in-scene layercomparison is borderline under Xvfb (slide-in measured 15 px vs 10 px against a 4 px tolerance) — a 6 ms sample period is coarse for a 10 dp slide. Tolerances left as calibrated.