Move five kotlin-analysis-api dependencies to the version catalog - #3127
Conversation
Continuing the inline versions for google#2968: kotlinx-collections-immutable, caffeine, javaslang, javax.inject, and kotlin-reflect move from hardcoded versions to catalog accessors.
|
Sorry for the delay on this @KlyneChrysler . Thank you for doing this - can i ask you to also check if the 2 dependency i outlined are used. |
|
javaslang has zero references anywhere in the repo so it can be dropped, and kotlin-reflect is used only by kotlin.reflect.full.isSubclassOf in the tests so it belongs on testImplementation, both verified by compiling main and tests with javaslang removed and kotlin-reflect moved to test. |
There was a problem hiding this comment.
Sounds good. I think removing the kotlin-reflect dependency might also solve a few issues users have with conflicting class paths, although I'm not sure about that. In any case, it's good to remove unused dependencies. I'm worried, however, that these dependencies are inherited from Kotlin/AA. Let's try to remove the dependencies and see what happens. :)
EDIT: I cannot find any reference to javaslang in the Kotlin repo either.
Per review: both are unused as explicit declarations. javaslang has no references anywhere in the repo, and kotlin.reflect.full is used only in tests but resolves transitively from Kotlin/Analysis-API. main and test both compile with the two declarations removed, so they are dropped rather than added to the catalog.
|
Done, removed both entirely rather than cataloging them. You were right that they are inherited from Kotlin/Analysis-API: main and the tests both still compile with the two explicit declarations gone, and the test's kotlin.reflect.full.isSubclassOf resolves transitively. Left it to CI to confirm the full suite. |
|
@jaschdoc please review again and merge if all good from your end |
jaschdoc
left a comment
There was a problem hiding this comment.
Thank you for updating the PR. Looks good :)
Continuing the inline build file versions for #2968, following #3105.
Five hardcoded dependency versions in kotlin-analysis-api move to catalog accessors: kotlinx-collections-immutable, caffeine, javaslang, javax.inject, and kotlin-reflect.
Verified that resolution is unchanged: ./gradlew :kotlin-analysis-api:dependencies output for the compile and runtime classpaths is identical before and after this commit, 156 lines compared. :kotlin-analysis-api:compileKotlin passes.