#50293·expo

[expo-modules-core][Android] expo-modules-v2-compiler-plugin 0.1.5 fails on Kotlin 2.3 (missing CompilerPluginRegistrar.pluginId)

Author: tahakocalCreated Sep 17, 2026Updated Sep 17, 2026
Labels📦 expo-modules-coreneeds review📦 expo-modules-autolinkingcontributor: externalsdk-58severity: medium

Minimal reproducible example

https://github.com/tahakocal/expo-modules-v2-kotlin-2.3-repro

Summary

io.github.expo:expo-modules-v2-compiler-plugin:0.1.5 can't be loaded by Kotlin 2.3 compilers:

Plugin io.github.expo.modules.v2.compiler.ExpoModulesV2ComponentRegistrar is incompatible with the current version of the compiler.
Caused by: java.lang.AbstractMethodError: Receiver class io.github.expo.modules.v2.compiler.ExpoModulesV2ComponentRegistrar does not define or inherit an implementation of the resolved method 'abstract java.lang.String getPluginId()' of abstract class org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar.

Cause:

  • Kotlin 2.3.0 added abstract val pluginId: String to CompilerPluginRegistrar. It isn't there in 2.2.10, 2.2.20 or 2.2.21.
  • PluginCliParser reads pluginId for every registrar and turns the resulting LinkageError into this error.
  • The 0.1.5 plugin depends on kotlin-stdlib 2.2.10, and its registrar only implements registerExtensions and supportsK2.
  • 0.1.5 is the latest version on Maven Central.

Where this reaches users:

  • [email protected] (SDK 58 preview) uses expo-modules-v2-gradle-plugin:0.1.5.
  • Since #49710 and #50178, [email protected] applies io.github.expo.modules.v2 to Android projects automatically.
  • Unaffected: projects on React Native 0.88's default Kotlin, 2.2.0.
  • Affected: any SDK 58 Android project that builds with Kotlin 2.3 or newer, for example through expo-build-properties android.kotlinVersion or a library that requires Kotlin 2.3.
  • Expo Go: on main, Expo Go for Android sets kotlinVersion = "2.3.20" in apps/expo-go/android/build.gradle. Building it locally with ./gradlew app:assembleDebug fails in :expo:compileMobileDebugKotlin with the same error. The Expo Go Android build workflow only runs on sdk-* branches, so CI on main doesn't catch it.

Steps to reproduce

Platform: Android (Kotlin compiler). Environment: any build that applies the Expo Modules v2 compiler plugin with Kotlin 2.3+. No package manager is involved in the minimal reproduction.

  1. git clone https://github.com/tahakocal/expo-modules-v2-kotlin-2.3-repro && cd expo-modules-v2-kotlin-2.3-repro
  2. ./reproduce.sh. It downloads the published plugin jar and the official Kotlin 2.2.10 and 2.3.20 compilers, then compiles a one-line hello.kt with -Xplugin.

Expected: both compilers load the plugin and compile the file.

Actual:

== Kotlin 2.2.10 with expo-modules-v2-compiler-plugin 0.1.5
exit code: 0

== Kotlin 2.3.20 with expo-modules-v2-compiler-plugin 0.1.5
exception: org.jetbrains.kotlin.cli.jvm.plugins.PluginCliParser$PluginProcessingError: Plugin io.github.expo.modules.v2.compiler.ExpoModulesV2ComponentRegistrar is incompatible with the current version of the compiler.
Caused by: java.lang.AbstractMethodError: ... does not define or inherit an implementation of the resolved method 'abstract java.lang.String getPluginId()' of abstract class org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar.
exit code: 1

Possible fix: the plugin source (expo-modules-android-v2) isn't public, so I can't open a PR. Two options:

  • Implement pluginId in ExpoModulesV2ComponentRegistrar. On Kotlin 2.2 the extra getter is never called, but the plugin would have to be compiled against the 2.3 API.
  • Publish Kotlin-version-specific compiler plugin artifacts and let the Gradle plugin pick one from the Kotlin Gradle plugin version, like io.github.expo.pika:pika-compiler:1.0.0-2.3.20 does.

Environment

macOS 26 (arm64), OpenJDK 17.0.15
kotlinc-jvm 2.2.10 and 2.3.20 (official release zips)
io.github.expo:expo-modules-v2-compiler-plugin:0.1.5 (Maven Central)
expo-modules-core 58.0.3, expo-modules-autolinking 58.0.2, expo 58.0.0-preview.3

Expo Doctor Diagnostics

N/A: the reproduction is a standalone Kotlin compiler invocation without an Expo project.