Hello I have a little problem with kotlin multipla...
# multiplatform
j
Hello I have a little problem with kotlin multiplatform. I get these errors (thread) (so the source set android apparently doesn't have this SupabaseClient). However this is a multiplatform module and the common source set implements the module that has the SupabaseClient and the other source set does work (jvm)
So it doesn't find this SupabaseClient.
This is an actual implementation and there's another implementation for jvm which works perfectly fine
So androidMain - error desktopMain (jvmMain) - no error
heres the build file which clearly implements the parent project https://github.com/jan-tennert/SupaCompose/blob/master/Auth/build.gradle.kts and as you can see in one of the implementation it works perfectly fine
p
Is it an ide only error or does it really not compile?
j
it does not compile
Copy code
e: H:\Programming\SupaCompose\Auth\src\androidMain\kotlin\io\github\jan\supacompose\auth\providers\OAuthProvider.kt: (5, 23): Actual class 'OAuthProvider' has no corresponding members for expected class members:

    public open expect suspend fun login(supabaseClient: SupabaseClient, onSuccess: suspend (UserSession) -> Unit, onFail: (OAuthFail) -> Unit, credentials: (ExternalAuthConfig.() -> Unit)? = ...): Unit

    The following declaration is incompatible because parameter types are different:
        public open actual suspend fun login(supabaseClient: [ERROR : SupabaseClient], onSuccess: suspend (UserSession) -> Unit, onFail: (OAuthFail) -> Unit, credentials: (ExternalAuthConfig.() -> Unit)? = ...): Unit

    public open expect suspend fun signUp(supabaseClient: SupabaseClient, credentials: ExternalAuthConfig.() -> Unit): Unit

    The following declaration is incompatible because parameter types are different:
        public open actual suspend fun signUp(supabaseClient: [ERROR : SupabaseClient], credentials: ExternalAuthConfig.() -> Unit): Unit
+
Copy code
e: H:\Programming\SupaCompose\Auth\src\androidMain\kotlin\io\github\jan\supacompose\auth\providers\OAuthProvider.kt: (10, 25): Unresolved reference: SupabaseClient
p
So that's the true error
j
ok I just reimported the project and deleted the .idea file now I could import the SupabaseClient 🤔
I couldn't actually import the class before so thats why I got these errors
p
Glad I could help 😛
j
well 👍
oh yes
p
And this is for a long time now deprecated with an easy replacement https://github.com/jan-tennert/SupaCompose/blob/master/build.gradle.kts#L4
And jcenter has sunset
Enough of the random code review 😛
j
Yes that was in intellijs template, will remove that thanks 😄