https://kotlinlang.org logo
#k2-early-adopters
Title
# k2-early-adopters
j

jschneider

11/17/2023, 8:42 AM
I have one more strange problem. Since the update to 2.0.0-beta1 I get strange compile errors in one module: file///home/johannes/projects/com.cedarsoft.monorepo/internal/closed/rest/model/src/commonMain/kotlin/it/neckar/rest/jwt/JwtTokenClaim.kt3:12 The offending line:
import com.benasher44.uuid.uuidFrom
Which does not make a lot of sense, since this line compiles finde with 1.9. And the import also works fine in another module. It seems to be related to the gradle dependencies. Which are not very spectacular... Any ideas, suggestions?
Uuuh, it seems to be related to the order of the dependencies: This does work: api("com.benasher44uuid0.8.1") api(project(Projects.open_commons_uuid)) This does not work: api(project(Projects.open_commons_uuid)) api("com.benasher44uuid0.8.1") Removing the dependency to benasher44:uuid completely also runs into the compile error. The project open_commons_uuid has these dependencies:
Copy code
commonMain {
      dependencies {
        implementation(KotlinX.serialization.core)
        api("com.benasher44:uuid:0.8.1")
      }
    }
So I am a bit lost now.
m

mbonnin

11/17/2023, 2:40 PM
What is the error you get? It should say something more than just
Copy code
file:///home/johannes/projects/com.cedarsoft.monorepo/internal/closed/rest/model/src/commonMain/kotlin/it/neckar/rest/jwt/JwtTokenClaim.kt:3:12
j

jschneider

11/17/2023, 3:13 PM
Uuh. Sorry 🙂 e: file///home/johannes/projects/com.cedarsoft.monorepo/internal/closed/rest/model/src/commonMain/kotlin/it/neckar/rest/jwt/JwtTokenClaim.kt3:12 Unresolved reference 'benasher44'. e: file///home/johannes/projects/com.cedarsoft.monorepo/internal/closed/rest/model/src/commonMain/kotlin/it/neckar/rest/jwt/JwtTokenClaim.kt52:43 Unresolved reference 'uuidFrom'. e: file///home/johannes/projects/com.cedarsoft.monorepo/internal/closed/rest/model/src/commonMain/kotlin/it/neckar/rest/jwt/RefreshTokenChainId.kt3:12 Unresolved reference 'benasher44'. e: file///home/johannes/projects/com.cedarsoft.monorepo/internal/closed/rest/model/src/commonMain/kotlin/it/neckar/rest/jwt/RefreshTokenChainId.kt10:44 Unresolved reference 'Uuid'.
The compiler doesn't find the dependency. Line 3 points to the import statement:
import com.benasher44.uuid.uuidFrom
2 Views