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
kontributors
  • g

    GarouDan

    03/18/2018, 4:49 PM
    Another thing I was wondering is how could we create an automatic javascript wrappers to use in Kotlin. For me the hard thing to include Kotlin in the javascript stack is about the wrappers. So I was wondering, could we create a tool, for example, that could inspect a javascript library a create a wrapper for it automatically, even without types? Or could we have an autocompletion (on IntelliJ, for example) that when we link a library (using ‘external’ or something like that) we achieve an autocompletion (exactly what happens when we are using javascript in IntelliJ)? So I don’t really know the goals or how can I help but I’m very interested on this. Someone can point me the direction?
    b
    • 2
    • 2
  • i

    ilya.gorbunov

    04/05/2018, 10:53 AM
    📣 We have updated the build environment requirements. Now it's required to have JDK 9 in addition to previous JDK versions to build Kotlin project https://github.com/jetbrains/kotlin#build-environment-requirements
    g
    k
    • 3
    • 4
  • y

    Yuku Kotani

    04/12/2018, 3:37 PM
    Hi. I'm trying to build Kotlin on Windows and have a problem. When I run
    gradlew generateTests
    in root directory, the error
    CreateProcess error=206, The filename or extension is too long
    has occurred. Does anyone know a solution? JDK is at
    C:\Program Files\Java\jdk1.8.0_151\bin\java.exe
    Kotlin root folder is at
    F:\Git\kotlin
    s
    • 2
    • 2
  • n

    nish

    04/18/2018, 7:34 PM
    When providing arguments to the K2JVMCompiler
    K2JVMCompiler().compile(out, arguments)
    Is there a way to have it use the bundled Kotlin distribution in my current classpath instead of having to pass external jars using the
    -kotlin-home
    flag? I want to be able to bundle the Kotlin embeddable compiler with everything that it needs to work in a single binary without requiring any external files
    d
    u
    • 3
    • 3
  • k

    karelpeeters

    04/20/2018, 7:55 AM
    Check the channel topic.
    p
    • 2
    • 6
  • p

    pp.amorim

    04/26/2018, 10:12 AM
    Will the Kotlin team remove all Java's typealiases and implement its own? cuz Java 2020...
    g
    i
    • 3
    • 2
  • u

    uli

    04/26/2018, 12:10 PM
    Tail recursion from inside an inline function seems broken to me ...
    var deadline = 10
    
    tailrec fun recursionTest() {
        deadline--
        run {
            println("$deadline")
            return recursionTest()
        }
    }
    
    fun main(args: Array<String>) {
        recursionTest()
    Above code prints an endless row of `9`s. And the byte code decompiles to this Java code:
    public static final void recursionTest() {
          int var0 = deadline;
          deadline += -1;
    
          while(true) {
             String var2 = "" + deadline;
             System.out.println(var2);
          }
       }
    d
    • 2
    • 1
  • w

    wickedev

    04/26/2018, 12:26 PM
    then what is limitation of compiler plugin?
    d
    • 2
    • 2
  • a

    alllex

    04/27/2018, 2:17 PM
    Is there a channel for possible-issue discussion, though?
    a
    • 2
    • 5
  • e

    Egor Trutenko

    05/09/2018, 4:17 AM
    Is it actually a good practice to use Singleton pattern in Kotlin? If yes, will there be more convenient methods of creating Singletons? Because
    private object Holder { val INSTANCE }
    companion object { instance: ClassName by lazy { Holder.INSTANCE } }
    Is kinda irritating to write and read.
    g
    • 2
    • 2
  • a

    Andrey

    05/14/2018, 6:32 AM
    Hi! I created my first PR for Kotlin compiler and added necessary test. What's the next step (run on CI/waiting for review/etc)?
    s
    • 2
    • 1
  • d

    dimiii

    05/14/2018, 2:11 PM
    I see why it is invariant. Sorry, stupid question.
    a
    • 2
    • 1
  • j

    jameswald

    05/19/2018, 5:34 PM
    Before I dig into https://youtrack.jetbrains.com/issue/KT-17699, I’m curious if anyone has initial thoughts on how this should be addressed (if at all)?
    s
    • 2
    • 2
  • z

    Zac Sweers

    05/27/2018, 11:22 PM
    no channel history here, so hope I'm not repeating a question from before. I'm trying to get the project loaded into IntelliJ, but indexing seems to have given up on entire packages. Anyone have any advice?
    d
    • 2
    • 1
  • d

    dave

    06/05/2018, 3:28 AM
    Hello 👋 . I just wanted to check up on https://youtrack.jetbrains.com/issue/KT-7922. I’m currently generating some Kotlin code and have run into a minor issue because I can’t add a
    Boolean.Companion.fromJson
    like I can with
    Int.Companion.fromJson
    and
    String.Companion.fromJson
    (long story). I’m happy to send a PR to implement this very difficult change 😉, but I’m guessing it will need proper consideration first as it is affecting something fundamental like
    Boolean
    .
    g
    l
    • 3
    • 3
  • j

    jdemeulenaere

    06/10/2018, 5:44 PM
    Heys guys! I'd like to start playing with/contributing to the Kotlin compiler. Do you know any good resources/doc about the compiler architecture to get started ? Thanks a lot 🙂
    d
    • 2
    • 2
  • y

    yawkat

    06/17/2018, 10:44 AM
    I want to fix a compiler bug: https://javap.yawk.at/#iSFdOU/procyon - it looks fairly simple to do, is there anything I need to do before submitting a PR?
    i
    • 2
    • 1
  • j

    Jonathan Walsh

    06/21/2018, 4:55 PM
    are the contribution guidelines basically the same for https://github.com/Kotlin/kotlinx.serialization as the rest of the kotlin repos?
    s
    • 2
    • 1
  • n

    navi

    06/27/2018, 1:08 AM
    Hey guys, I recently started coding on Hackerrank using Kotlin and I switched from Java because it saved me from lot of boilerplate code. But there are few instances which is still same as Java and kind of killed my Kotlin experience. - HashMap still doesn’t has update method Hence, i want to work on developing update method for MutableMap<K,V>. Is there anything that I should follow or know before submitting pull request?
    s
    g
    • 3
    • 7
  • k

    karelpeeters

    06/29/2018, 12:42 PM
    Where is the reference equality
    ===
    in the grammer? http://kotlinlang.org/docs/reference/grammar.html
    ctrl + F
    doesn't find anything.
    a
    • 2
    • 4
  • i

    ice1000

    07/01/2018, 3:27 AM
    ~/git-repos/kotlin λ> ./gradlew --no-daemon -m
    To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: <https://docs.gradle.org/4.7/userguide/gradle_daemon.html>.
    Daemon will be stopped at the end of the build stopping after processing
    > Task :buildSrc:prepare-deps:android-dx:untarDxSources FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Could not resolve all files for configuration ':buildSrc:prepare-deps:android-dx:dxSourcesTar'.
    > Could not resolve google:dx:0.
      Required by:
          project :buildSrc:prepare-deps:android-dx
       > Could not resolve google:dx:0.
          > Could not get resource '<https://dl-ssl.google.com/android/repository/dx_0.tar.gz>'.
             > Could not HEAD '<https://dl-ssl.google.com/android/repository/dx_0.tar.gz>'.
                > Connect to <http://dl-ssl.google.com:443|dl-ssl.google.com:443> [<http://dl-ssl.google.com/74.125.204.93|dl-ssl.google.com/74.125.204.93>, <http://dl-ssl.google.com/74.125.204.91|dl-ssl.google.com/74.125.204.91>, <http://dl-ssl.google.com/74.125.204.136|dl-ssl.google.com/74.125.204.136>, <http://dl-ssl.google.com/74.125.204.190|dl-ssl.google.com/74.125.204.190>, <http://dl-ssl.google.com/2404:6800:4008:c07:0:0:0:be]|dl-ssl.google.com/2404:6800:4008:c07:0:0:0:be]> failed: 网络不可达 (connect failed)
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  • i

    ice1000

    07/01/2018, 3:31 AM
    I think it's impossible to download something when the url is 404
    v
    • 2
    • 1
  • j

    jdemeulenaere

    07/01/2018, 9:51 PM
    Hey guys! I am playing a little bit with the kotlin compiler, and I was wondering how we can access the compiler logs when compiling a project in a freshly build IDEA instance ? I am launching AS Studio using ./gradlew runIde and I'd like to access the logs of the compiler when building my Android project. Also, are there any useful docs about those kind of things to get started on working on kotlinc ?
    g
    • 2
    • 1
  • c

    cart

    07/03/2018, 10:00 PM
    gradle build
    runs a ton of things, I really just want to build the Kotlin standard library and the compiler. Is this possible?
    s
    • 2
    • 2
  • r

    raulraja

    07/04/2018, 3:01 PM
    @simon.vergauwen and I have started a POC for KEEP-87 https://github.com/Kotlin/KEEP/pull/87 and I’m trying to find my way around the compiler code base. Are there any docs as to how things are architected, organized etc? I have been digging through source files for a couple of days now not making much progress. Any recommendation as to where to look for: - New modifier
    extension
    in grammar. (grammar/src/modifiers.grm) What are other relevant places that need to change for the grammar to be valid Kotlin syntax? - Function/Class/Interface args scope resolution. Interested as to where it is decided which extension functions apply and what the
    this
    and parent scopes refer to. - Call scope resolution tests: What is an effective way to test my changes to resolution are correct or similar tests I can use as base for the type class definition and resolution tests? In general I’m also interested if anyone has stories to tell as to how they go about adding a similar feature to the compiler, what is the flow usually looks like when working in this project. Ultimately if anyone wants to help please contact me, thanks!
    m
    d
    t
    • 4
    • 9
  • j

    jdemeulenaere

    07/04/2018, 6:55 PM
    Hey guys! Quick question about working on the JetBrains/kotlin repo. I ran a child Android Studio with "bunch switch . as32 && ./gradlew runIde", but I feel that my android project is not using the kotlin compiler that I just compiled.. How can I check if it is using it or not ? Thanks a lot 🙂
    d
    • 2
    • 6
  • c

    cart

    07/05/2018, 10:46 PM
    Also curious why when I run
    ./gradlew -q compiler:dependencies
    I get
    implementation - Implementation only dependencies for source set 'main'. (n)
    No dependencies
    and lots of stuff under
    testCompile
    shouldn't there be dependencies for building the project not just testing?
    i
    • 2
    • 1
  • c

    cart

    07/09/2018, 6:14 PM
    Can anyone explain what this message means?
    WARNING! Removed exclusions from kotlin-stdlib dependency of kotlin-android-extensions-runtime artifact's maven metadata, check kotlin-stdlib dependency of :kotlin-android-extensions-runtime project
    v
    • 2
    • 2
  • r

    redrield

    07/20/2018, 3:06 PM
    Is there a way I can debug kotlinc in intellij?
    d
    • 2
    • 1
  • r

    redrield

    07/21/2018, 10:48 PM
    How can i bootstrap compilation of the stdlib to use kotlinc out of dist/ to get this to work?
    d
    • 2
    • 2
Powered by Linen
Title
r

redrield

07/21/2018, 10:48 PM
How can i bootstrap compilation of the stdlib to use kotlinc out of dist/ to get this to work?
d

dsavvinov

07/22/2018, 10:34 AM
1. First, you need to assemble snapshot compiler and publish it in local maven repository:
./gradlew dist install publish
2. Then, you can just call
./gradlew dist -Pbootstrap.local
r

redrield

07/22/2018, 4:58 PM
Ah, thank you!
View count: 4