From def1b59f78adbdb9d2587ae7c0261329681ae3d2 Mon Sep 17 00:00:00 2001 From: Yang Date: Sun, 22 Mar 2026 22:21:21 +1100 Subject: [PATCH 1/2] Chameleon - remove FIR dumps. --- .../src/test/data/box/Basic.fir.kt.txt | 34 +++++++++++++++++++ .../src/test/data/box/Basic.fir.txt | 22 ------------ .../box/ExistingThemeVariantProperty.fir.txt | 25 -------------- .../data/box/NoSnapshotFunctionCalls.fir.txt | 16 --------- .../box/ThemeVariantArgumentProvided.fir.txt | 22 ------------ .../chameleon/compiler/AbstractBoxTest.kt | 2 -- 6 files changed, 34 insertions(+), 87 deletions(-) create mode 100644 build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.kt.txt delete mode 100644 build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.txt delete mode 100644 build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/ExistingThemeVariantProperty.fir.txt delete mode 100644 build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/NoSnapshotFunctionCalls.fir.txt delete mode 100644 build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/ThemeVariantArgumentProvided.fir.txt diff --git a/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.kt.txt b/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.kt.txt new file mode 100644 index 00000000..9cc34262 --- /dev/null +++ b/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.kt.txt @@ -0,0 +1,34 @@ +@Chameleon +@Burst +class ComponentTest { + private val themeVariant: ThemeVariant + field = themeVariant + private get + + val snapshotTester: SnapshotTester + field = SnapshotTester() + get + + constructor(themeVariant: ThemeVariant) /* primary */ { + super/*Any*/() + /* () */ + + } + + @Test + fun snapshot_Component() { + .().snapshot(themeVariant = .(), content = local fun () { + Component() + } +) + } + +} + +@Composable +fun Component() { +} + +fun box(): String { + return "OK" +} diff --git a/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.txt b/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.txt deleted file mode 100644 index 185bd955..00000000 --- a/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.txt +++ /dev/null @@ -1,22 +0,0 @@ -FILE: Basic.kt - @R|io/github/reactivecircus/chameleon/runtime/Chameleon|() public final class ComponentTest : R|kotlin/Any| { - public constructor(): R|ComponentTest| { - super() - } - - public final val snapshotTester: R|SnapshotTester| = R|/SnapshotTester.SnapshotTester|() - public get(): R|SnapshotTester| - - @R|Test|() public final fun snapshot_Component(): R|kotlin/Unit| { - this@R|/ComponentTest|.R|/ComponentTest.snapshotTester|.R|/SnapshotTester.snapshot|( = snapshot@fun (): R|kotlin/Unit| { - R|/Component|() - } - ) - } - - } - @R|Composable|() public final fun Component(): R|kotlin/Unit| { - } - public final fun box(): R|kotlin/String| { - ^box String(OK) - } diff --git a/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/ExistingThemeVariantProperty.fir.txt b/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/ExistingThemeVariantProperty.fir.txt deleted file mode 100644 index 15423a96..00000000 --- a/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/ExistingThemeVariantProperty.fir.txt +++ /dev/null @@ -1,25 +0,0 @@ -FILE: ExistingThemeVariantProperty.kt - @R|io/github/reactivecircus/chameleon/runtime/Chameleon|() public final class ComponentTest : R|kotlin/Any| { - public constructor(themeVariant: R|ThemeVariant|): R|ComponentTest| { - super() - } - - public final val themeVariant: R|ThemeVariant| = R|/themeVariant| - public get(): R|ThemeVariant| - - public final val snapshotTester: R|SnapshotTester| = R|/SnapshotTester.SnapshotTester|() - public get(): R|SnapshotTester| - - @R|Test|() public final fun snapshot_Component(): R|kotlin/Unit| { - this@R|/ComponentTest|.R|/ComponentTest.snapshotTester|.R|/SnapshotTester.snapshot|(this@R|/ComponentTest|.R|/ComponentTest.themeVariant|, = snapshot@fun (): R|kotlin/Unit| { - R|/Component|() - } - ) - } - - } - @R|Composable|() public final fun Component(): R|kotlin/Unit| { - } - public final fun box(): R|kotlin/String| { - ^box String(OK) - } diff --git a/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/NoSnapshotFunctionCalls.fir.txt b/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/NoSnapshotFunctionCalls.fir.txt deleted file mode 100644 index 2114b6a9..00000000 --- a/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/NoSnapshotFunctionCalls.fir.txt +++ /dev/null @@ -1,16 +0,0 @@ -FILE: NoSnapshotFunctionCalls.kt - @R|io/github/reactivecircus/chameleon/runtime/Chameleon|() public final class ComponentTest : R|kotlin/Any| { - public constructor(): R|ComponentTest| { - super() - } - - @R|Test|() public final fun foo(): R|kotlin/Unit| { - R|/Foo|() - } - - } - public final fun Foo(): R|kotlin/Unit| { - } - public final fun box(): R|kotlin/String| { - ^box String(OK) - } diff --git a/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/ThemeVariantArgumentProvided.fir.txt b/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/ThemeVariantArgumentProvided.fir.txt deleted file mode 100644 index 9941f6e9..00000000 --- a/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/ThemeVariantArgumentProvided.fir.txt +++ /dev/null @@ -1,22 +0,0 @@ -FILE: ThemeVariantArgumentProvided.kt - @R|io/github/reactivecircus/chameleon/runtime/Chameleon|() public final class ComponentTest : R|kotlin/Any| { - public constructor(): R|ComponentTest| { - super() - } - - public final val snapshotTester: R|SnapshotTester| = R|/SnapshotTester.SnapshotTester|() - public get(): R|SnapshotTester| - - @R|Test|() public final fun snapshot_Component_Dark(): R|kotlin/Unit| { - this@R|/ComponentTest|.R|/ComponentTest.snapshotTester|.R|/SnapshotTester.snapshot|(Boolean(false), Q|ThemeVariant|.R|/ThemeVariant.Dark|, = snapshot@fun (): R|kotlin/Unit| { - R|/Component|() - } - ) - } - - } - @R|Composable|() public final fun Component(): R|kotlin/Unit| { - } - public final fun box(): R|kotlin/String| { - ^box String(OK) - } diff --git a/build-logic/chameleon/chameleon-compiler-plugin/src/test/kotlin/io/github/reactivecircus/chameleon/compiler/AbstractBoxTest.kt b/build-logic/chameleon/chameleon-compiler-plugin/src/test/kotlin/io/github/reactivecircus/chameleon/compiler/AbstractBoxTest.kt index 09cd6fc2..86f917f3 100644 --- a/build-logic/chameleon/chameleon-compiler-plugin/src/test/kotlin/io/github/reactivecircus/chameleon/compiler/AbstractBoxTest.kt +++ b/build-logic/chameleon/chameleon-compiler-plugin/src/test/kotlin/io/github/reactivecircus/chameleon/compiler/AbstractBoxTest.kt @@ -6,7 +6,6 @@ import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_IR import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.IGNORE_DEXING import org.jetbrains.kotlin.test.directives.ConfigurationDirectives.WITH_STDLIB import org.jetbrains.kotlin.test.directives.FirDiagnosticsDirectives.DISABLE_GENERATED_FIR_TAGS -import org.jetbrains.kotlin.test.directives.FirDiagnosticsDirectives.FIR_DUMP import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.FULL_JDK import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.JVM_TARGET import org.jetbrains.kotlin.test.runners.codegen.AbstractFirLightTreeBlackBoxCodegenTest @@ -31,7 +30,6 @@ open class AbstractBoxTest : AbstractFirLightTreeBlackBoxCodegenTest() { +IGNORE_DEXING // Avoids loading R8 from the classpath. +DISABLE_GENERATED_FIR_TAGS - +FIR_DUMP +DUMP_IR } } From b07cf0525412c3808773b62702d0273c2c507d78 Mon Sep 17 00:00:00 2001 From: Yang Date: Sun, 22 Mar 2026 22:31:34 +1100 Subject: [PATCH 2/2] Remove kt dump. --- .../src/test/data/box/Basic.fir.kt.txt | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.kt.txt diff --git a/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.kt.txt b/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.kt.txt deleted file mode 100644 index 9cc34262..00000000 --- a/build-logic/chameleon/chameleon-compiler-plugin/src/test/data/box/Basic.fir.kt.txt +++ /dev/null @@ -1,34 +0,0 @@ -@Chameleon -@Burst -class ComponentTest { - private val themeVariant: ThemeVariant - field = themeVariant - private get - - val snapshotTester: SnapshotTester - field = SnapshotTester() - get - - constructor(themeVariant: ThemeVariant) /* primary */ { - super/*Any*/() - /* () */ - - } - - @Test - fun snapshot_Component() { - .().snapshot(themeVariant = .(), content = local fun () { - Component() - } -) - } - -} - -@Composable -fun Component() { -} - -fun box(): String { - return "OK" -}