Status Update
Comments
be...@google.com <be...@google.com>
be...@google.com <be...@google.com>
ni...@ansman.se <ni...@ansman.se> #2
I’d like to make a case for supporting multiple files. We’d like to have a common stability file across the whole project (for truly immutable stuff like java.time.Instant
) but also allow module specific fixes
be...@google.com <be...@google.com> #3
Makes sense! We should be able to do that
ap...@google.com <ap...@google.com> #4
Branch: androidx-main
commit 028a8b04adc10a851b2954455dcce29affa9fb49
Author: Ben Trengrove <bentrengrove@google.com>
Date: Thu Feb 15 09:40:38 2024
Support multiple stability configuration files
Fixes: 325326744
Test: SingleStabilityConfigurationTest & MultipleStabilityConfigurationTest
Relnote: Support multiple stability configuration files
Change-Id: I8db1452cf033d493255ae54d0a708be636a47eea
M compose/compiler/compiler-hosted/integration-tests/src/jvmTest/kotlin/androidx/compose/compiler/plugins/kotlin/StabilityConfigurationParserTests.kt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.MultipleStabilityConfigurationTest/testExternalTypeStable[useFir = false].txt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.MultipleStabilityConfigurationTest/testExternalTypeStable[useFir = true].txt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.SingleStabilityConfigurationTest/testExternalTypeStable[useFir = false].txt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/golden/androidx.compose.compiler.plugins.kotlin.SingleStabilityConfigurationTest/testExternalTypeStable[useFir = true].txt
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/testStabilityConfigFiles/config1.conf
A compose/compiler/compiler-hosted/integration-tests/src/test/resources/testStabilityConfigFiles/config2.conf
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/ComposePlugin.kt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/analysis/StabilityConfigParser.kt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/analysis/StabilityExternalClassNameMatching.kt
ub...@gmail.com <ub...@gmail.com> #5
This change seems to have broken behavior when a stability configuration file does not exist. Previously it would ignore this case, now it triggers a build error.
This is relevant when there is a single specification for a module-local stability configuration in a project. Modules could have a stability configuration file at the specified path, or they could have no such file. Now (Compose Compiler 1.5.11) the absence of this file breaks the build.
Only one module in my project has this file, all others do not.
For example:
kotlinOptions {
freeCompilerArgs += [
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=" +
layout.projectDirectory.file('compose_compiler.conf').asFile.absolutePath
]
}
Error is e: Project/module/compose_compiler.conf (No such file or directory)
pr...@google.com <pr...@google.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.compiler:compiler-hosted:1.5.11
Description
The plugin option is set to allow multiple occurrences , but then we only read one path.
We should either just disable that, or support multiple files.