https://kotlinlang.org logo
c

ciriti

07/18/2019, 9:52 AM
Morning guys! Currently, I'm receiving the following error after the updating to Kotlin 1.3.40, does anyone have the same issue?
d

Dima Avdeev

07/18/2019, 9:54 AM
Latest Kotlin 1.3.41
👍 1
c

ciriti

07/18/2019, 9:55 AM
ok, let me upgrade 👍
@Dima Avdeev thanks a lot! it works!
s

Sergioedcigreja

07/19/2019, 8:20 AM
I'm getting a similar error but I'm using kotlin mpp 1.3.41. I think it occurred when I started using sqldelight
s

svyatoslav.scherbina

07/22/2019, 1:00 PM
@Sergioedcigreja could you share a reproducer?
s

Sergioedcigreja

07/22/2019, 1:06 PM
my project build.gradle
my mpp build.gradle
I think this occurred when I imported sqldelight in the projects build.gradle
it then asked me to remove version '1.3.41' from the plugin 'kotlin-multiplatform' because it was in the classpath of the project
Then when I import to my iOS project I get that error
s

svyatoslav.scherbina

07/22/2019, 1:10 PM
I’m not sure that build scripts are enough to reproduce the problem.
s

Sergioedcigreja

07/22/2019, 1:10 PM
To note that I can solve this issue by adding 'LibKotlinCoroutineContextElement' to the lib.h file inside the .framework
j

Jonas Bark

07/22/2019, 1:10 PM
did you try the workaround I linked above as well?
s

Sergioedcigreja

07/22/2019, 1:14 PM
They said that it's fixed in the newest release but I'm assuming this has something to do with the version of kotlin mpp/coroutines that sqldelight not being compatible with the versions that I'm using, if that makes sense
s

svyatoslav.scherbina

07/22/2019, 1:16 PM
it then asked me to remove version ‘1.3.41’ from the plugin ‘kotlin-multiplatform’ because it was in the classpath of the project
Could you show the exact error message?
s

Sergioedcigreja

07/22/2019, 1:16 PM
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSError.h>
#import <Foundation/NSObject.h>
#import <Foundation/NSSet.h>
#import <Foundation/NSString.h>
#import <Foundation/NSValue.h>
@class LibSqldelight_runtimeQuery, LibSqldelight_runtimeTransacterTransaction, LibConfigResponse, LibErrorResponse, LibInitResponse, LibApps, LibAuth, LibApplicationContext, LibApp, LibKotlinArray, LibConfig, LibNetworkService, LibRepository, LibApp_, LibType, LibClient, LibPhotoResponse, LibPreferenceEditor, LibKtor_httpHttpMethod, LibKotlinx_coroutines_coreCoroutineDispatcher, UIImage, LibKotlinx_serialization_runtimeEnumDescriptor, LibKotlinx_serialization_runtimeSerialKind, LibKotlinNothing, LibKotlinx_serialization_runtimeUpdateMode, LibKotlinByteArray, LibKotlinByteIterator;
@protocol LibSqldelight_runtimeSqlDriver, LibSqldelight_runtimeSqlDriverSchema, LibKotlinx_serialization_runtimeKSerializer, LibKotlinx_serialization_runtimeEncoder, LibKotlinx_serialization_runtimeSerialDescriptor, LibKotlinx_serialization_runtimeDecoder, LibSqldelight_runtimeSqlCursor, LibSqldelight_runtimeQueryListener, LibSqldelight_runtimeSqlPreparedStatement, LibKotlinIterator, LibKotlinx_serialization_runtimeCompositeEncoder, LibKotlinx_serialization_runtimeSerialModule, LibKotlinAnnotation, LibKotlinx_serialization_runtimeCompositeDecoder, LibKotlinCoroutineContextKey, LibKotlinContinuation, LibKotlinx_coroutines_coreRunnable, LibKotlinx_serialization_runtimeSerialModuleCollector, LibKotlinKClass;
If I add the 'missing' protocol to the @protocol line the project builds and runs just fine
if I remove the classpath 'com.squareup.sqldelight ... ' from the project build.gradle this error doesn't occur
s

svyatoslav.scherbina

07/22/2019, 1:31 PM
if I remove the classpath ‘com.squareup.sqldelight ... ’ from the project build.gradle this error doesn’t occur
Then it is highly possible that you actually get Kotlin 1.3.40 plugin applied, and the issue is properly fixed in 1.3.41.
7 Views