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

    Slackbot

    04/17/2019, 11:53 AM
    This message was deleted.
    o
    • 2
    • 1
  • m

    Michael Bryant

    04/17/2019, 4:14 PM
    is it expected that when i have a function with generics (e.g.
    fun <T> doSomething(list: List<T>): T
    ), this function is left out of a generated dynamic library entirely?
    b
    k
    • 3
    • 25
  • r

    Rohan Maity

    04/18/2019, 3:10 AM
    Hello development of Kotlin-Native and application with Kotlin-native require C-Lion . Or is there any other IDE like IntelliJ
    n
    • 2
    • 2
  • j

    JoakimForslund

    04/18/2019, 7:27 AM
    Ehm, Is it since 1.3.30 not possible to use cocoapods plugin and add additional generation of a staticLib along side with the framework? Nothing seems to happen at least when you add staticLib to the binaries dsl or using the old outputKinds("static")
    s
    a
    i
    • 4
    • 50
  • s

    Smallville7123

    04/18/2019, 10:54 AM
    how can i get all members of a class
    g
    o
    e
    • 4
    • 8
  • s

    Smallville7123

    04/18/2019, 2:14 PM
    what does
    ensureCapacity
    and
    setLength
    do in
    StringBuilder
    j
    • 2
    • 2
  • m

    McRed

    04/18/2019, 5:24 PM
    Are there any recent sample projects that use IntelliJ that I could use as a reference for setting up a kotlin-native project? I can’t seem to find any samples from 2019.
    k
    • 2
    • 4
  • i

    Ivan

    04/18/2019, 7:15 PM
    is it possible to start activity in kotlin/native android specific module? or ask for strings, use resources etc
    s
    • 2
    • 3
  • c

    czuckie

    04/18/2019, 7:26 PM
    can someone help me out with the
    CValue
    concept and passing structs by reference to C functions?
    d
    s
    • 3
    • 45
  • s

    Smallville7123

    04/18/2019, 8:12 PM
    tf?
    Uncaught Kotlin exception: kotlin.NotImplementedError: An operation is not implemented.
            at kfun:kotlin.Error.<init>(kotlin.String?)kotlin.Error (0x25a0b6)
            at kfun:kotlin.NotImplementedError.<init>(kotlin.String)kotlin.NotImplementedError (0x2f2c26)
            at kfun:kotlin.NotImplementedError.<init>(kotlin.String;kotlin.Int;kotlin.native.internal.DefaultConstructorMarker)kotlin.NotImplementedError (0x2f2b9f)
            at kfun:sample.Commands.cmd.<init>$lambda-0#internal (0x2f2af3)
            at kfun:sample.Commands.cmd.$<init>$lambda-0$FUNCTION_REFERENCE$4.invoke#internal (0x2f2a1f)
            at kfun:sample.Commands.cmd.$<init>$lambda-0$FUNCTION_REFERENCE$4.$<bridge-UNN>invoke()#internal (0x2f2997)
            at kfun:sample.REPL.REPL() (0x261f29)
            at kfun:sample.main(kotlin.Array<kotlin.String>) (0x2611e3)
            at Konan_start (0x260e97)
            at Konan_run_start (0x260e13)
            at Konan_main (0x260d87)
            at __libc_start_main (0x7f3d91734223)
            at  (0x257029)
            at  ((nil))
    l
    d
    • 3
    • 8
  • n

    napperley

    04/19/2019, 12:26 AM
    Wonder what the energy consumption would be like with a Kotlin Native program running on a desktop device (eg on a ThinkPad T480 running Linux Mint 19.1 ). Are there plans to include energy consumption in the performance benchmark suite when its ready?
    o
    • 2
    • 2
  • a

    andrew

    04/19/2019, 1:24 AM
    I’m not hitting the maximum codepoint value at all
    o
    • 2
    • 3
  • i

    ilya.matveev

    04/19/2019, 12:52 PM
    :thread-please: https://kotlinlang.slack.com/archives/C3SGXARS6/p1555582122100100?thread_ts=1555572434.097400&amp;cid=C3SGXARS6
    a
    s
    • 3
    • 20
  • s

    Smallville7123

    04/19/2019, 3:36 PM
    as i am attempting to make a super minimal in-application debugger capable of debugging itself but in order to print certain info, such as the current line, future lines, and others, i need to have access to the application's source code which may not always be available in the case the application is transfered to a seperate machine via executable file or JAR file, and ran
    d
    • 2
    • 10
  • s

    Slackbot

    04/19/2019, 5:12 PM
    This message was deleted.
    d
    s
    • 3
    • 9
  • s

    Smallville7123

    04/20/2019, 6:58 AM
    how do i obtain the project root as
    fun hello(): String = "Hello, Kotlin/Native! $projectRoot"
    gives me
    e: /home/macropreprocessor/IdeaProjects/kpp/src/Directory Packer/src/linuxMain/kotlin/sample/SampleLinux.kt: (3, 47): Unresolved reference: projectRoot
    g
    • 2
    • 5
  • c

    caffeine

    04/20/2019, 1:38 PM
    Hello. I try to build kotlin-native to two targets: linuxArm32 and linux64. I have the source:
    import platform.zlib.*
    .....
    internal val native = malloc(sizeOf<z_stream_s>().convert())!!.reinterpret<z_stream_s>()
    .....
    When I build it to linux64 target it build normally. But when build to linuxArm32 I have errors:
    Unresolved reference: zlib
    Unresolved reference: z_stream_s
    I use multiplatform kotlin 1.3.30. Host: Windows 10 What the problem? Doesn't Kotlin-native for linuxArm32 have zlib? How fix it?
    d
    o
    • 3
    • 4
  • s

    Smallville7123

    04/21/2019, 12:23 PM
    does kotlin-native have any file IO
    c
    • 2
    • 1
  • s

    Smallville7123

    04/21/2019, 12:24 PM
    or does it rely souly on Cinterop for that
    d
    o
    • 3
    • 5
  • l

    Leon Linhart

    04/22/2019, 11:10 AM
    Does something akin to a Kotlin/Native common library exist? (I'm looking for a way to write platform-indenpendent code common to all native targets that would be extended in target specific modules using platform specific code.)
    d
    s
    o
    • 4
    • 4
  • g

    gianluz

    04/23/2019, 1:35 PM
    anyone added with success some kotlin generated code in a kotlin multiplatform module?
    g
    d
    y
    • 4
    • 20
  • t

    tapchicoma

    04/24/2019, 8:49 PM
    I have a problem with "konan" plugin: when this plugin version "1.3.30" is applied - it sets all kotlin dependencies versions to
    1.3.30-eap-164
    . For example:
    compile - Dependencies for compilation 'main' (target  (jvm)) (deprecated, use 'implementation ' instead).
    \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.30-eap-164 FAILED
    
    compileClasspath - Compile classpath for compilation 'main' (target  (jvm)).
    \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.30-eap-164 FAILED
    d
    g
    • 3
    • 20
  • t

    tapchicoma

    04/25/2019, 8:09 AM
    When using "org.jetbrains.kotlin.native" (version
    1.3.31
    ) with Gradle
    5.4
    - plugin fails to apply with following error:
    Caused by: java.lang.NoSuchMethodError: org.gradle.language.nativeplatform.internal.DefaultNativeComponent.<init>(Lorg/gradle/api/internal/file/FileOperations;)V
            at org.jetbrains.kotlin.gradle.plugin.experimental.internal.AbstractKotlinNativeComponent.<init>(AbstractKotlinNativeComponent.kt:58)
            at org.jetbrains.kotlin.gradle.plugin.experimental.internal.KotlinNativeMainComponent.<init>(KotlinNativeMainComponent.kt:46)
            at org.jetbrains.kotlin.gradle.plugin.experimental.internal.KotlinNativeMainComponent_Decorated.<init>(Unknown Source)
            at org.gradle.internal.instantiation.AsmBackedClassGenerator.newInstance(AsmBackedClassGenerator.java:153)
            at org.gradle.internal.instantiation.AbstractClassGenerator$GeneratedClassImpl$GeneratedConstructorImpl.newInstance(AbstractClassGenerator.java:363)
            at org.gradle.internal.instantiation.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:48)
            ... 161 more
    i
    • 2
    • 7
  • j

    JoakimForslund

    04/25/2019, 11:01 AM
    In the scope of kotlin targets, should/would not using linkerOpts and compilerOpts:
    val bugsnagInterop by cinterops.creating {
                        compilerOpts("-F/Users/XXX/Source/projectX/native/libs", "-framework Bugsnag")
                        linkerOpts("-F/Users/XXX/Source/projectX/native/libs", "-framework Bugsnag")
                    }
    be the same as in the def file write:
    compilerOpts = -F/Users/XXX/Source/projectX/native/libs -framework Bugsnag
    linkerOpts = -F/Users/XXX/Source/projectX/native/libs -framework Bugsnag
    Because currently by only using the above code snippet I run into linkage problem
    s
    • 2
    • 2
  • l

    lukaville

    04/25/2019, 6:22 PM
    hi! is it safe to use
    TransferMode.UNSAFE
    when we properly synchronise everything using posix mutexes and we don’t have references to the objects in the passing worker?
    k
    a
    • 3
    • 16
  • i

    Ivan

    04/25/2019, 8:15 PM
    is there a way to create an instance of class from string? I can see the KClass<T>.createInstance() from empty constructor etc, but cant see a way to create Kclass from string like "org.atata.SomeClass" is there some static method I miss like Class.forName(str:String)?
    o
    g
    • 3
    • 9
  • d

    Dominaezzz

    04/25/2019, 8:54 PM
    Is there a way to share cinterop lib between two source sets?
    dependsOn
    doesn't work.
    i
    • 2
    • 12
  • d

    Dominaezzz

    04/25/2019, 9:05 PM
    Say I have header files
    A.h
    and
    B.h
    .
    B.h
    has
    #include "A.h"
    . I want to make
    A.klib
    and
    B.klib
    with cinterop tool but I want
    B.klib
    to recycle the identifiers from
    A.klib
    so that the libraries are compatible. I think cinterop does this for platform libraries. How do I do such myself?
    i
    • 2
    • 6
  • m

    Michael Bryant

    04/25/2019, 10:26 PM
    anyone have any good examples of simple kotlin/native libraries that are actually being published to maven central?
    s
    k
    m
    • 4
    • 10
  • j

    Jurriaan Mous

    04/26/2019, 6:48 AM
    Is there any way to promote the fixing of the regression described in https://github.com/JetBrains/kotlin-native/issues/2873? It did not make 1.3.31 and prevents me to upgrade to 1.3.3x.
    o
    • 2
    • 2
Powered by Linen
Title
j

Jurriaan Mous

04/26/2019, 6:48 AM
Is there any way to promote the fixing of the regression described in https://github.com/JetBrains/kotlin-native/issues/2873? It did not make 1.3.31 and prevents me to upgrade to 1.3.3x.
o

olonho

04/26/2019, 8:47 AM
Fix is pretty complex, and we suggest to work it around in your code, as it may be delayed till 1.3.40.
j

Jurriaan Mous

04/27/2019, 9:25 AM
Ok, thanks for the update!
View count: 4