Skip to content

2.3.12

Latest

Choose a tag to compare

@mkmuir0 mkmuir0 released this 09 Sep 18:27

What's Changed

Migrating Processors to Support Backing Fields

This release introduces support for explicit backing fields (#2873 ), which may now be returned by Resolver.getSymbolsWithAnnotation. To prevent breaking existing processors, new language features require an explicit opt-in.

Processors adapting to new features must opt in via both of the following steps simultaneously (failing to do both may lead to undefined behavior):

  1. The processor should call the registerProcessorForNewFeatures function in SymbolProcessorEnvironment immediately when created (and only once). Example: AbstractTestProcessor.kt#L30
  2. All implementations of KSVisitor should move to KSVisitorNext. If their processor code does not directly implement the interface but instead extends one of the KSP-provided visitors (such as KSTopDownVisitor), they should instead extend KSTopDownVisitor(enableNewFeatures = true) and override visitBackingField depending on their code and needs.

Bug Fixes

  • Fix Resolver.getDeclarationsFromPackage returning incomplete declarations from KLibs in Kotlin Multiplatform (#2396)
  • Fix KSP CLI process hanging indefinitely when a processor throws an unhandled exception (#3120)
  • Fix implicit task dependency error between KSP and Android Lint in Android KMP (#3128)
  • Fix NullPointerException by registering PluginProblemReporter as an application service (#3140)
  • Do not mark companion objects as JAVA_STATIC in Resolver.effectiveJavaModifiers (#3125)
  • Fix JAVA_STATIC modifier resolution for @JvmStatic members in Resolver.effectiveJavaModifiers (#3124)
  • Update minimum supported Android Gradle Plugin (AGP) version to 8.12.0 (#3149)

New Contributors

Thanks to @KlyneChrysler, @budindepunk, and everyone who reported bugs and participated in discussions!

Full Changelog: 2.3.11...2.3.12