Skip to content

Exclude transitive kotlin-stdlib from kotlin-metadata-jvm#6726

Merged
timtebeek merged 1 commit into
replace-deprecated-kotlin-methodsfrom
timtebeek/fix-pr-6561
Feb 12, 2026
Merged

Exclude transitive kotlin-stdlib from kotlin-metadata-jvm#6726
timtebeek merged 1 commit into
replace-deprecated-kotlin-methodsfrom
timtebeek/fix-pr-6561

Conversation

@timtebeek

@timtebeek timtebeek commented Feb 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Exclude transitive kotlin-stdlib from kotlin-metadata-jvm:2.1.0 to prevent it from overriding the parser's embedded kotlin-stdlib:1.9.25, which was causing Kotlin test failures with "module was compiled with an incompatible version of Kotlin" metadata version errors

  • Remove extra blank line flagged in review

  • Fixes CI for Add recipes for Kotlinx coroutines and serialization, based on ReplaceWith #6561

🤖 Generated with Claude Code

The kotlin-metadata-jvm:2.1.0 dependency pulls in kotlin-stdlib:2.1.0,
which conflicts with the parser's embedded kotlin-stdlib:1.9.25 and
causes existing Kotlin tests to fail with metadata version errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Feb 12, 2026
@timtebeek timtebeek merged commit d721c4e into replace-deprecated-kotlin-methods Feb 12, 2026
@timtebeek timtebeek deleted the timtebeek/fix-pr-6561 branch February 12, 2026 23:29
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Feb 12, 2026
timtebeek added a commit that referenced this pull request Feb 13, 2026
…ceWith` (#6561)

* Add `ReplaceDeprecatedKotlinMethod` with `template` argument

Follows the pattern we already have for `InlineMethodCalls`, but now for Kotlin.

Related openrewrite/rewrite-third-party#57

* Update recipes.csv

* Move and add scanner/generator for faster iterations

* Improve the scanner, generator and replacement recipe

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Move filter to scanner; keep Kotlin types and use `*` for generic types

* Handle extension functions and receivers

* Add comments to show original expression

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Special handling for suspend and coroutines

* Add recipes for Kotlinx

* Polish `ReplaceDeprecatedKotlinMethod`

* Also support replacements for constructors

* Rename recipe

* Add a test for constructor replacement

* Quick renames

* Expect explicit groupId passed in

* Apply formatter

* Polish DeprecatedMethodScanner

* Collapse catch blocks

* Use `<init>`

Co-authored-by: Knut Wannheden <knut@moderne.io>

* Exclude transitive kotlin-stdlib from kotlin-metadata-jvm (#6726)

The kotlin-metadata-jvm:2.1.0 dependency pulls in kotlin-stdlib:2.1.0,
which conflicts with the parser's embedded kotlin-stdlib:1.9.25 and
causes existing Kotlin tests to fail with metadata version errors.

Co-authored-by: Tim te Beek <tim@mac.home>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Comment out the testRuntime dependencies when not generating

* Increase heap size

* Update recipes.csv

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Knut Wannheden <knut@moderne.io>
Co-authored-by: Tim te Beek <tim@mac.home>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant