build: bump R8 to 9.1.31 for Kotlin 2.3 metadata parsing#143
Open
OmarAlJarrah wants to merge 1 commit into
Open
build: bump R8 to 9.1.31 for Kotlin 2.3 metadata parsing#143OmarAlJarrah wants to merge 1 commit into
OmarAlJarrah wants to merge 1 commit into
Conversation
The shrink-survival module pinned R8 8.9.35, whose Kotlin-metadata support only covers Kotlin up to 2.1. Since this project compiles with Kotlin 2.3, every R8 shrink run emitted non-fatal Info/Warning lines reporting that it could not parse the 2.3 @metadata annotations. The output stayed correct (the @metadata annotation is retained via the shipped keep-rules and the Jackson kotlin-reflect round-trip passes), but the noise on every run risked masking a genuinely relevant warning. R8 9.1.31 is the current stable release and parses Kotlin 2.3 metadata. It is still Java-11 bytecode, so the JDK-11 launcher and --lib boot image in sdk-shrink-test are unchanged. The shrink run is now quiet. Closes #112
Member
Author
|
Straightforward dependency bump: R8 goes from 8.9.35 to 9.1.31 in The change is scoped to the single version-catalog entry and only affects the test-only |
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.
Problem
The test-only
sdk-shrink-testmodule pinned R88.9.35. That R8 line'sKotlin-metadata support only covers Kotlin up to 2.1, but this project
compiles with Kotlin 2.3. As a result every R8 shrink run emitted non-fatal
Info/Warninglines reporting that it could not parse the Kotlin 2.3@Metadataannotations.The shrunk output stayed correct —
@Metadatais retained via the shipped-keepattributes RuntimeVisibleAnnotations/-keep class kotlin.Metadatarules, and the consumer program's Jackson kotlin-reflect round-trip passes —
but the per-run noise risked masking a genuinely relevant warning.
Change
Bump the
r8version ingradle/libs.versions.tomlfrom8.9.35to9.1.31, the current stable R8 release, which parses Kotlin 2.3 metadata.R8 9.x is still Java-11 bytecode, so the JDK-11 launcher and
--libbootimage in
sdk-shrink-testare unchanged; no build-script edits were needed.Verification
JDK 11 (Microsoft OpenJDK 11.0.28) and network access to Google's Maven repo
were both available, so the shrink pipeline was exercised end to end:
./gradlew :sdk-shrink-test:r8Run --no-daemon— BUILD SUCCESSFUL; theshrunk consumer printed the
SHRINK-SURVIVAL-OKsentinel../gradlew :sdk-shrink-test:r8Shrink --rerun-tasks --no-daemonthengrepping the output for
metadata/cannot parse/ KotlinInfo/Warninglines — none emitted by R8. The shrink run is now quiet, confirming the
bump resolves the metadata-parse noise.
Closes #112