dazza5000
03/18/2020, 2:06 PMspierce7
03/18/2020, 5:06 PMmultiplatform
plugin. We are migrating one module at a time.
We’re seeing a crash when running tests:
Unable to find a matching variant of com.rallyhealth.store:store:0.1.9:
- Variant 'android-debugApiElements' capability com.rallyhealth.store:store:0.1.9:
- Incompatible attribute:
- Required org.jetbrains.kotlin.platform.type 'jvm' and found incompatible value 'androidJvm'.
com.rallyhealth.store is a private lib. Does anyone know anything about this?spierce7
03/19/2020, 2:17 AMzalewski.se
03/19/2020, 7:12 AM1.3.70
but I’m getting an error:
> Task :network:linkDebugFrameworkIosX64 FAILED
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
My other dependencies versions are:
coroutinesVersion=1.3.5
ktorVersion=1.3.2
serializationVersion=0.20.0
If I set the kotlin version to 1.3.61
and dependencies to:
coroutinesVersion=1.1.1
ktorVersion=1.2.4
serializationVersion=0.11.1
It’s building fine 🤔… Has anyone had simial problem? I was trying on many different gradle wrapper versions, right now I’m on the latest one 6.3-rc-3
ilya.matveev
03/19/2020, 9:21 AMdazza5000
03/19/2020, 2:24 PMGunslingor
03/19/2020, 2:40 PMChristian Sousa
03/20/2020, 11:01 AMChristian Sousa
03/20/2020, 11:31 AMUncaught Kotlin exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen com.jetbrains.handson.mpp.mobile.services.deviceStorage.DeviceStorage@2164548
Even though my DeviceStorage has
import kotlin.native.concurrent.ThreadLocal
@ThreadLocal
object DeviceStorage {
...
}
Anyone knows how to get this to work?CLOVIS
03/20/2020, 1:29 PM// commonMain/File 1 Everything is top level
private val a = ...
internal fun b() { do something with a }
public fun c() { call b }
// commonTest/File 2 In a class
@Test
fun testB() { b() }
@Test
fun testC() { c() }
In Kotlin/JVM, both test run fine. In Kotlin/JS, testC
runs fine, but testB
breaks with ReferenceError: a is not defined
.
To me it looks like that means that Kotlin/JS tests are allowed to call internal functions, but if they do, then those functions cannot find private vals they should be able to find otherwise?
Either I misunderstood something, or there might be some buggy behavior involved.Sebastian
03/20/2020, 1:55 PMGunslingor
03/20/2020, 5:23 PMjs("frontend") {
browser {
tasks {
register<Exec>("webpack") {
dependsOn("yarn", "npmInstall")
//outputs.dir("$buildDir\\yyy\\")
commandLine("$buildDir\\js\\node_modules\\.bin\\webpack", "$buildDir\\js\\packages_imported\\kotlin\\1.3.70\\kotlin.js", "$buildDir\\js\\packages_imported\\three.js\\71.0.0-r\\three.js")
//, "$buildDir\\js\\packages_imported\\kotlin\\1.3.70\\kotlin.js", "$buildDir\\js\\packages_imported\\three.js\\71.0.0-r\\three.js"
}
}
}
}
bod
03/21/2020, 9:08 AMw: skipping /Users/bod/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-io-iosx64/0.1.16/dafe6011ea63ea7200a43bcff435a46204a1b1b8/kotlinx-io.klib. The abi versions don't match. Expected '[22]', found '17'
e: Could not find "/Users/bod/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-io-iosx64/0.1.16/dafe6011ea63ea7200a43bcff435a46204a1b1b8/kotlinx-io.klib" in [/Users/bod/gitrepo/klibqonto, /Users/bod/.konan/klib, /Users/bod/.konan/kotlin-native-macos-1.3.70/klib/common, /Users/bod/.konan/kotlin-native-macos-1.3.70/klib/platform/ios_x64].
Daemon vm is shutting down... The daemon has exited normally or was terminated in response to a user interrupt.
It looks like it's a kotlinx-io
issue, but what exactly, and what can I do (if anything)? Thanks a lot!coletz
03/21/2020, 3:19 PMfcosta
03/22/2020, 1:45 AMFoundation
... Any idea of what i'm doing wrong?
package sample
import platform.Foundation.NSString
actual class Sample {
actual fun checkMe() = 7
}
actual object Platform {
actual val name: String = "iOS"
}
actual fun formatString(source: String, vararg args: Any): String {
return ""
// return NSString.initWithFormat
}
Gunslingor
03/22/2020, 3:11 AMBig Chungus
03/22/2020, 5:27 PMexpect
of the folowing JS class in common module so I could typealias
it in JS module?
class ExternalAPI {
val important: dynamic
}
Gunslingor
03/23/2020, 4:59 PMdocument.body?.appendChild(renderer.domElement)
While this doesn't?
val target = document.getElementById("right_pane")?
target?.appendChild(renderer.domElement)
document.body? is an Element and document.body? is an HTML element.... not sure why there are two but there has to be a converter or something... or someway to make this work. Elements seems to allow appending a string as HTML via innerHTML while HTMLElements seem to do something with Nodes... don't really get this, feels like object interfaces aren't formalized.Gunslingor
03/24/2020, 6:17 AMjs("frontend") {
compilations {
create(environment) {
browser {
tasks {
val backendJar by getting {
dependsOn("frontendBrowserWebpack")
}
webpackTask {
setProperty("mode", environment)
//sourceMaps = false // Set 'true' if need debug
//report = true // Enable execute tests src/jsTest
}
testTask {
dependsOn("backendJar", "npmInstall")
useKarma {
//useIe()
//useSafari()
//useFirefox()
//useChrome()
//useChromeCanary()
useChromeHeadless()
//usePhantomJS()
//useOpera()
}
}
}
}
}
}
}
Nikolay Kasyanov
03/24/2020, 10:17 AMSlackbot
03/24/2020, 12:04 PMaraqnid
03/24/2020, 2:32 PMGunslingor
03/24/2020, 5:18 PMChills
03/24/2020, 5:23 PMOrhan Tozan
03/25/2020, 4:23 AMapi
instead of implementation
?
What about target dependencies (e.g. commonMain: api(coroutines-core-common)
and jvmMain: api(coroutines-core)
)Marc Dietrichstein
03/25/2020, 8:58 AMlinkerOpts
and compilerOpts
in my cinterop.def
file (FirebaseCore, nanobp etc.) This also leads to "duplicate symbol" issues when the framework is embedded in our app, since we are using cocoapods which pulls in transitive dependencies that are already embedded in our analytics library.
Is there any cinterop flag or gradle option to tell kotlin not to embed subframeworks?kenkyee
03/25/2020, 11:00 AMSylvain Patenaude
03/25/2020, 4:19 PMDominaezzz
03/25/2020, 6:23 PMInt
) to a String
?Kris Wong
03/25/2020, 8:35 PMiosTest
task?