Justin Brooks
12/21/2022, 1:19 AMKnapsack# cat build/js/package.json
{
"name": "Knapsack",
"version": "unspecified",
"private": true,
"workspaces": [
"packages/Knapsack-common",
I've tried to configure it a few different ways, but the current code https://github.com/jzbrooks/Knapsack/blob/1a720273a148cade22d068108528ccbe5906ce2a/common/build.gradle.kts#L13.
I searched the issue tracker since but didn't find anything relevant. Does anyone know what I'm missing?Sunny
12/21/2022, 9:51 AMerror: use of '@import' when modules are disabled
Trying to integrate an analytics library Snowplow. added the relevant pod
cocoapods {
pod("SnowplowTracker")
}
Log
Task :cinteropSnowplowTrackerIosArm64
Exception in thread "main" java.lang.Error: ../build/cocoapods/synthetic/IOS/build/Release-iphoneos/SnowplowTracker/SnowplowTracker.framework/Headers/SPSnowplow.h:31:1: error: use of '@import' when modules are disabled
at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:274)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.indexDeclarations(Indexer.kt:1196)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:1185)
at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:1181)
at org.jetbrains.kotlin.native.interop.gen.jvm.DefaultPlugin.buildNativeIndex(Plugins.kt:33)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:289)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLibSafe(main.kt:214)
at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:80)
at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:40)
at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:62)
Any workarounds for this?Luong Vo
12/21/2022, 11:23 AM@Serializable
data class ExampleModel(val title: String)
val body = """
{
"data": {
"type": "articles",
"id": "1",
"attributes": {
"title": "JSON:API paints my bikeshed!"
}
}
}
"""
val json = Json {
prettyPrint = true
isLenient = true
ignoreUnknownKeys = true
}
val data = JsonApi(json).decodeFromJsonApiString<ExampleModel>(body)
dimsuz
12/21/2022, 12:43 PMCiaran Sloan
12/21/2022, 7:59 PMConrad Kramer
12/21/2022, 10:16 PM> Task :Shared:macosArm64Test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':Shared:macosArm64Test'.
> command '/Users/conradev/Projects/Wallet/Shared/build/bin/macosArm64/debugTest/test.kexe' exited with errors (exit code: 137)
and the corresponding log in the system log is generated:
default 14:14:45.212066-0800 kernel ASP: Security policy would not allow process: 43402, /Users/conradev/Projects/Wallet/Shared/build/bin/macosArm64/debugTest/test.kexe
martmists
12/22/2022, 1:10 AMxxfast
12/22/2022, 1:57 AM:app
⎿:feature-1
⎿:feature-2
:app
is the only module I'm depending on from iOS, but I am exporting my feature modules. I can export sealed types from :app
just fine
sealed class AppSealedType {
object AppTypeA: AppSealedType()
object AppTypeB: AppSealedType()
}
And they do show up on the swift side. However, when I define a seal type on one of the :feature-x
modules
sealed class FeatureSealedType {
object FeatureTypeA: AppSealedType()
object FeatureTypeB: AppSealedType()
}
Only the top seal interface is exported. I can trick the tooling to "force" export the sealed child types by referencing them in the iosMain
of the :app
as a workaround
val FeatureTypeA = FeatureSealedType.FeatureTypeA
When I do that, the child types are exported
Is this a known bug/limitation? Is there a way export all child types of my sealed types? More details in the 🧵Shubham Singh
12/23/2022, 6:05 AMimplementation("dev.icerock.moko:kswift-runtime:0.6.1")
is only available for KMM but my project supports Android, iOS, and Web as well. So can I instruct KMP to not fetch its deps for JS?ManApart
12/23/2022, 8:43 PMEugene Maksymenko
12/24/2022, 1:11 AMhumblehacker
12/24/2022, 8:49 PMKirill Zhukov
12/25/2022, 3:49 AMjvmMain
source set access is not provided by Kotlin DSL (unsure how this works…)? For example, following:
kotlin {
android()
jvm()
sourceSets {
val commonMain by getting {
// ...
}
val androidMain by getting {
// ...
}
val jvmMain by getting {
// ...
}
}
}
Can be replaced with this, except for jvmMain
:
kotlin {
android()
jvm()
sourceSets {
commonMain {
// ...
}
androidMain {
// ...
}
// `jvmMain` extension is not provided
val jvmMain by getting {
// ...
}
}
}
spierce7
12/25/2022, 4:07 AMIdan
12/25/2022, 1:31 PMShubham Singh
12/25/2022, 2:41 PMspierce7
12/26/2022, 4:40 AMVitaliy Zarubin
12/26/2022, 8:50 AMDispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
if value == range {
onValueChangeFinished(value.map { Double($0) })
}
}
Elio Maroun
12/27/2022, 8:59 AMKirill Zhukov
12/27/2022, 9:53 PMandroid()
configures androidMain
that depends on commonMain
already, you can probably drop 29-31 configuration.Christian Würthenr
12/29/2022, 10:50 AMFAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared-br-network:iosSimulatorArm64Test'.
> No value present
If I open the project in 2021.3 everything works as expected, also when I use ./gradlew :shared-network:iosSimulatorArm64Test
Elio Maroun
12/29/2022, 1:47 PMMendess
12/29/2022, 2:17 PM= runTest
and internally it uses GlobalScope.launch
but this call is blocking forever and the callback I'm passing to it doesn't ever run, how can I debug this?tylerwilson
12/29/2022, 4:22 PMMultiplatform/Android-V1-SourceSetLayout: Multiplatform/Android-V1-SourceSetLayout is deprecated...
I add it then I get new warnings:
Multiplatform/Android-V2-SourceSetLayout: Usage of 'Android Style' source directory
are there any docs on this new V2 layout. Migration guide perhaps?tylerwilson
12/29/2022, 5:08 PMParvez Qureshi
12/30/2022, 3:00 AMKLiveData
, can anyone give an example ?Shubhasai Mohapatra
12/30/2022, 5:30 AMHakan
12/30/2022, 7:00 AMDataDog
library in iosMain part of the KMM project.
But Somehow I can not import the library into Kotlin file.
Here is the ticket that I opened yesterday.
https://youtrack.jetbrains.com/issue/KT-55687/Can-not-add-DataDog-Dependency-via-CocoaPods-in-Kotlin-Multiplatform-Mobile-Project
I really appreciate if you guide me. Thanks.andylamax
12/30/2022, 7:04 AMElio Maroun
12/30/2022, 10:08 AMElio Maroun
12/30/2022, 10:08 AM