napperley
03/07/2025, 12:37 AMkatokay
03/07/2025, 4:24 AMfile:///home/runner/work/kotlin-lmdb/kotlin-lmdb/src/nativeMain/kotlin/Env.kt:111:78 Argument type mismatch: actual type is 'kotlin.UShort', but 'kotlin.UInt' was expected.
The project is located at https://github.com/CoreyKaylor/kotlin-lmdb and the failure I'm referring to is here. https://github.com/CoreyKaylor/kotlin-lmdb/actions/runs/13713581077
This seems like a possible bug with the compiler, or am I missing something?napperley
03/08/2025, 10:06 PMstruct gpiod_chip;
struct gpiod_line;
struct gpiod_chip_iter;
struct gpiod_line_iter;
struct gpiod_line_bulk;
suresh
03/09/2025, 10:41 PMcommonizeNativeDistribution
task. On my M1 machine, this task consistently takes over 10 minutes to complete. Any idea why it takes so long and are there any potential optimizations to improve its performance?Piasy
03/12/2025, 10:08 AMPiasy
03/13/2025, 1:23 AMkotlin {
targets.withType<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget> {
binaries.all {
freeCompilerArgs += "-Xadd-light-debug=enable"
}
}
}
from this tutorial https://kotlinlang.org/docs/native-ios-symbolication.html#producing-dsym-for-release-kotlin-binaries , but it doesn’t generate any new file.Nick
03/14/2025, 1:48 AMval nsImage = bitmap.readPixels()?.let { pixels ->
NSImage(data = pixels.usePinned {
NSData.create(it.addressOf(0), pixels.size.convert())
})
}
i've also only found this helper for NSData -> skiko Image. nothing for the other direction: https://github.com/JetBrains/skiko/blob/master/skiko/src/darwinMain/kotlin/org/jetbrains/skia/Image.darwin.ktdarkmoon_uk
03/19/2025, 3:56 AMrunDebugExecutableMacos
(given I've named my target macos
)
Is there a way to pass arguments to that?
I've tried a few forms but nothing's working!
Args work on CLI but I need to be able to Debug with them.Nitesh Singh
03/22/2025, 5:43 PMkapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "2.0.21" }
alias(libs.plugins.kapt)
kapt(libs.hilt.compiler)
hey There my kapt() is not working could help me where my mistek
- Problem: In version catalog libs, version reference '2.0.21' doesn't exist.
Reason: Plugin 'org.jetbrains.kotlin.kapt' references version '2.0.21' which doesn't exist.
kapt(libs.hilt.compiler) this bundles is not importingWaldemar Kornewald
03/26/2025, 11:46 AMWaldemar Kornewald
03/26/2025, 11:57 AM@Throws
annotations every now and then. On suspend fun
this is especially annoying because they already generate an Objective-C / Swift API which requires error handling, so even the iOS developers won’t notice that something is missing. Making the app crash for missing @Throws
annotations is just bad behavior. Can Kotlin please be changed (at least for Swift export) to treat suspend fun
as having @Throws(Throwable::class)
by default (unless there’s an explicit annotation of course)? This is much better than hard-crashing by default.katokay
03/26/2025, 2:52 PMmartmists
03/30/2025, 11:20 AMSmoothie
04/01/2025, 2:35 PMcommonMain.dependencies {
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.coroutines.core)
api(project(":JsonUtilities"))
api(project(":PlatformUtilities"))
}
Is it possible in the xcframework exported by this project (the one using these two dependencies) to not embed them ? So the final xcframework would depend on these two xcframework ?
my conf right now is this
val xcf = XCFramework("MyLibrary")
listOf(
iosArm64(),
iosSimulatorArm64()
).forEach { target ->
target.binaries.framework {
baseName = "MyLibrary"
isStatic = true
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
optimized = true
export(project(":JsonUtilities"))
export(project(":PlatformUtilities"))
xcf.add(this)
}
}
Is it also possible to make kotlin itself in a xcframework to avoid conflict and inconpatible type ?
TyMJegorovas
04/03/2025, 1:03 PMval array = Random.nextBytes(1000000)
for (i in 0..10000) {
array.usePinned {
NSData.create(bytes = it.addressOf(0), length = array.size.convert())
}
}
abdelrahmanesam20000
04/04/2025, 5:53 AMSmoothie
04/07/2025, 1:49 PMSmoothie
04/07/2025, 2:31 PMNeeme Praks
04/09/2025, 7:38 PMarmv5te-unknown-linux-gnueabi
target architecture) but Kotlin would be so much easier, considering that our cloud stack is all Kotlin (running on JVM).
I’m not sure how much effort would the initial development be? And the later maintenance? We might be willing hack on this in case it isn’t too hard.
As much as I understand, both Rust and Kotlin-native compilers use LLVM underneath so if it works with Rust then it should not be too hard to make it work with Kotlin-native?Mohamed Mabrouki
04/14/2025, 10:39 AMSmoothie
04/14/2025, 3:20 PMdo {
//try Library.companion.getData()
throw SealedClass.NotInitialized().asError()
}
catch let error as SealedClass {
print("SealedClass")
}
catch let error as SealedClass.NotInitialized {
print("NotInitialized")
}
catch let error {
print("It's another type\(error)")
}
Smoothie
04/14/2025, 3:20 PMSmoothie
04/14/2025, 3:56 PMSmoothie
04/14/2025, 3:57 PMFrançois
04/16/2025, 7:22 AMWaldemar Kornewald
04/29/2025, 1:36 PMIan Botsford
04/29/2025, 4:21 PMlinux_arm64
on a linux_x64
host. The cinterop task fails with UnsatisfiedLinkError
looking for some newer version of glibc than exists on my host (full error in 🧵). I don't understand why it would be trying to use my host OS libs instead of the corresponding libs from the Konan distribution. 🤔 Anyone have experience debugging cinterops?lauraldo
05/02/2025, 2:31 PMkotlinc-native
, the java
process is launched.
I tested it on linux_x64
and macos_arm64
targets.
So does Kotlin/Native compiler use Java under the hood by default?Jaiden Siu
05/07/2025, 12:41 AMenum class BananaAge {
NEW_BANANA,
OLD_BANANA
}
Which generates the following in the header file.
@property (class, readonly) LibraryNameBananaAge *theNewContact __attribute__((swift_name("theNewBanana")));
@property (class, readonly) LibraryNameBananaAge *oldBanana __attribute__((swift_name("oldBanana")));
I get the same result in the header file when using the ObjCName annotation. Anyone have any ideas why or what is happening under the hood?Raphael TEYSSANDIER
05/07/2025, 3:11 PMlib.a
to my project with cinterop
. And I cannot make it work, is there any example on github to follow ?