Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null pointer exception when building IOS MainViewController with simple App implementation #3437

Closed
krisbitney opened this issue Jul 30, 2023 · 31 comments
Assignees
Labels
bug Something isn't working ios reproduced

Comments

@krisbitney
Copy link

krisbitney commented Jul 30, 2023

Describe the bug
When building, the MainViewController for iOS encounters a null pointer exception when attempting to construct an App instance.

Affected platforms
iOS

Versions
#Versions
My OS: Mac OS Ventura (M1 macbook air)

Target iOS versions: iOS 14.1
Target JVM toolchain: 11

#Android
android.useAndroidX=true
android.compileSdk=33
android.targetSdk=33
android.minSdk=24

Other

kotlin.version=1.9.0
agp.version=8.1.0
compose.version=1.5.0-beta01 (I also got the exception with 1.4.1 and 1.4.3)

To Reproduce
Not sure

Expected behavior
Successful build (hopefully!)

Screenshots
My code:
Screenshot 2023-07-30 at 5 03 48 PM

Additional context
Full stack trace:
npe_error_log.txt

The iOS build has two dependencies: SqlDelight and an xcframework stored locally and configured with cinterop.

@krisbitney krisbitney added bug Something isn't working submitted labels Jul 30, 2023
@dima-avdeev-jb
Copy link
Contributor

Can you please create a minimal reproducible sample and share it on GitHub ?

@dima-avdeev-jb dima-avdeev-jb added wait for reply Further information is requested ios and removed submitted labels Jul 31, 2023
@dima-avdeev-jb dima-avdeev-jb self-assigned this Jul 31, 2023
@krisbitney
Copy link
Author

Can you please create a minimal reproducible sample and share it on GitHub ?

I found that it's caused by adding or removing the SQLDelight plugin id("app.cash.sqldelight") version "2.0.0".

Even with no related dependencies, configuration, or code, the exception occurs when the plugin is present.

@dima-avdeev-jb
Copy link
Contributor

I am trying to reproduce it here, but it works as expected
https://github.com/dima-avdeev-jb/sql-delight-compose-mpp-issue

Can you please share a minimal reproducible sample on GitHub ?

@qdsfdhvh
Copy link

qdsfdhvh commented Aug 2, 2023

@dima-avdeev-jb I have reproduced the problem using your demo.

My OS:
MackBook(M2 Pro)

My JDk:
openjdk version "17.0.6" 2023-01-17 LTS
OpenJDK Runtime Environment Zulu17.40+19-CA (build 17.0.6+10-LTS)
OpenJDK 64-Bit Server VM Zulu17.40+19-CA (build 17.0.6+10-LTS, mixed mode, sharing)

image

@qdsfdhvh
Copy link

qdsfdhvh commented Aug 2, 2023

Same as @krisbitney, it seems to be caused by id("app.cash.sqldelight"), if I remove it, it compiles through.

image

@krisbitney
Copy link
Author

krisbitney commented Aug 2, 2023

It might be a Mac OS or Apple cpu issue. I'm not sure if it matters for this, but I'm using:

kotlin.version=1.9.0
agp.version=8.1.0
compose.version=1.5.0-beta01 (I also got the exception with 1.4.1 and 1.4.3)

It seems related to this closed issue: #3386

The closing comment of the closed issue says something that suggests the issue isn't quite fixed for android studio:

With Compose Multiplatform (CMP) 1.5.0-beta01 isStatic=true is no longer required for CMP (JetBrains/skiko#763). Thus one cocoapod can now host both CMP and SQLDelight.
Note: iOS build works only from Xcode, not from AS Giraffe | 2022.3.1
#3178 is also closed.

Also possibly related: https://stackoverflow.com/questions/76676789/compose-multiplatform-gradle-plugins-build-errors

@markusmcgee
Copy link

markusmcgee commented Aug 2, 2023

Encountered the same issue almost 4 days ago. I think it has to do with mixing and matching the versioning of some of the libraries.

I'm using the following:

kotlin.version=1.8.21
compose.version=1.5.0-beta01 (added this last night and everything works fine)

sqlDelightVersion = 1.5.5

JavaVersion = 17

I'm using cocoapods for the shared folder and using the isStatic = true parameter.

I can see in my shared build folder that sqlDelight is working/available in my shared/generated/sqldelight/code folder.

hope this helps.

P.S. Also using gradle 8.0

@BassirouRabo
Copy link

Any fix regarding this issue?

@dima-avdeev-jb
Copy link
Contributor

I can't reproduce it on my sample project https://github.com/dima-avdeev-jb/sql-delight-compose-mpp-issue
And we can't to fix it without reproducible sample

Maybe some one else can create a stable reproducible sample project ?

@dima-avdeev-jb dima-avdeev-jb added the wait for reply Further information is requested label Sep 19, 2023
@dima-avdeev-jb
Copy link
Contributor

Also, I made another one sample project with Compose 1.5.10-beta01 here:
https://github.com/dima-avdeev-jb/issue-3437-sql-delight-compilation
Can you please try to check it too on your environment.

@qdsfdhvh
Copy link

qdsfdhvh commented Sep 19, 2023

Hi, I ran the above sample and still get the same error.
https://gradle.com/s/bttkrnmg2xny6

expression.kt |  
-- | --
  | <File name: main.ios.kt, Physical: true> |  
  | { <ELEMENT>App()</ELEMENT> } |  
  | org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments: Exception while analyzing expression in (5,54) in /Users/seiko/Developer/Android/Test/issue-3437-sql-delight-compilation/shared/src/iosMain/kotlin/main.ios.kt |  
  | at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.logOrThrowException(ExpressionTypingVisitorDispatcher.java:253)


...
Caused by: java.lang.NullPointerException |  
-- | --
  | at androidx.compose.compiler.plugins.kotlin.k1.AnnotationUtilsKt$makeComposableAnnotation$1.getType(AnnotationUtils.kt:38) |  
  | at org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt.getAnnotationClass(DescriptorUtils.kt:402) |  
  | at org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor$DefaultImpls.getFqName(AnnotationDescriptor.kt:34) |  
  | at androidx.compose.compiler.plugins.kotlin.k1.AnnotationUtilsKt$makeComposableAnnotation$1.getFqName(AnnotationUtils.kt:36) |  
  | at org.jetbrains.kotlin.descriptors.annotations.Annotations$DefaultImpls.findAnnotation(Annotations.kt:29) |  
  | at org.jetbrains.kotlin.descriptors.annotations.AnnotationsImpl.findAnnotation(AnnotationsImpl.kt:22) |  
  | at androidx.compose.compiler.plugins.kotlin.k1.AnnotationUtilsKt.hasComposableAnnotation(AnnotationUtils.kt:64) |  
  | at androidx.compose.compiler.plugins.kotlin.k1.ComposableCallCheckerKt.isMarkedAsComposable(ComposableCallChecker.kt:547) |  
  | at androidx.compose.compiler.plugins.kotlin.k1.ComposableCallCheckerKt.isComposableCallable(ComposableCallChecker.kt:554) |  
  | at androidx.compose.compiler.plugins.kotlin.k1.ComposableCallChecker.check(ComposableCallChecker.kt:161) |  
  | at org.jetbrains.kotlin.resolve.calls.tower.KotlinToResolvedCallTransformer.runCallCheckers(KotlinToResolvedCallTransformer.kt:254) |  
  | at org.jetbrains.kotlin.resolve.calls.tower.ResolvedAtomCompleter.completeResolvedCall(ResolvedAtomCompleter.kt:199) |  
  | at org.jetbrains.kotlin.resolve.calls.tower.KotlinToResolvedCallTransformer.transformAndReport(KotlinToResolvedCallTransformer.kt:142) |  
  | at org.jetbrains.kotlin.resolve.calls.tower.PSICallResolver.convertToOverloadResolutionResults(PSICallResolver.kt:257) |  
  | at org.jetbrains.kotlin.resolve.calls.tower.PSICallResolver.runResolutionAndInference(PSICallResolver.kt:127) |  
  | at org.jetbrains.kotlin.resolve.calls.CallResolver.doResolveCallOrGetCachedResults(CallResolver.java:602) |  
  | at org.jetbrains.kotlin.resolve.calls.CallResolver.lambda$computeTasksAndResolveCall$0(CallResolver.java:213) |  
  | at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:90) |  
  | at org.jetbrains.kotlin.resolve.calls.CallResolver.computeTasksAndResolveCall(CallResolver.java:211) |  
  | at org.jetbrains.kotlin.resolve.calls.CallResolver.computeTasksAndResolveCall(CallResolver.java:199) |  
  | at org.jetbrains.kotlin.resolve.calls.CallResolver.resolveFunctionCall(CallResolver.java:329) |  
  | at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getResolvedCallForFunction(CallExpressionResolver.kt:86) |  
  | at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getCallExpressionTypeInfoWithoutFinalTypeCheck(CallExpressionResolver.kt:208) |  
  | at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getCallExpressionTypeInfo(CallExpressionResolver.kt:185) |  
  | at org.jetbrains.kotlin.types.expressions.BasicExpressionTypingVisitor.visitCallExpression(BasicExpressionTypingVisitor.java:731) |  
  | at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.visitCallExpression(ExpressionTypingVisitorDispatcher.java:396) |  
  | at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$ForBlock.visitCallExpression(ExpressionTypingVisitorDispatcher.java:60) |  
  | at org.jetbrains.kotlin.psi.KtCallExpression.accept(KtCallExpression.java:35) |  
  | at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.lambda$getTypeInfo$0(ExpressionTypingVisitorDispatcher.java:176) |  
  | ... 248 more



@qdsfdhvh
Copy link

qdsfdhvh commented Sep 19, 2023

Interesting finding, if i set api(compose.runtime), i can run success. (must run ./gradlew clean if prev run failed before)

image

@qdsfdhvh
Copy link

qdsfdhvh commented Sep 19, 2023

I was just going to try k2 and didn't realise it was outputting real errors:

Task :shared:compileCommonMainKotlinMetadata FAILED
w: Language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:8:33 Unresolved reference: Composable
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:9:33 Unresolved reference: getValue
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:10:33 Unresolved reference: mutableStateOf
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:11:33 Unresolved reference: remember
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:12:33 Unresolved reference: setValue
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:16:2 Unresolved reference: Composable
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:17:5 Functions which invoke @Composable functions must be marked with the @Composable annotation
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:18:5 @Composable invocations can only happen from the context of a @Composable function
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:19:29 Unresolved reference: remember
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:19:40 Unresolved reference: mutableStateOf
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:20:26 Unresolved reference: remember
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:20:37 Unresolved reference: mutableStateOf
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:24:29 Unresolved reference: not
e: file:///.../Test/issue-3437-sql-delight-compilation/shared/src/commonMain/kotlin/App.kt:26:17 Overload resolution ambiguity between candidates: [@Composable() fun Text(text: AnnotatedString, modifier: Modifier = ..., color: Color = ..., fontSize: TextUnit = ..., fontStyle: FontStyle? = ..., fontWeight: FontWeight? = ..., fontFamily: FontFamily? = ..., letterSpacing: TextUnit = ..., textDecoration: TextDecoration? = ..., textAlign: TextAlign? = ..., lineHeight: TextUnit = ..., overflow: TextOverflow = ..., softWrap: Boolean = ..., maxLines: Int = ..., minLines: Int = ..., inlineContent: Map<String, InlineTextContent> = ..., onTextLayout: (TextLayoutResult) -> Unit = ..., style: TextStyle = ...): Unit, @Composable() fun Text(text: String, modifier: Modifier = ..., color: Color = ..., fontSize: TextUnit = ..., fontStyle: FontStyle? = ..., fontWeight: FontWeight? = ..., fontFamily: FontFamily? = ..., letterSpacing: TextUnit = ..., textDecoration: TextDecoration? = ..., textAlign: TextAlign? = ..., lineHeight: TextUnit = ..., overflow: TextOverflow = ..., softWrap: Boolean = ..., maxLines: Int = ..., minLines: Int = ..., onTextLayout: ((TextLayoutResult) -> Unit)? = ..., style: TextStyle = ...): Unit]
...

It looks like iosMain didn't depend on compose.runtime, but I've tried the following and it also doesn't work,

val iosMain by creating {
    dependsOn(commonMain)
    iosX64Main.dependsOn(this)
    iosArm64Main.dependsOn(this)
    iosSimulatorArm64Main.dependsOn(this)
    dependencies {
        implementation(compose.runtime)
    }
}

only this way:

val commonMain by getting {
    dependencies {
        api(compose.runtime)
        // ...
    }
}

@dima-avdeev-jb
Copy link
Contributor

@qdsfdhvh How do you running iOS app ?
Are you trying to run with AndroidStudio and KMM plugin ?

@BassirouRabo
Copy link

BassirouRabo commented Sep 19, 2023

I have tested https://github.com/dima-avdeev-jb/sql-delight-compose-mpp-issue but still getting the following error.

PS: I am able to run the application, however the issue is coming when i run the command gradle shared:build

File name: main.ios.kt Physical: true Injected: false
fun MainViewController() = ComposeUIViewController { <caret>App() }
org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments: Exception while analyzing expression in (5,54) in shared/src/iosMain/kotlin/main.ios.kt
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.logOrThrowException(ExpressionTypingVisitorDispatcher.java:253)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.lambda$getTypeInfo$0(ExpressionTypingVisitorDispatcher.java:225)
        at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:90)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:165)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:135)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorForStatements.visitExpression(ExpressionTypingVisitorForStatements.java:543)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorForStatements.visitExpression(ExpressionTypingVisitorForStatements.java:73)
        at org.jetbrains.kotlin.psi.KtVisitor.visitReferenceExpression(KtVisitor.java:202)
        at org.jetbrains.kotlin.psi.KtVisitor.visitCallExpression(KtVisitor.java:282)
        at org.jetbrains.kotlin.psi.KtCallExpression.accept(KtCallExpression.java:35)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.lambda$getTypeInfo$0(ExpressionTypingVisitorDispatcher.java:176)
        at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:90)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:165)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:148)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getTypeOfLastExpressionInBlock(ExpressionTypingServices.java:443)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getBlockReturnedTypeWithWritableScope(ExpressionTypingServices.java:328)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getBlockReturnedType(ExpressionTypingServices.java:207)
        at org.jetbrains.kotlin.types.expressions.FunctionsTypingVisitor.computeUnsafeReturnType(FunctionsTypingVisitor.kt:279)
        at org.jetbrains.kotlin.types.expressions.FunctionsTypingVisitor.computeReturnType(FunctionsTypingVisitor.kt:244)
        at org.jetbrains.kotlin.types.expressions.FunctionsTypingVisitor.visitLambdaExpression(FunctionsTypingVisitor.kt:177)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.visitLambdaExpression(ExpressionTypingVisitorDispatcher.java:270)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$ForDeclarations.visitLambdaExpression(ExpressionTypingVisitorDispatcher.java:47)
        at org.jetbrains.kotlin.psi.KtLambdaExpression.accept(KtLambdaExpression.java:40)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.lambda$getTypeInfo$0(ExpressionTypingVisitorDispatcher.java:176)
        at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:90)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:165)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:135)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getTypeInfo(ExpressionTypingServices.java:126)
        at org.jetbrains.kotlin.resolve.calls.tower.KotlinResolutionCallbacksImpl.analyzeAndGetLambdaReturnArguments(KotlinResolutionCallbacksImpl.kt:231)
        at org.jetbrains.kotlin.resolve.calls.components.PostponedArgumentsAnalyzer.analyzeLambda(PostponedArgumentsAnalyzer.kt:133)
        at org.jetbrains.kotlin.resolve.calls.components.PostponedArgumentsAnalyzer.analyze(PostponedArgumentsAnalyzer.kt:39)
        at org.jetbrains.kotlin.resolve.calls.components.KotlinCallCompleter$runCompletion$1.invoke(KotlinCallCompleter.kt:261)
        at org.jetbrains.kotlin.resolve.calls.components.KotlinCallCompleter$runCompletion$1.invoke(KotlinCallCompleter.kt:251)
        at org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompletionContext.analyzeArgumentWithFixedParameterTypes(ConstraintSystemCompletionContext.kt:54)
        at org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintSystemCompleter.runCompletion(KotlinConstraintSystemCompleter.kt:84)
        at org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintSystemCompleter.runCompletion(KotlinConstraintSystemCompleter.kt:35)
        at org.jetbrains.kotlin.resolve.calls.components.KotlinCallCompleter.runCompletion(KotlinCallCompleter.kt:251)
        at org.jetbrains.kotlin.resolve.calls.components.KotlinCallCompleter.runCompletion$default(KotlinCallCompleter.kt:242)
        at org.jetbrains.kotlin.resolve.calls.components.KotlinCallCompleter.runCompletion(KotlinCallCompleter.kt:239)
        at org.jetbrains.kotlin.resolve.calls.components.KotlinCallCompleter.runCompletion(KotlinCallCompleter.kt:71)
        at org.jetbrains.kotlin.resolve.calls.KotlinCallResolver.resolveAndCompleteCall(KotlinCallResolver.kt:47)
        at org.jetbrains.kotlin.resolve.calls.tower.PSICallResolver.runResolutionAndInference(PSICallResolver.kt:114)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.doResolveCallOrGetCachedResults(CallResolver.java:602)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.lambda$computeTasksAndResolveCall$0(CallResolver.java:213)
        at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:90)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.computeTasksAndResolveCall(CallResolver.java:211)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.computeTasksAndResolveCall(CallResolver.java:199)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.resolveFunctionCall(CallResolver.java:329)
        at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getResolvedCallForFunction(CallExpressionResolver.kt:86)
        at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getCallExpressionTypeInfoWithoutFinalTypeCheck(CallExpressionResolver.kt:208)
        at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getCallExpressionTypeInfo(CallExpressionResolver.kt:185)
        at org.jetbrains.kotlin.types.expressions.BasicExpressionTypingVisitor.visitCallExpression(BasicExpressionTypingVisitor.java:731)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.visitCallExpression(ExpressionTypingVisitorDispatcher.java:396)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$ForDeclarations.visitCallExpression(ExpressionTypingVisitorDispatcher.java:47)
        at org.jetbrains.kotlin.psi.KtCallExpression.accept(KtCallExpression.java:35)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.lambda$getTypeInfo$0(ExpressionTypingVisitorDispatcher.java:176)
        at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:90)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:165)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:135)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:147)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getBodyExpressionType(ExpressionTypingServices.java:240)
        at org.jetbrains.kotlin.resolve.DescriptorResolver.lambda$inferReturnTypeFromExpressionBody$5(DescriptorResolver.java:1301)
        at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:408)
        at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:527)
        at org.jetbrains.kotlin.types.DeferredType.getDelegate(DeferredType.java:108)
        at org.jetbrains.kotlin.resolve.BodyResolver.computeDeferredType(BodyResolver.java:1081)
        at org.jetbrains.kotlin.resolve.BodyResolver.resolveFunctionBody(BodyResolver.java:990)
        at org.jetbrains.kotlin.resolve.BodyResolver.resolveFunctionBodies(BodyResolver.java:977)
        at org.jetbrains.kotlin.resolve.BodyResolver.resolveBehaviorDeclarationBodies(BodyResolver.java:129)
        at org.jetbrains.kotlin.resolve.BodyResolver.resolveBodies(BodyResolver.java:256)
        at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations(LazyTopDownAnalyzer.kt:227)
        at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations$default(LazyTopDownAnalyzer.kt:58)
        at org.jetbrains.kotlin.backend.konan.TopDownAnalyzerFacadeForKonan.analyzeFilesWithGivenTrace(TopDownAnalyzerFacadeForKonan.kt:105)
        at org.jetbrains.kotlin.backend.konan.TopDownAnalyzerFacadeForKonan.analyzeFiles(TopDownAnalyzerFacadeForKonan.kt:66)
        at org.jetbrains.kotlin.backend.konan.driver.phases.FrontendKt$FrontendPhase$2$1.invoke(Frontend.kt:80)
        at org.jetbrains.kotlin.backend.konan.driver.phases.FrontendKt$FrontendPhase$2$1.invoke(Frontend.kt:79)
        at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115)
        at org.jetbrains.kotlin.backend.konan.driver.phases.FrontendKt$FrontendPhase$2.invoke(Frontend.kt:79)
        at org.jetbrains.kotlin.backend.konan.driver.phases.FrontendKt$FrontendPhase$2.invoke(Frontend.kt:44)
        at org.jetbrains.kotlin.backend.konan.driver.phases.PhaseBuildersKt$createSimpleNamedCompilerPhase$1.phaseBody(PhaseBuilders.kt:32)
        at org.jetbrains.kotlin.backend.common.phaser.SimpleNamedCompilerPhase.phaseBody(CompilerPhase.kt:207)
        at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedCompilerPhase.invoke(CompilerPhase.kt:94)
        at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine.runPhase(Machinery.kt:139)
        at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine.runPhase$default(Machinery.kt:130)
        at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.runFrontend(TopLevelPhases.kt:34)
        at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver.serializeKlibK1(DynamicCompilerDriver.kt:116)
        at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver.produceKlib(DynamicCompilerDriver.kt:94)
        at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver.access$produceKlib(DynamicCompilerDriver.kt:31)
        at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver$run$1$1$1.invoke(DynamicCompilerDriver.kt:43)
        at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver$run$1$1$1.invoke(DynamicCompilerDriver.kt:36)
        at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine$Companion$startTopLevel$topLevelPhase$1.phaseBody(Machinery.kt:98)
        at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine$Companion$startTopLevel$topLevelPhase$1.phaseBody(Machinery.kt:92)
        at org.jetbrains.kotlin.backend.common.phaser.SimpleNamedCompilerPhase.phaseBody(CompilerPhase.kt:207)
        at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedCompilerPhase.invoke(CompilerPhase.kt:94)
        at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine$Companion.startTopLevel(Machinery.kt:105)
        at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver.run(DynamicCompilerDriver.kt:36)
        at org.jetbrains.kotlin.backend.konan.KonanDriver.run(KonanDriver.kt:78)
        at org.jetbrains.kotlin.cli.bc.K2Native.runKonanDriver(K2Native.kt:136)
        at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:71)
        at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:37)
        at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:100)
        at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:46)
        at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
        at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:79)
        at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:43)
        at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:180)
        at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithRenderer$1.invoke(K2Native.kt:173)
        at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithRenderer$1.invoke(K2Native.kt:172)
        at org.jetbrains.kotlin.util.UtilKt.profileIf(Util.kt:22)
        at org.jetbrains.kotlin.util.UtilKt.profile(Util.kt:16)
        at org.jetbrains.kotlin.cli.bc.K2Native$Companion.mainNoExitWithRenderer(K2Native.kt:172)
        at org.jetbrains.kotlin.cli.bc.K2NativeKt.mainNoExitWithGradleRenderer(K2Native.kt:190)
        at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt:51)
        at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt:51)
        at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:20)
        at org.jetbrains.kotlin.cli.utilities.MainKt.inProcessMain(main.kt:58)
        at org.jetbrains.kotlin.cli.utilities.MainKt.daemonMain(main.kt:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.runInProcess(KotlinToolRunner.kt:189)
        at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.run(KotlinToolRunner.kt:132)
        at org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile.compile(KotlinNativeTasks.kt:525)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
        at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:242)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:227)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:210)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:193)
        at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:166)
        at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:93)
        at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:57)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:54)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:54)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)
        at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
        at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
        at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:50)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:28)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.executeDelegateBroadcastingChanges(CaptureStateAfterExecutionStep.java:100)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:72)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:50)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)
        at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:166)
        at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:70)
        at org.gradle.internal.Either$Right.fold(Either.java:175)
        at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:68)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:46)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:36)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:25)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:91)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:55)
        at java.base/java.util.Optional.orElseGet(Optional.java:364)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:37)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:65)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:36)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:76)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:37)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:94)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:49)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:71)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:45)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.executeWithNonEmptySources(SkipEmptyWorkStep.java:177)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:53)
        at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:32)
        at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:21)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)
        at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:75)
        at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:41)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:32)
        at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:287)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:21)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:42)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:31)
        at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:64)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:146)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:135)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:338)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:325)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:318)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:304)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NullPointerException
        at androidx.compose.compiler.plugins.kotlin.k1.AnnotationUtilsKt$makeComposableAnnotation$1.getType(AnnotationUtils.kt:38)
        at org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt.getAnnotationClass(DescriptorUtils.kt:402)
        at org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor$DefaultImpls.getFqName(AnnotationDescriptor.kt:34)
        at androidx.compose.compiler.plugins.kotlin.k1.AnnotationUtilsKt$makeComposableAnnotation$1.getFqName(AnnotationUtils.kt:36)
        at org.jetbrains.kotlin.descriptors.annotations.Annotations$DefaultImpls.findAnnotation(Annotations.kt:29)
        at org.jetbrains.kotlin.descriptors.annotations.AnnotationsImpl.findAnnotation(AnnotationsImpl.kt:22)
        at androidx.compose.compiler.plugins.kotlin.k1.AnnotationUtilsKt.hasComposableAnnotation(AnnotationUtils.kt:64)
        at androidx.compose.compiler.plugins.kotlin.k1.ComposableCallCheckerKt.isMarkedAsComposable(ComposableCallChecker.kt:547)
        at androidx.compose.compiler.plugins.kotlin.k1.ComposableCallCheckerKt.isComposableCallable(ComposableCallChecker.kt:554)
        at androidx.compose.compiler.plugins.kotlin.k1.ComposableCallChecker.check(ComposableCallChecker.kt:161)
        at org.jetbrains.kotlin.resolve.calls.tower.KotlinToResolvedCallTransformer.runCallCheckers(KotlinToResolvedCallTransformer.kt:254)
        at org.jetbrains.kotlin.resolve.calls.tower.ResolvedAtomCompleter.completeResolvedCall(ResolvedAtomCompleter.kt:199)
        at org.jetbrains.kotlin.resolve.calls.tower.KotlinToResolvedCallTransformer.transformAndReport(KotlinToResolvedCallTransformer.kt:142)
        at org.jetbrains.kotlin.resolve.calls.tower.PSICallResolver.convertToOverloadResolutionResults(PSICallResolver.kt:257)
        at org.jetbrains.kotlin.resolve.calls.tower.PSICallResolver.runResolutionAndInference(PSICallResolver.kt:127)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.doResolveCallOrGetCachedResults(CallResolver.java:602)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.lambda$computeTasksAndResolveCall$0(CallResolver.java:213)
        at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:90)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.computeTasksAndResolveCall(CallResolver.java:211)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.computeTasksAndResolveCall(CallResolver.java:199)
        at org.jetbrains.kotlin.resolve.calls.CallResolver.resolveFunctionCall(CallResolver.java:329)
        at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getResolvedCallForFunction(CallExpressionResolver.kt:86)
        at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getCallExpressionTypeInfoWithoutFinalTypeCheck(CallExpressionResolver.kt:208)
        at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getCallExpressionTypeInfo(CallExpressionResolver.kt:185)
        at org.jetbrains.kotlin.types.expressions.BasicExpressionTypingVisitor.visitCallExpression(BasicExpressionTypingVisitor.java:731)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.visitCallExpression(ExpressionTypingVisitorDispatcher.java:396)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$ForBlock.visitCallExpression(ExpressionTypingVisitorDispatcher.java:60)
        at org.jetbrains.kotlin.psi.KtCallExpression.accept(KtCallExpression.java:35)
        at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.lambda$getTypeInfo$0(ExpressionTypingVisitorDispatcher.java:176)
        ... 244 more
w: duplicate library name: runtime_commonMain

@qdsfdhvh
Copy link

@BassirouRabo You can try config api(compose.runtime) in commonMain and run ./gradlew :shared:clean before ./gradlew : shared:build, I ran success with this.

@qdsfdhvh
Copy link

qdsfdhvh commented Sep 20, 2023

@dima-avdeev-jb Yes, I run iOS with AndroidStudio and KMM plugin, I can just run ios without going through any changes with sample, this error I only run into when ./gradlew :shared:build.

@dima-avdeev-jb
Copy link
Contributor

@qdsfdhvh Thanks! Yes, it also reproduced with:
./gradlew :shared:compileIosMainKotlinMetadata
Project https://github.com/dima-avdeev-jb/issue-3437-sql-delight-compilation

@dima-avdeev-jb dima-avdeev-jb added reproduced and removed wait for reply Further information is requested labels Sep 20, 2023
@fergdev
Copy link

fergdev commented Nov 5, 2023

Any fixes for this? I am running into this issue too.

@krisbitney
Copy link
Author

Any fixes for this? I am running into this issue too.

I used realm sdk instead of sqldelight

@khiari-youssef
Copy link

Any updates ? i'm temporarely switching to an alternative to sqldelight but i hope this gets fixed soon !

@dima-avdeev-jb
Copy link
Contributor

Sorry, previous mention in PR was my mistake

@ryanw-mobile
Copy link

ryanw-mobile commented Dec 29, 2023

Found this ticket by chance.

I was following Philipp Lackner's KMP tutorial. There he used SQLDelight 1.5 which I had to upgrade it to 2.x to work with my Android Studio - After a series of SQLDelight build issues, I ended up seeing this error. Obviously, SQLDelight triggered this issue.

I have tried all the suggestions above, and none works. Eventually the api(compose.runtime) trick made it builds on XCode but no luck building on Android Studio/gradlew command line. I am unsure if this should be classified as a CMP issue, or a SQLDelight issue - as it seems pretty sensitive to Kotlin versions (thus affecting the Compose compiler) and has been quite problematic.

@tomil740
Copy link

tomil740 commented Mar 6, 2024

Hay I have the same problem with kind of the same setup as writing here , I also use coocapods if this has something to do with this , is there any solution to that?

@hakob21
Copy link

hakob21 commented Apr 6, 2024

Hi, is there an update on this issue?

@Ribesg
Copy link

Ribesg commented Apr 26, 2024

I also have this error when running compileIosMainKotlinMetadata task in my project: https://github.com/wizbii/CinematicJourney/tree/0.0.12

@jonnyjonjon
Copy link

jonnyjonjon commented May 31, 2024

It's not a fix, but there is a viable workaround:

  1. Add a new multiplatform Gradle module for just the database. isolate the sqlDelight plugin to the new module.
  2. Have whatever module you use for compose depend on your database module.

Isolation was, unfortunately, the only way I found to avoid the exception.

@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

2 similar comments
@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

@yuvaraj119
Copy link

It's not a fix, but there is a viable workaround:

  1. Add a new multiplatform Gradle module for just the database. isolate the sqlDelight plugin to the new module.
  2. Have whatever module you use for compose depend on your database module.

Isolation was, unfortunately, the only way I found to avoid the exception.

Can you elaborate or add steps in code not description here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios reproduced
Projects
None yet
Development

No branches or pull requests