Yuku Kotani
04/10/2019, 3:27 PMazeDevs
04/11/2019, 2:38 AMprivate val apiThread = Worker.start()
private fun startUiLoop() {
apiThread.execute(TransferMode.SAFE, { Unit }) {
sleep(2000)
updateUi()
}.consume { startUiLoop() }
}
I'm stumped on the syntax here (or a K/N solution in general) for a simple timed interval loop. I have Windows C libraries implemented, if that changes things.sunbreak
04/11/2019, 4:19 PMgildor
04/12/2019, 5:55 AMAregevDev
04/12/2019, 8:29 AMDavid
04/12/2019, 9:40 AMkotlin {
xcode {
setupFramework("InsNativeFramework")
}
}
I can’t find any documentation on the xcode
target. Does it fetch the settings from the Xcode project? How do I set the target platform for example?mben
04/12/2019, 12:06 PMkpgalligan
04/12/2019, 1:49 PMdrofwarcs
04/12/2019, 7:41 PM> Task :common:linkDebugFrameworkIos
e: Compilation failed: org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl@6c61d6d9 not in vtable of org.jetbrains.kotlin.ir.declarations.impl.IrClassImpl@641449e4
.......
.......
* Compiler version info: Konan: 1.2 / Kotlin: 1.3.30
* Output kind: FRAMEWORK
.......
tylerwilson
04/12/2019, 8:04 PMKaden Wilkinson
04/12/2019, 8:57 PMTask :generateDefReact
for the React pod generates some bad defs. Not sure where that should be reported
error: /path/to/project/build/classes/kotlin/ios/main/LibraryName-cinterop-React.klib-build/kotlin/cocoapods/React/React.kt: (2970, 23): 'toString' hides member of supertype 'NSObject' and needs 'override' modifier
error: /path/to/project/build/classes/kotlin/ios/main/LibraryName-cinterop-React.klib-build/kotlin/cocoapods/React/React.kt: (15835, 25): 'public final var attributedText: NSAttributedString defined in cocoapods.React.RCTUITextView' clashes with 'public final var attributedText: NSAttributedString? defined in cocoapods.React.RCTBackedTextInputViewProtocolProtocol': property types do not match
Jurriaan Mous
04/13/2019, 10:16 AMlinkTestDebugExecutableMacos
task.
* Compiler version info: Konan: 1.2 / Kotlin: 1.3.30
* Output kind: PROGRAM
e: java.lang.IllegalStateException: org.jetbrains.kotlin.backend.common.descriptors.WrappedPropertyDescriptor@36d848af is not bound
at org.jetbrains.kotlin.backend.common.descriptors.WrappedDeclarationDescriptor.getOwner(WrappedDescriptors.kt:97)
at org.jetbrains.kotlin.backend.common.descriptors.WrappedPropertyDescriptor.getName(WrappedDescriptors.kt:741)
at org.jetbrains.kotlin.backend.konan.lower.PropertyDelegationLowering.createKProperty(DelegationLowering.kt:265)
at org.jetbrains.kotlin.backend.konan.lower.PropertyDelegationLowering.access$createKProperty(DelegationLowering.kt:44)
at org.jetbrains.kotlin.backend.konan.lower.PropertyDelegationLowering$lower$1.visitPropertyReference(DelegationLowering.kt:133)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitPropertyReference(IrElementTransformerVoid.kt:191)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitPropertyReference(IrElementTransformerVoid.kt:24)
at org.jetbrains.kotlin.ir.expressions.impl.IrPropertyReferenceImpl.accept(IrPropertyReferenceImpl.kt:42)
at org.jetbrains.kotlin.ir.expressions.IrExpression$DefaultImpls.transform(IrExpression.kt:27)
lsk
04/13/2019, 7:03 PMError occurred during initialization of VM. Could not reserve enough space for 3145728KB object heap
Gradle starts cinterop with -Xmx3G
. How can I decrease it?galex
04/13/2019, 7:32 PMe: Compilation failed: Could not find "kotlinx-coroutines-core-native" in [...]`
The dependencies of the iOS project are set up like this:
iosMain.dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$kotlinx_coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$kotlinx_serialization_version"
implementation "io.ktor:ktor-client-json-native:$ktor_version"
implementation "io.ktor:ktor-client-ios:$ktor_version"
}
Any idea why it can’t find that lib?lsk
04/14/2019, 8:40 AMTask :cinteropMylapsMingwX64 FAILED
Exception in thread "main" java.lang.Error: C:\Users\adams\.konan\dependencies\msys2-mingw-w64-x86_64-gcc-7.3.0-clang-llvm-lld-6.0.1\x86_64-w64-mingw32\include\sec_api/string_s.h:37:27: error: conflicting types for 'strcpy'
at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:133)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.indexDeclarations(Indexer.kt:959)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:951)
at org.jetbrains.kotlin.native.interop.indexer.NativeIndexKt.buildNativeIndex(NativeIndex.kt:74)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:229)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:38)
at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:67)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:18)
FAILURE: Build failed with an exception.
Dominaezzz
04/14/2019, 2:00 PMcouldn't find "libc++_shared.so"
. Can the compiler statically include it instead?gianluz
04/14/2019, 6:33 PMkotlinc -cp path/to/my/library.jar -script ScriptFile.kts
any idea?galex
04/14/2019, 7:11 PMreturn KotlinUnit()
in every lambda/closure in Swift when using kotlin code?galex
04/14/2019, 7:12 PMAny?
basher
04/15/2019, 1:09 AMTobi
04/15/2019, 8:31 AMString
instead of a ByteArray
, but I am still a bit lost what are the required steps.
Since the above linked swift example just requires Foundation
, should I try to convert this to kotlin in the native platform source set?
Thanks in advance.JoakimForslund
04/15/2019, 9:04 AMbasher
04/15/2019, 3:54 PM'performAndWait(suspend CoroutineScope.() -> T): T' is deprecated. Experimental coroutines support will be dropped in 1.4
This method is my own, and I can't figure out what about this signature triggers the deprecation warning. Anyone else run into this?lsk
04/15/2019, 4:41 PMtoomanyeduardos
04/16/2019, 4:24 AMSmallville7123
04/16/2019, 7:55 AMTobi
04/16/2019, 8:40 AM@testable import main
to the test, where main
is the kotlin/native framework.mben
04/16/2019, 3:45 PMSmallville7123
04/17/2019, 1:47 AMTobi
04/17/2019, 8:23 AMSIGABRT
when running it from xcode.
Could anyone give me a hand on this?
Thanks in advance.Tobi
04/17/2019, 8:23 AMSIGABRT
when running it from xcode.
Could anyone give me a hand on this?
Thanks in advance.olonho
04/17/2019, 8:34 AMByteArray
to CValuesRef<ByteVar>
doesn’t make sense, please use approach with pinned dataTobi
04/17/2019, 1:51 PMactual object Hmac256Encoder {
@ExperimentalUnsignedTypes
actual fun encode(key: ByteArray, value: String): ByteArray {
val input = value.toUtf8()
val digest = UByteArray(CC_SHA256_DIGEST_LENGTH)
key.usePinned { keyPinned ->
input.usePinned { inputPinned ->
digest.usePinned { digestPinned ->
CCHmac(kCCHmacAlgSHA256, keyPinned.addressOf(0), key.size.convert(), inputPinned.addressOf(0), input.size.convert(), digestPinned.addressOf(0))
}
}
}
return digest.toByteArray()
}
}