https://kotlinlang.org logo
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
eap
  • j

    josephivie

    09/01/2018, 8:36 PM
    Can you get Ktor to work with Kotlin 1.3-M2? I've been trying to get it working, but it seems that extending an abstract class that uses
    suspend
    doesn't work right. Specifically I'm trying to use
    ContentConverter
    . I'm getting an
    AbstractMethodError
    .
    n
    • 2
    • 1
  • n

    Nikky

    09/06/2018, 1:08 AM
    one thing i was always wondering.. what does the number after -eap mean ? i guessed first that it might be the week .. is it just the internal build number that you decide to make public ?
    i
    • 2
    • 1
  • c

    christophsturm

    09/06/2018, 8:54 AM
    should the 1.2.70-eap40-IJ2018.2-1 eap build work with the new idea eap build or will there be a IJ2018.3 version of it too?
    a
    • 2
    • 1
  • u

    uli

    09/07/2018, 3:28 PM
    I can't get non-experimental coroutines working with 1.3-m2. I always get
    Class 'kotlinx.coroutines.Deferred' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler
    . These are my dependencies:
    ext.kotlin_version = '1.3-M2'
    ext.kotlin_coroutines_version = '0.25.0-eap13'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
    compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
    Is
    0.25.0-eap3
    right here?
    e
    • 2
    • 2
  • u

    uli

    09/07/2018, 5:52 PM
    What does
    you can simply call old suspend functions
    in the 1.3-m2 release notes actually mean? I can not link against old coroutine based jars, cause they probably depend on classes in the old kotlinx-coroutines-core packages, right?
    e
    • 2
    • 2
  • p

    pokkeli

    09/13/2018, 5:53 AM
    I just updated to Kotlin 1.3-M2 from stable, with latest Intellij 2018.3 EAP, and now Kotlin isn't detected at all. The IDE just says "Kotlin is not configured". And if I try to (re)configure the IDE says "No configurators are available". Anyone else ran into this (who knows how to fix it possibly)?
    g
    • 2
    • 5
  • p

    pokkeli

    09/13/2018, 6:04 AM
    Also, it seems that I can't even uninstall the Kotlin plugin via the IDE (due to the new plugin UI maybe)?
    l
    • 2
    • 2
  • c

    christophsturm

    09/13/2018, 10:29 AM
    does idea 2018.3 eap bundle kotlin 1.3eap? does that mean that its coming soon?
    a
    • 2
    • 1
  • d

    digitalsanctum

    09/28/2018, 10:08 PM
    circling back, I had to explicitly add the eap repository in order to get the rc version of the jvm plugin via:
    pluginManagement {
      repositories {
        maven("<https://dl.bintray.com/kotlin/kotlin-eap>")
        gradlePluginPortal()
      }
    }
    👏 2
    j
    r
    • 3
    • 3
  • i

    Ian

    10/02/2018, 5:30 PM
    I_m_getting_the_following_build_error_since_I_upgraded_to_the_latest_EAP__it_doesn_t_give_me_much_of_a_clue_what_the_problem_is_.kt
    l
    • 2
    • 1
  • t

    tylerwilson

    10/09/2018, 5:39 PM
    Just tried moving up to 1.3.0-rc-146, and it fails on a simple class that derives from a one property interface. 😞
    error: no interface expected here
    public final class Product extends NameProtocol {
    g
    d
    • 3
    • 7
  • e

    elect

    10/14/2018, 6:52 PM
    I just updated to
    1.3.0-rc-152
    and now I get
    Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0-rc-152.
    .. anybody else?
    k
    • 2
    • 3
  • a

    AJ Alt

    10/15/2018, 10:24 PM
    Looking at the new contracts api, the KEEP states that the metadata and semantics are stable. I was hoping to be able to add some contracts to library code, and let consumers take advantage of them. But surprisingly it seems like
    @ExperimentalContracts
    is transitive, forcing callers to opt-in even if they don't declare any contracts themselves. Is there a way to get this to compile?
    @ExperimentalContracts inline fun <T> foo(block: () -> T): T {
      contract { callsInPlace(block, EXACTLY_ONCE) }
      return block()
    }
    
    fun main() {
      foo { } // error: this declaration is experimental and its usage must be marked with '@ExperimentalContracts'
    }
    m
    i
    • 3
    • 5
  • i

    Ian

    10/17/2018, 10:21 PM
    I’m getting the following build error:
    Error:Kotlin: [Internal Error] java.lang.IllegalStateException: Backend Internal error: Exception during code generation
    Cause: Back-end (JVM) Internal error: Error type encountered: [ERROR : For SuccessOrFailure] (ErrorType).
    Cause: Error type encountered: [ERROR : For SuccessOrFailure] (ErrorType).
    Full error here: https://gist.github.com/sanity/e596fc3b5ff6b3f02f415fd9dc2e00d3 I’m using the latest 1.3 RC (this happens both with builds 57 and 80). Any ideas?
    g
    • 2
    • 1
  • o

    orangy

    10/17/2018, 10:39 PM
    SuccessOrFailure
    is something from the pre-release stdlib, it’s no longer there. Looks like you mixed up some versions.
    👍 1
    i
    • 2
    • 1
  • j

    jw

    10/18/2018, 3:01 PM
    see https://github.com/JetBrains/kotlin/releases/tag/v1.3-rc4
    🎉 1
    d
    • 2
    • 1
  • r

    ralf

    10/18/2018, 6:10 PM
    Is it possible to suppress experimental language feature warnings like
    w: ATTENTION!
    This build uses unsafe internal compiler arguments:
    
    -XXLanguage:+NewInference
    It prints this warning each time a KotlinCompile task is running. With many modules this is super annoying. I know what I’m doing, I want to test these feature. I don’t need to be reminded each time
    d
    • 2
    • 3
  • m

    Marc Knaup

    10/18/2018, 8:06 PM
    What is the reason that
    inline class
    must be at the outer scope? Is that a temporary limitation?
    class User {	
    	inline class Id(val raw: String) // Inline classes are only allowed on top level
    }
    o
    m
    • 3
    • 3
  • i

    Ian

    10/20/2018, 1:31 AM
    @Nikky I think this might be weirder, it’s an internal compiler error. One thing I’ve just noticed is that I can build my code with gradle, I only get that error when I try to build using Build -> Rebuild Project (Kotlin plugin version 1.3-M2-release-IJ2018.2-1)
    l
    • 2
    • 1
  • i

    Ian

    10/20/2018, 1:38 PM
    @Nikky For reasons I don’t understand, updating to the latest EAP via Toolbox appears to have fixed it, at least for now. Thanks again.
    😌 2
    a
    • 2
    • 1
  • d

    Dominaezzz

    10/21/2018, 5:50 PM
    Why? is the question I'm asking. At least in that sample case.
    l
    • 2
    • 4
  • h

    hmole

    10/22/2018, 1:29 PM
    Did something change in 1.3 with anonymous classes(
    object : SomeType
    )? All of my code that's using them is not compiling for wiht 1.3
    d
    g
    d
    • 4
    • 8
  • p

    prasham.h.trivedi

    10/29/2018, 11:08 AM
    How to compare inline classes? My usecase. I have defined 5 `Int`s and an Inline class using Following.
    inline class State(val state: Int)
    And in my regular class I have a variable of the State using
    Delegates.observable
    . Whenever I try to compare two states, I get :
    State cannot be cast to java.lang.Number
    My sample comparision code looks like following.
    this.state==State(1)
    r
    o
    m
    • 4
    • 11
  • a

    Allan Wang

    11/08/2018, 8:26 PM
    If I have
    inline class ShortUser(val value: String)
    and
    inline class User(val value: String)
    , and I want to be able to pass
    ShortUser
    into methods that take in
    User
    , is the only way to pass in
    User(shortUser.value)
    ? (Haven't actually tried this. Just reading the inline class docs, and it looks like there is no other way)
    d
    • 2
    • 1
  • a

    Allan Wang

    11/08/2018, 8:29 PM
    And from the example:
    inline class Name(val s: String) {
        val length: Int
            get() = s.length
    
        fun greet() {
            println("Hello, $s")
        }
    }
    Would it not be preferred to use
    inline val length...
    ?
    d
    • 2
    • 1
  • n

    Nikky

    11/08/2018, 10:33 PM
    @Allan Wang i am pretty sure all functions on line classes are also inlined when possible, so specifying inline there seems redundant
    a
    d
    +2
    • 5
    • 8
  • j

    josephivie

    11/22/2018, 1:46 AM
    I can access the boxed type through
    val x:Any = InlineClass(0); x::class
    but that's pretty hacky
    s
    r
    e
    • 4
    • 5
  • r

    Roman Artemev [JB]

    12/12/2018, 7:11 PM
    📣 1.3.20-EAP1 is available! The build number is
    1.3.20-eap-25
    and it's available in the
    kotlin-eap
    Bintray repository and "EAP 1.3.20" IDE plugin channel. What's new: https://github.com/JetBrains/kotlin/releases/v1.3.20-eap-25 How to get it: https://discuss.kotlinlang.org/t/kotlin-1-3-20-early-access-preview/10748
    🎉 6
    t
    p
    • 3
    • 3
  • c

    christophsturm

    12/12/2018, 7:34 PM
    my gradle build breaks in really strange ways when i upgrade to the eap. it seems that gradle keeps downgrading some kotlin libs to 1.3.10. (which seems to be a transient dependency of one of my dependencies) and then the build fails because the asm version is too low
    l
    a
    • 3
    • 4
  • r

    Roman Artemev [JB]

    12/20/2018, 10:57 AM
    📣 1.3.20-EAP2 is available! The build number is
    1.3.20-eap-52
    and it's available in the
    kotlin-eap
    Bintray repository and "EAP 1.3.20" IDE plugin channel. What's new: https://github.com/JetBrains/kotlin/releases/v1.3.20-eap-52 How to get it: https://discuss.kotlinlang.org/t/kotlin-1-3-20-early-access-preview/10748
    m
    • 2
    • 3
Powered by Linen
Title
r

Roman Artemev [JB]

12/20/2018, 10:57 AM
📣 1.3.20-EAP2 is available! The build number is
1.3.20-eap-52
and it's available in the
kotlin-eap
Bintray repository and "EAP 1.3.20" IDE plugin channel. What's new: https://github.com/JetBrains/kotlin/releases/v1.3.20-eap-52 How to get it: https://discuss.kotlinlang.org/t/kotlin-1-3-20-early-access-preview/10748
m

msink

12/20/2018, 11:25 AM
Something odd:
> Task :libui:cinteropLibuiWindows FAILED
Exception in thread "main" java.lang.UnsatisfiedLinkError: F:\work\.konan\dependencies\msys2-mingw-w64-x86_64-gcc-7.3.0-clang-llvm-lld-6.0.1\bin\libclang.dll: Can't find dependent libraries
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
        at java.lang.Runtime.load0(Runtime.java:809)
        at java.lang.System.load(System.java:1086)
        at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.prepareTool(main.kt:306)
        at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:192)
        at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:36)
        at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:88)
        at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:18)
It works with EAP1 (1.3.20-eap-25)
And on Linux and Mac it works, only Windows broken.
https://ci.appveyor.com/project/msink/kotlin-libui/builds/21145364
View count: 3