# Koin Compiler 1.2: Compile-Time Safety for ALL Koin DSL

DevFeed: [Koin Compiler 1.2: Compile-Time Safety for ALL Koin DSL](<https://devfeed.tech/articles/koin-compiler-1-2-compile-time-safety-for-all-koin-dsl-22973.md>)

Original publisher: [Read original article](<https://blog.insert-koin.io/koin-compiler-1-2-compile-time-safety-for-all-koin-dsl-4603787b9921?source=rss----925561f2ecdf---4>)

Author: Arnaud Giuliani

Published: 2026-09-10T12:01:01Z

Content type: release

Language: en

Sources: [Koin developers - Medium](<https://devfeed.tech/sources/koin-developers-medium.md>)

Topics: [Compiler](<https://devfeed.tech/topics/compiler.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [koin](<https://devfeed.tech/tags/koin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>)

## AI overview

Koin Compiler Plugin 1.2, with 1.2.1 as the latest patch, extends compile-time validation to Koin's reified, constructor, and classic lambda DSLs. It also adds visibility across Gradle modules, supports additional entry points, and provides one artifact for Kotlin 2.3.20 through 2.4.20 without requiring a DSL migration.

## Source excerpt

Hello, dear Koin community 👋 I'm happy to share that Koin Compiler Plugin 1.2 is out, with 1.2.1 already available as the latest patch. Developer mascott unboxing new Koin Features!TL;DR Compile-time validation now works on the Koin application you already have, where before 1.2 it only covered code written specifically for the compiler plugin. Koin DSL -- All now covered! All Koin DSL: the plugin's reified DSL, Koin's constructor DSL (singleOf(::T)), and the classic lambda DSL (single { Foo(get()) }). Across Gradle modules: definitions are now visible two or more implementation hops away. More entry points: Ktor's install(Koin) and KoinApplication.withConfiguration<T>(). One artifact for Kotlin 2.3.20 through 2.4.20. You get there with no migration to a new DSL, and nothing to rewrite. Let's go through what shipped. Covering now all Koin DSL Until now, compile-time safety only covered the plugin's own reified DSL, which means the two DSL styles you have most likely already written were invisible to it. val appModule = module { single<UserService>() // checked singleOf(::UserRepository) // not checked before 1.2 single { AnalyticsHelper(get()) } // not checked before 1.2 } Three ways to declare a definition, and only the first was validated. If your UserRepository needed a Database that no module provided, your build passed and Koin threw at runtime. In 1.2, all three are validated. The two DSL styles get there differently. For the constructor DSL, the referenced constructor's parameters become real requirements, exactly like single<T>(), and any named() qualifier you put on the registration is matched against the consumers that ask for it. The classic lambda DSL works differently. The plugin doesn't try to work out dependencies from free-form lambda code. What it validates instead are the get() calls you wrote inside the lambda, treated as ordinary resolution call sites. Before 1.2 those calls were skipped on purpose, because a hand-written get() is difficult to dis