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
javascript
  • e

    Eduardo Zuza

    04/07/2021, 7:18 PM
    I have in my gradle in the groovy language implementation project (": dlgw_araiz") How does this look in kotlin?
    • 1
    • 1
  • c

    Christoph Hock

    04/07/2021, 8:29 PM
    Can anyone explain to me why i can only unsafe type cast the link element here?
    fun reloadCss() {
        val iframe = document.getElementById("iframe-id")
        println("Test0")
        if (iframe != null && iframe is HTMLIFrameElement) {
            val contentWindow = iframe.contentWindow
            if (contentWindow == null) {
                println("Null1")
                return
            }
            val link = contentWindow.document.getElementById("css-link")
            if (link == null) {
                println("Null2")
                return
            }
            console.log("Typeof is" + jsTypeOf(link))
            console.log(link::class)
            if (link is HTMLLinkElement){
                val href: String = link.href.split('?')[0]
                link.href = "$href?version=${currentTimeMillis()}"
                println("Test1")
            }
            val cssLink = link.unsafeCast<HTMLLinkElement>()
            val href: String = cssLink.href.split('?')[0]
            cssLink.href = "$href?version=${currentTimeMillis()}"
            println("Test2")
        }
    }
    When the code above is executed the console output is as follows:
    • 1
    • 1
  • n

    napperley

    04/08/2021, 12:34 AM
    Is there a way to run the Kotlin JS continuous run feature at the same time that a JVM server (eg Ktor based) is running via Gradle?
    h
    t
    b
    • 4
    • 5
  • p

    Pramod Shri

    04/08/2021, 8:12 AM
    it might sound a bit dumb but i want to know if there is a way to use a javascript library in a kotlin jvm project?
    h
    r
    s
    • 4
    • 14
  • e

    Eduardo Zuza

    04/08/2021, 5:23 PM
    Hi In html I have </div> <script> dlg_logon.passMapear; </script> in main.kt @JsName("passMapear") fun passMapear() { ControllerLogon().passMapear() } the browser displays the following error: dlg_logon is not defined my Git test https://github.com/zuza07/kotlinJS
    b
    • 2
    • 3
  • d

    Dmitriy Tarasevich

    04/08/2021, 11:14 PM
    Hey Everyone, I am running into an issue where
    Promises
    which are returned using
    GlobalScope.promise {}
    are executed immediately instead of lazily when the clients invoke
    Promise#then
    . I am able to lazy load the promise by setting the coroutinestart to
    Lazy
    and then calling
    promise.deferred.start
    from within the js code.. but its not really ideal. What I would expect is that the coroutine is kicked off when
    .then
    is invoked. Anyone run into this before?
    ✅ 1
    t
    • 2
    • 3
  • d

    Dmitry Romanov [JB]

    04/15/2021, 9:17 AM
    Hey folks! https://play.kotlinlang.org/ now with JS IR support! Thanks a lot to @Ilya Goncharov [JB] 👍
    👍 13
    👍🏼 2
    👏 8
    a
    v
    +5
    • 8
    • 19
  • e

    Etienne

    04/15/2021, 12:49 PM
    Is there a channel where it'd be appropriate to 'self-promote', or ask for feedback on an article?
    b
    • 2
    • 4
  • l

    Luc Girardin

    04/15/2021, 1:32 PM
    In the 1.5.x series, the compiler is systematically unable to
    @JSExport
    interfaces and gives the error “`Declaration of such kind (interface) cant be exported to JS`”. I was hoping this problem would magically vanish in 1.5.0-RC, but it is still present in both
    LEGACY
    and
    IR
    modes. I am a bit surprised that not more people about have complained about it. Have you bumped into this issue or did one of you find a workaround? There is an issue in YouTrack about it: https://youtrack.jetbrains.com/issue/KT-45434
    a
    • 2
    • 2
  • j

    Jaroslav

    04/16/2021, 10:13 AM
    Hi! Do you know some non trivial example of unit tests + karma in kotlin js please? I am trying to add tests to my project, still getting Unresolved reference: somepackagename from compileTestKotlinJs 😕
    b
    r
    • 3
    • 3
  • t

    Tarun Chawla

    04/16/2021, 5:54 PM
    Hi , am new to Kotlin JS. Am trying to replicate this HTML code in Kotlin. Can someone please help how I can achieve this:
    <nav class="navbar" role="navigation" aria-label="main navigation">
    class I can add this way, but not sure about other attibuted.
    nav(classes = "navbar") {
      
    }
    t
    • 2
    • 3
  • t

    Tarun Chawla

    04/16/2021, 6:37 PM
    Hi, Can anybody please share an example or any link for creating a css style locally within a div and writing css into a separate file and using it for styling any html element?
    t
    • 2
    • 3
  • t

    Tarun Chawla

    04/17/2021, 7:10 AM
    Am struggling to increase the height of nav bar image. Am using bulma css. Am I missing something here? Just need to increase the width/height of image. Index html file:
    fun HTML.index() {
      head {
        title("Welcome to Seller Service")
        link(rel = "stylesheet", href = "<https://cdn.jsdelivr.net/npm/bulma@0.9.2/css/bulma.css>") { }
        link(rel = "stylesheet", href = "static/styles/index.css") {}
      }
      body {
        div {
          id = "index"
        }
        script(src = "/static/output.js") {}
        script(src = "<https://use.fontawesome.com/releases/v5.3.1/js/all.js>") {}
      }
    }
    Index component where am overriding index div:
    override fun RBuilder.render() {
        div(classes = "section") {
          div(classes = "container") {
            nav(classes = "navbar") {
              div(classes = "navbar-brand"){
                a(classes = "navbar-item"){
                  img(classes = "img-style", src = "static/images/logo-text.png", alt = "Site logo") {
                  }
                }
              }
            }
          }
        }
      }
    }
    Below is the img-style inside index.css:
    .img-style {
        max-height:300px;
    }
    In console am seeting this:
    .navbar-item img {
        max-height:1.75rem
    }
    
    .img-style {
        <strike>max-height:4rem;</strike>
    }
    • 1
    • 1
  • s

    Shabinder Singh

    04/17/2021, 10:09 AM
    I have encountered a possible BUG in js, see in below Screenshot , while executing a Test on js side in KMP Lib, it report an error of
    substring on undefined
    while at compile time it is a String . However when I add a redundant
    as String
    Cast the error disappears! Any IDEA what could be the issue? Anyway I reported the error to youtrack to here: https://youtrack.jetbrains.com/issue/KT-46157
    t
    t
    • 3
    • 22
  • t

    Tarun Chawla

    04/17/2021, 12:01 PM
    During development sometimes I get this kind of error on browser console:
    Error: Minified React error #137; visit <https://reactjs.org/docs/error-decoder.html?invariant=137&args[]=input&args[]=> for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    on <http://localhost:9000/static/output.js:46>
        Yl <http://localhost:9000/static/output.js:46>
        cu <http://localhost:9000/static/output.js:46>
        su <http://localhost:9000/static/output.js:46>
        au <http://localhost:9000/static/output.js:46>
        Za <http://localhost:9000/static/output.js:46>
        Ja <http://localhost:9000/static/output.js:46>
        Iu <http://localhost:9000/static/output.js:46>
        Fu <http://localhost:9000/static/output.js:46>
        eu <http://localhost:9000/static/output.js:46>
        Fu <http://localhost:9000/static/output.js:46>
        render <http://localhost:9000/static/output.js:46>
    How to decode these errors? Any suggestions on debugging these kind of errors. Currently am just solving by going through code, this stack does not help me.
    t
    • 2
    • 3
  • r

    Robert Jaros

    04/18/2021, 8:04 PM
    After migration to Gradle 7.0, I've got such warnings:
    Execution optimizations have been disabled for task ':kvision-modules:kvision-common-annotations:jsSourcesJar' to ensure correctness due to the following reasons:
      - Gradle detected a problem with the following location: '/home/rjaros/git/kvision/kvision-modules/kvision-common-annotations/build/externals/kvision-kvision-common-annotations-jsIr/src'. Reason: Task ':kvision-modules:kvision-common-annotations:jsSourcesJar' uses this output of task ':kvision-modules:kvision-common-annotations:jsIrGenerateExternalsIntegrated' without declaring an explicit or implicit dependency.
    What can be done about it? I don't even have these tasks defined in my
    build.gradle.kts
    .
    b
    v
    • 3
    • 6
  • c

    Chris

    04/21/2021, 1:41 AM
    Hello all,  Is there a recommended way of incorporating a multiplatform js module into a reactjs application. I was able to use npm install to install my kotlin-js compiled module but have tried importing classes et al with very little success. Here is an example where I have a compiled module that I am trying to import I would rather use the import api however this did not work as expected. I am really trying to understand how to make my compiled module work with the import function vs requires if possible.
    // import {api} from 'tradelimit-tradelimit-common'
    const api = require('tradelimit-tradelimit-common').indicators
    const tradelimit = require('tradelimit-tradelimit-common')
    
    export default class ChartComponent extends React.Component {
        componentDidMount() {
            getData().then(data => {
                this.setState({ data })
            })
        }
        render() {
            console.log("API IS ",api)
    
            // console.log(indicators)
            let bar = new api.Bar(123123123)
            console.log(bar)
    Is there a way to do import vs require using multiplatform?
    val jsMain by getting {
        dependencies {
            implementation(kotlin("stdlib-js"))
            implementation("org.jetbrains.kotlinx:kotlinx-serialization-core-js:1.1.0")
            implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$coroutine_version")
        }
    }
    
    
    val commonMain by getting {
        dependencies {
            implementation(kotlin("stdlib-common"))
            implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.1.0")
            implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$coroutine_version")
        }
    }
    t
    • 2
    • 1
  • t

    Tarun Chawla

    04/21/2021, 1:29 PM
    Am currently using below api to set cookie:
    fun setCookie(name: String, value: String, path: String = "/") {
      document.cookie = "$name=$value;path=$path"
    }
    Below api to get cookie:
    fun getCookieValue(name: String): String? {
      val currentCookies = document.cookie.split(";")
      for (cookiePair in currentCookies) {
        val cookieKeyValue = cookiePair.split("=")
        if (cookieKeyValue.first().trim() == name.trim()) {
          return cookieKeyValue[1].trim()
        }
      }
      return null
    }
    Two questions: 1. Is there any better way to do it? 2. How to delete a cookie key value?
    • 1
    • 1
  • e

    edwinRNDR

    04/23/2021, 7:18 AM
    org.khronos.webgl.WebGLRenderingContextBase
    exposes
    compressedTexImage2D
    as
    fun compressedTexImage2D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, border: Int, data: ArrayBufferView)
    I believe this should be:
    fun compressedTexImage2D(target: Int, level: Int, internalformat: Int, width: Int, height: Int, border: Int, data: ArrayBufferView?)
    reference: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/compressedTexImage2D What is the best place to report this?
    t
    • 2
    • 1
  • j

    Jaroslav

    04/23/2021, 8:38 AM
    Hi, I have added npm dependency
    implementation(npm("showdown", "1.9.1"))
    but it complains, that "showdown.js is not a valid Kotlin Javascript library" and rebuild of project in Idea ends with Kotlin: [Internal Error] java.io.IOException: Failed to open zip file: /home/xxx/yyy/zzz/build/js/node_modules/showdown/dist/showdown.js Is it problem of lib format or bad dependence or something else?
    t
    • 2
    • 2
  • t

    Tarun Chawla

    04/23/2021, 11:36 AM
    can someone help me on this,how to see which radio button is selected in a form in kotlin html dsl? am trying to replicate this code but am not able to .
    var coffee = document.forms[0];
    var txt = "";
    var i;
    for (i = 0; i < coffee.length; i++) {
      if (coffee[i].checked) {
       txt = txt + coffee[i].value + " ";
       }
    }
      document.getElementById("order").value = "You ordered a coffee with: " + txt;
    In kotlin I wrote below code:
    val form = document.getElementById(key) as HTMLFormElement
    for(element in form.elements.asList()){
      console.log("element value ${element.checked}")
    }
    But this is not working as there is no checked property.
    • 1
    • 2
  • s

    Sean Keane

    04/23/2021, 1:49 PM
    Just wondering if you or anyone in your team have seen this before?
    e: java.lang.IllegalStateException: Unsupported operation
    	at org.jetbrains.kotlin.backend.common.serialization.IrModuleDeserializer.referenceSimpleFunctionByLocalSignature(IrModuleDeserializer.kt:37)
    t
    • 2
    • 10
  • t

    turansky

    04/26/2021, 6:32 AM
    https://twitter.com/vnturansky/status/1386567866523295745
    👍 8
    👍🏼 1
    a
    r
    • 3
    • 8
  • h

    Hywel Bennett

    04/26/2021, 2:30 PM
    I was wondering if I could get some guidance on the JS IR-backend and its behaviour in this example (https://pl.kotl.in/diCAOrw0L) - when run using the legacy backend this gives the expected names, but the IR backend has modified field names with _ prefixes etc. I noticed this ticket (https://youtrack.jetbrains.com/issue/KT-45944) but was wondering if I'm just missing something?
    d
    • 2
    • 7
  • a

    Atchay Varma

    04/26/2021, 3:25 PM
    Hi mates, Can I actually work with electron react project on kotlinjs ?
    h
    • 2
    • 5
  • m

    Martin Feldsztejn

    04/27/2021, 3:29 AM
    Hey! I’ve started playing around with KotlinJs while trying to migrate a project from nodejs to kotlin/js. I’ve ran into some issues with dukat since I require some packages from npm. Maybe someone here knows any replacements? I’m using express which I would assume can be replaced by ktor, but I’ve run into issues with the googleapis package, dukat can’t process it and I’m not sure if there is multiplatform support for said apis (specifically gmail and sheets). Any help would be appreciated
    t
    • 2
    • 2
  • t

    turansky

    04/27/2021, 6:45 AM
    https://twitter.com/vnturansky/status/1386933696649961473
    :kotlin-intensifies: 2
    a
    • 2
    • 4
  • s

    Sean Keane

    04/27/2021, 1:54 PM
    I'm looking at i18n translations strategies, just wondering what everyone is using?
    b
    r
    +3
    • 6
    • 19
  • v

    Vampire

    04/27/2021, 3:56 PM
    Anyone any idea why the Dukat generated file that compiled perfectly fine yesterday does not compile anymore today without me having anything changed? https://github.com/Vampire/setup-wsl/runs/2443493925?check_suite_focus=true#step:4:114
    r
    t
    m
    • 4
    • 18
  • m

    Marc Knaup

    04/28/2021, 5:41 PM
    Is anyone else using an incredible amount of hacks and workarounds in their K/JS project? 😅
    🇳🇴 2
    😵 1
    r
    s
    +3
    • 6
    • 26
Powered by Linen
Title
m

Marc Knaup

04/28/2021, 5:41 PM
Is anyone else using an incredible amount of hacks and workarounds in their K/JS project? 😅
🇳🇴 2
😵 1
r

Robert Jaros

04/28/2021, 6:00 PM
I would say the only real hacks I use in KVision are the ones related to the difference between legacy and IR backends.
m

Marc Knaup

04/28/2021, 6:01 PM
I see. I’ve dropped all support for legacy. Enough to care about with IR already 😅
r

Robert Jaros

04/28/2021, 6:03 PM
I like to work in dev mode with legacy, because it's very fast compared to the IR.
➕ 2
m

Marc Knaup

04/28/2021, 6:04 PM
Yeah would love that too. Update cycle is up to 1 minute for me which is super annoying. But I cannot use legacy in my actual web front-end as it lacks some IR functionality.
s

Sean Keane

04/28/2021, 11:03 PM
What do you feel you're lacking specifically? I'm currently getting 4-7 second build times. I'm not sure what your spec is but generally I found giving more VM memory to intellij gives it a faster build and smoother response time. This has seemed to solve the issues on the M1 Mac and x86 machines. 4gb seems to help massively on both. https://www.jetbrains.com/help/idea/increasing-memory-heap.html I've found that with 1.5.0-RC the compile time has dropped a few seconds more. 1 minute should not be the case. What gradle version are you currently using. I'm running 7.0 on my setup and this has seemed to help also. If you like you could try also turning on build in parallel in your
gradle.properties
file.
org.gradle.parallel=true
If you're building in different modules this should help.
m

Marc Knaup

04/28/2021, 11:36 PM
My MacBook Pro is mid-2018 and the IDE has 24GB available. Gradle 6.8 has 8GB limit. I cannot use Kotlin 1.5.0-RC because not all Kotlin libraries are compatible yet. Gradle parallel doesn’t make any difference. And I had to disable incremental builds due to a compiler or tooling bug. How large is your project?
a

andylamax

04/29/2021, 12:33 AM
Using Kotlin/JS IR and i have arround 12 seconds build times, 16-20 seconds for page reload. IR has gotten so much better since 1.4.20 based on my experience
m

Marc Knaup

04/29/2021, 12:42 AM
Did you have to disable incremental compilation?
a

andylamax

04/29/2021, 1:02 AM
Haven't done anything than change the output filename, and enabled cssSupport
s

Sean Keane

04/29/2021, 1:13 AM
Was it this bug https://youtrack.jetbrains.com/issue/KT-46283
m

Marc Knaup

04/29/2021, 1:20 AM
@Sean Keane https://youtrack.jetbrains.com/issue/KT-44718 Same I guess
s

Sean Keane

04/29/2021, 1:24 AM
The project is 3 multiplatform modules with buildSrc for deps management. I think you should try turning on incremental builds. This will stop you recompiling everything each time.
m

Marc Knaup

04/29/2021, 3:41 AM
I can’t due to that issue…
c

christophsturm

04/29/2021, 8:45 AM
what libraries do not yet work with 1.5?
s

Sean Keane

04/29/2021, 10:15 AM
@Marc Knaup Have you tried Inc Comp with 1.4.32? Also, can you list the libs you're having issues with? I can check on my end to see if its similar on my setup.
m

Marc Knaup

04/29/2021, 2:59 PM
The incremental compilation issue is only fixed in 1.5.
I wasn't able use kotlinx-datetime and kotlinx-coroutines because of changes in the Duration inline class.
c

christophsturm

04/29/2021, 3:01 PM
its unfortunate that theres no coroutines beta for 1.5
s

Sean Keane

04/29/2021, 3:51 PM
I've been using
1.4.3-native-mt
This is my lib list:
const val kotlinReact = "17.0.2-pre.153-kotlin-1.4.32"
    const val kotlinStyled = "5.2.3-pre.153-kotlin-1.4.32"
    const val routerDom = "5.2.0-pre.153-kotlin-1.4.32"
    const val kotlin = "1.5.0-RC"
    const val ktor = "1.5.2"
    const val coroutinesCore = "1.4.3-native-mt"
    const val coroutinesTest = "1.4.3"
    const val serializationCommon = "1.1.0"
Are you on the latest DateTime? A new release is out on the 27th April. https://search.maven.org/search?q=a:kotlinx-datetime
m

Marc Knaup

04/29/2021, 4:04 PM
I’ve replaced the Kotlin react/styled/router libs with my own, so no issues here. Coroutines doesn’t work with Kotlin 1.5 if you’re using
Duration
anywhere. And I do a lot.
s

Sean Keane

04/29/2021, 4:27 PM
Have you a small example of this?
m

Marc Knaup

04/29/2021, 4:28 PM
No. Simply any function that takes or returns
Duration
, like
delay
.
s

Sean Keane

04/29/2021, 4:37 PM
Ok, I'll give it a go with
kotlinx-datetime
and see if I can replicate on my side.
m

Marc Knaup

04/29/2021, 4:37 PM
I’ll simply wait for Kotlin 1.5 release. Shouldn’t take too long before it’s released along with coroutines update.
r

russhwolf

04/29/2021, 5:26 PM
kotlinx.coroutines 1.5.0-RC has been released which is built against Kotlin 1.5.0, if you want to try it out early
👍 2
m

Marc Knaup

04/29/2021, 8:07 PM
Good to know 🙂 We’re very close to launch now, so I won’t dare making everything explode now 😁 After the launch I’ll tackle that upgrade again.
View count: 5