I met what seems to be a incremental compilation e...
# k2-adopters
e
I met what seems to be a incremental compilation error, here is a snippet of the stack trace:
Copy code
java.lang.IllegalStateException: Version of the generated module should not be incompatible: 1.9.0
	at org.jetbrains.kotlin.load.kotlin.incremental.IncrementalPackagePartProvider$moduleMappings$2$1$1.invoke(IncrementalPackagePartProvider.kt:45)
	at org.jetbrains.kotlin.load.kotlin.incremental.IncrementalPackagePartProvider$moduleMappings$2$1$1.invoke(IncrementalPackagePartProvider.kt:43)
From the error, it seems like it's something to do with me setting the language version to 1.9 (for data objects), so here is that as well
Copy code
plugins {
    kotlin("jvm") version "1.7.22"
}

repositories {
    mavenCentral()
}

tasks {
    sourceSets {
        main {
            java.srcDirs("src")
        }
    }

    wrapper {
        gradleVersion = "7.6"
    }
    compileKotlin {
        kotlinOptions {
            languageVersion = "1.9"
            jvmTarget = "18"
            useK2 = true
        }
    }
}
dependencies {
    // Add kotlinx.serialization to the project
    implementation(kotlin("reflect"))
}
P.S. Got it when doing the AoC so be ware of spoilers if I do attach the project.
e
I mean, instead of failing the build, maybe just a warning that incremental isn't available and continue on with a full build?
a
Please discuss in the issue
e
Oh right, sorry