https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
kotlin-native
  • s

    Sam Schilling

    09/20/2019, 5:16 PM
    If I want to try out a dev build of K/N but my project relies on coroutines, is there a way to do it? I don’t see any coroutines builds that use 1.3.60 dev builds
    k
    • 2
    • 1
  • l

    Laura de la rosa

    09/20/2019, 10:01 PM
    Hi!! All Someone has coded location delegates in iosMain (the common part in Kotlin). I need to know if any type of delegates can be implemented in iosMain or the development must be in swift (because if that cannot be done, how scalable is KM?). Something like this https://discuss.kotlinlang.org/t/swift-delegate-cllocationmanagerdelegateprotocol/14320/5
    g
    s
    • 3
    • 2
  • v

    Vincent Chen

    09/21/2019, 6:52 AM
    Hi, https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#building-final-native-binaries I try to generate fat framework But import org.jetbrains.kotlin.gradle.tasks.FatFrameworkTask Can’t find FatFrameworkTask import Why?? Thanks
    r
    k
    • 3
    • 5
  • x

    XQDD

    09/22/2019, 2:45 AM
    Hey, is there any suggestion for this? (Build Linux arm32 soft-float target) https://github.com/JetBrains/kotlin-native/issues/3350 I have no idea where to start, could you offer me some link, book or tutorial etc stuff for study it and implement it? Thanks a million.
    m
    • 2
    • 2
  • d

    deactivateduser

    09/23/2019, 1:45 AM
    TornadoFX is better or GTK with kotlin-native ?
    r
    a
    j
    • 4
    • 5
  • v

    Vincent Chen

    09/23/2019, 6:43 AM
    Hi, Because of some reasons, I need to generate .so now, androidNativeArm64 -> arm64-v8a androidNativeArm32 -> armeabi-v7a if I really need armeabi (I know v7a support this set) What can i do Thanks
    g
    • 2
    • 2
  • v

    Vincent Chen

    09/24/2019, 5:51 AM
    Hi, if I want to put task outside kotlin block how can I get “ios32” and “ios64" this two KotlinNativeTarget like XXX.targetName Thanks
    g
    k
    • 3
    • 11
  • n

    Nikita Klimenko

    09/24/2019, 3:22 PM
    Hi, seems reified type parameters don't work with the latest kotlin version 1.3.60-dev-2413. Tell me if I should create issue
    inline fun <reified T> to(): T? = null
    > Task :linkMyLibDebugFrameworkIos
    Undefined symbols for architecture x86_64:
      "_kfun:<http://com.mylib.utils.jkob.to|com.mylib.utils.jkob.to>()Generic", referenced from:
          ___unnamed_1085 in result.o
    ld: symbol(s) not found for architecture x86_64
    e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
    o
    s
    • 3
    • 3
  • j

    Jonas Bark

    09/25/2019, 6:30 AM
    iOS ARM32 question: The constructor of
    UIColor
    expects `CGFloat`s (Float) on arm32 and `CGDouble`s (Double) on arm64 / x64. I'd like to use the same source set and unfortunately
    .convert()
    doesn't exist for Float / Double. Are different source sets the only way to tackle this?
    j
    o
    s
    • 4
    • 7
  • j

    Jurriaan Mous

    09/25/2019, 12:22 PM
    I have an exception running cinterop on an Objective-C library. It is an NSEnum and I tried to specifically import the header file in the def file. What does the exception mean and how can I solve it?
    > Task :cinteropRocksdbMacos
    Exception in thread "main" java.lang.IllegalArgumentException: 'BlockBasedTableIndexType' from the file package was not reserved for declaration
    	at org.jetbrains.kotlin.native.interop.gen.KotlinFile.reference(KotlinCodeModel.kt:263)
    	at org.jetbrains.kotlin.native.interop.gen.KotlinClassifierType.render(KotlinCodeModel.kt:115)
    	at org.jetbrains.kotlin.native.interop.gen.StubIrTextEmitter.renderStubType(StubIrTextEmitter.kt:467)
    	at org.jetbrains.kotlin.native.interop.gen.StubIrTextEmitter.access$renderStubType(StubIrTextEmitter.kt:18)
    	at org.jetbrains.kotlin.native.interop.gen.StubIrTextEmitter$printer$1.visitProperty(StubIrTextEmitter.kt:256)
    a
    s
    • 3
    • 7
  • j

    Justin

    09/25/2019, 7:36 PM
    Anyone else finding that upgrading to Xcode 11 breaks iOS tests in a multiplatform project?
    e
    t
    • 3
    • 3
  • s

    Sam Schilling

    09/25/2019, 9:26 PM
    Calling
    freeze
    on one of my objects resulted in
    Memory.cpp:902: runtime assert: unknown node during condensation building
    . Has anyone else experienced this issue or know the cause?
    o
    • 2
    • 1
  • v

    Vincent Chen

    09/26/2019, 7:25 AM
    Hi, Does JVM platform can use cinterop ?? I got Error.
    :no_red: 7
    s
    • 2
    • 1
  • s

    Sam Schilling

    09/26/2019, 4:55 PM
    Does anyone have any experience with multithreading on macOS and getting around all the IllegalStateExceptions? I am seeing lots of random crashes but that seems somewhat expected because I am using
    TransferMode.UNSAFE
    which is meant to be used as a last resort
    b
    s
    k
    • 4
    • 13
  • s

    Slackbot

    09/26/2019, 5:01 PM
    This message was deleted.
    s
    j
    • 3
    • 4
  • n

    napperley

    09/26/2019, 11:33 PM
    Would a Kotlin Native library (in KLib form) using Kotlin 1.3.41 be compatible with a Kotlin Native program using Kotlin 1.3.50?
    b
    k
    • 3
    • 25
  • j

    Justin

    09/27/2019, 3:47 AM
    Does anyone know how to add files from resources to the iOS simulator's bundle resources so that the files will be available during iosTests?
    a
    • 2
    • 1
  • k

    Konstantin Petrukhnov

    09/27/2019, 11:40 AM
    Do I understand correctly, that kotlin kode could be run either in UI thread or in BG thread on iOS? There is no way to have code work for UI and some doing heavy calculations (100+ seconds) for single particular app?
    o
    k
    a
    • 4
    • 4
  • s

    Sam Schilling

    09/27/2019, 8:26 PM
    Is it possible to mutate a singleton instance from a background thread via
    Worker.execute
    with
    TransferMode.SAFE
    ? Basically I want to keep a global cache as a singleton instance and have the background workers able to add things to the cache. But I think that may violate mutable XOR global.
    j
    b
    • 3
    • 13
  • s

    Sam Schilling

    09/27/2019, 9:20 PM
    Has anyone here found a good way to integrate a callback mechanism with the Workers API to do background execution? I want to kick off a background task and have it call a callback later without blocking, but that doesn’t seem to be possible if the callback mutates any state/references unfrozen objects. This seems like a fairly straightforward task but AFAIK there is currently no way to do it. I can do something like:
    val input = ...
    val callback: (Result) -> Void = ...
    val future = Worker.start().execute(TransferMode.SAFE, { input.freeze() }) {
        // do work
        result    
    }
    val result = future.result
    callback(result)
    But obviously that blocks the calling thread until execution is finished. Open to other suggestions besides
    Worker
    but I am not aware of any other mechanism for multithreading since coroutines only run on main thread.
    l
    j
    +2
    • 5
    • 19
  • b

    breandan

    09/29/2019, 3:51 AM
    Is there something like JavaCPP for Kotlin/Native? i.e. a zero-configuration Gradle plugin or library which ships with prebuilt binaries for common libraries on common target architectures? What I'm thinking is something like this:
    plugins {
          kotlin("multiplatform")
          id("org.kotlin.commonlibs")
    }
    
    commonLibs {
         compile("opencv2")
    }
    And it downloads the appropriate
    klib
    containing all the dependencies, which can be linked against the generated stubs and called from Kotlin/Native code without any further configuration. With JavaCPP this is dead simple, you just add the Maven coordinates and can immediately call native libraries (bundled in the JAR) on any target architecture. https://github.com/bytedeco/javacpp-presets
    n
    g
    m
    • 4
    • 18
  • b

    basher

    09/30/2019, 3:18 AM
    Just saw the draft K/N changelog for 1.3.60. I thought new -Xg0 flag was 1.3.50? Anyone or JB folks know?
    k
    s
    • 3
    • 4
  • x

    XQDD

    09/30/2019, 8:21 AM
    Why? Did I do something wrong?
    g
    m
    n
    • 4
    • 10
  • k

    Konstantin Petrukhnov

    09/30/2019, 9:06 AM
    What is recommended way to have mutable object structure that work in iOS? Mutable only from kotlin code. Structure have thousands-to-millions of objects.
    o
    k
    j
    • 4
    • 4
  • b

    Big Chungus

    09/30/2019, 11:59 AM
    I'm getting this when trying to link WASM to release executable:
    error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
    Any tips?
    a
    • 2
    • 2
  • b

    Big Chungus

    09/30/2019, 1:31 PM
    Are there any plans to add something like this to kotlin/WASM? https://rustwasm.github.io/docs/wasm-bindgen/examples/dom.html Currently there're only jsinterop hooks for canvas
    j
    • 2
    • 1
  • m

    Marc Knaup

    09/30/2019, 2:27 PM
    Is anyone running a fully native Kotlin server yet? If so then where and what's the experience (performance, stability, ease of development & deployment)?
    b
    o
    +2
    • 5
    • 8
  • s

    Sam Schilling

    09/30/2019, 7:47 PM
    Multi-threading in a Kotlin MPP project is quite difficult due to the limitations that the K/N Worker API sets in place 😞
    a
    k
    • 3
    • 41
  • m

    Miguel Fermin

    10/01/2019, 2:07 AM
    message has been deleted
    o
    • 2
    • 1
  • k

    Kirill Shmakov [JB]

    10/01/2019, 3:29 PM
    Hey folks, could you please give a bit of a feedback? Provided that you have Kotlin plugin in IDE, when the new release of Kotlin (and Kotlin/Native) is rolled out, what do you usually update first: 1️⃣ both IDE plugin and in-project Kotlin version; 2️⃣ only IDE plugin; 3️⃣ only in-project Kotlin version.
    1️⃣ 23
    4️⃣ 1
    2️⃣ 7
    3️⃣ 3
    s
    k
    +2
    • 5
    • 4
Powered by Linen
Title
k

Kirill Shmakov [JB]

10/01/2019, 3:29 PM
Hey folks, could you please give a bit of a feedback? Provided that you have Kotlin plugin in IDE, when the new release of Kotlin (and Kotlin/Native) is rolled out, what do you usually update first: 1️⃣ both IDE plugin and in-project Kotlin version; 2️⃣ only IDE plugin; 3️⃣ only in-project Kotlin version.
1️⃣ 23
4️⃣ 1
2️⃣ 7
3️⃣ 3
s

serebit

10/01/2019, 3:41 PM
If it's EAP, just the plugin. If it's release, both.
4️⃣ 1
👍 5
➕ 1
k

kpgalligan

10/01/2019, 3:42 PM
I’m usually on eap Intellij. I update Kotlin plugin when the little dialog pops up. Don’t really relate the 2. Can’t update KN until libraries push, which may take time.
👍 6
➕ 1
b

Big Chungus

10/01/2019, 4:43 PM
Toolbox updates everything to release version automatically for me. I'm also updating kotlin version as soon as the release goes out. Not a fan of EAP updates.
👍 1
k

Konstantin Petrukhnov

10/02/2019, 4:24 AM
Only version in project, to see if there any problems with compilation/packaging. Then within days-weeks usually update IDE and its plugin.
👍 1
View count: 5