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
  • d

    devbridie

    03/23/2019, 4:37 PM
    quick questions: 1. How can I find out whether the context in which my
    AbstractKotlinInspection
    is taking place has
    java.util.EnumMap
    (e.g. not js platform)? 2. My replacement pattern is
    java.util.EnumMap
    , but I think it would be more idiomatic to add an import and use
    EnumMap
    directly. I couldn't find any examples of this, which classes should I be looking at? 3. I have a
    KotlinType
    of which I want to create a fragment
    E::class.java
    , but using toString looks nasty here, what would be a better approach?
    call.replace(factory.createExpressionByPattern("java.util.EnumMap($0::class.java)", enumClass.toString()))
    Thanks!
    d
    • 2
    • 1
  • g

    gcx11

    03/30/2019, 10:39 PM
    Hello, I am trying to build custom version of kotlin-test-js, so I have added
    JDK_16="C:\\Program Files\\Java\\jdk1.8.0_181"
    JDK_17="C:\\Program Files\\Java\\jdk1.8.0_181"
    JDK_9="C:\\Program Files\\Java\\jdk-11.0.2"
    to gradle.properties, but when I run
    gradlew install
    I get error
    Invalid environment value JDK_16: "C:\Program Files\Java\jdk1.8.0_181", expecting JDK home path
    What I am doing wrong?
    i
    • 2
    • 2
  • s

    Smallville7123

    04/04/2019, 9:19 AM
    How do I extend the kotlin language in Android Studio
    r
    g
    • 3
    • 9
  • r

    raulraja

    04/17/2019, 9:50 AM
    https://kotlinlang.slack.com/archives/C0B9K7EP2/p1555493024015100
    😍 1
    i
    p
    • 3
    • 4
  • r

    Rohan Maity

    04/19/2019, 5:49 PM
    Could Anyone tell me how to build `kotlin`project ? I am talking about the kotlin language itself. On opening project in IntelliJ idea. I get options
    Configure Modules with Java(Gradle)
    ,
    Configure modules with JS(Gradle)
    and two same options with
    Maven
    . From here on I am getting confused
    d
    • 2
    • 17
  • a

    akshay_b

    05/01/2019, 4:13 PM
    Hi, I am not able to find source code for
    org.jetbrains.kotlin.jvm
    gradle plugin. Could anyone help me ?
    i
    • 2
    • 2
  • m

    mruno

    05/06/2019, 3:29 PM
    Can anyone direct me to some code/samples/documentation around
    AnnotationDescriptor
    ? I'm really having trouble wrapping my mind around it for some reason
    • 1
    • 1
  • r

    Rohan Maity

    05/18/2019, 12:42 PM
    Hello! I am facing issue in building kotlin language. I have installed JDK_16, JDK_17, JDK_18, JDK_9. Also this is how I setup environment variables on machine (linux) in
    ~/.bashrc
    # Java
    export JAVA_HOME="/usr/java/jdk1.8.0_202"
    export JDK_16="/usr/java/jdk1.6.0_07"
    export JDK_17="/usr/java/jdk1.7.0_80"
    export JDK_18="/usr/java/jdk1.8.0_202"
    export JDK_9="/usr/java/jdk-9.0.4"
    I added these JDKs path to Inteliij Idea's environment variable setting (Settings->Terminal->Enviroment Variable). But when I build project I face this error as in image below. I was Building whole project Update Issue is solved - Previously I checked
    auto imports
    during import of projects - I directly imported project instead of opening project -> import module from existing sources Couldn't find exactly what went wrong previously though 😶
    s
    • 2
    • 1
  • b

    Burkhard

    06/05/2019, 11:15 AM
    I was wondering if it would help if I create a KEEP for that. It seems like this issue hasn’t been touched by a JetBrains member for the last 2 years.
    g
    • 2
    • 1
  • f

    Fudge

    06/06/2019, 9:31 AM
    I'm having trouble generating a test in the kotlin compiler project. I created a new file
    compiler/testData/custom/testDataTest.kt
    and ran
    Generate Compiler Tests
    , but I don't see any new files generated? (I looked in the git diff)
    d
    • 2
    • 5
  • t

    thara

    06/06/2019, 2:09 PM
    Why kotlin doesn’t have
    Iterable<Tuple>#unzip
    ? I found an issue about `Iterable<Pair>#unzip`; https://youtrack.jetbrains.com/issue/KT-5793 I wonder it doesn’t say about
    Iterable<Tuple>
    .
    i
    • 2
    • 5
  • k

    kartikpatodi

    06/11/2019, 4:43 AM
    Where is the code for translating the raw strings
    """
    k
    • 2
    • 1
  • g

    ghedeon

    06/19/2019, 5:08 PM
    ./gradlew ideaPluginTest
    gives me ~12 failures on kotlin master. Is it known, do I miss something in my configuration?
    d
    • 2
    • 1
  • p

    ptmt

    07/08/2019, 5:59 PM
    _kotlin_compiler_compileJava.txt
    • 1
    • 2
  • s

    Sam

    08/01/2019, 4:20 PM
    Hi! I am having trouble getting my project to compile using the Kotlin compiler I have built from source. I have created a kotlin starter project with
    gradle init --type kotlin-application
    and I have added these lines (found [here](https://github.com/JetBrains/kotlin/#including-into-composite-build)) to my `settings.gradle`:
    includeBuild('/path/to/kotlin') {
        dependencySubstitution {
            substitute module('org.jetbrains.kotlin:kotlin-compiler') with project(':include:kotlin-compiler')
        }
    }
    When I do a
    ./gradlew build --info
    in my starter project, I can see that the there are
    :kotlin:*
    tasks running (though they re-run only after I do a
    ./gradlew dist
    in the kotlin compiler repo) but the changes I've made to the Kotlin compiler (I've added some print/logging statements) are not showing up when compiling the code in my project. Any suggestions on how I can get my project to compile with a built-from-source Kotlin compiler using Gradle?
    i
    i
    • 3
    • 4
  • y

    Yanis Batura

    08/18/2019, 8:10 AM
    https://github.com/Inego/kotlin/blob/master/docs/contributing.md#submitting-patches The contributing readme does not specify which branch should be used to submit patches to. Is it
    master
    ?
    g
    • 2
    • 2
  • y

    Yuku Kotani

    08/22/2019, 3:08 PM
    I’m reading kotlin compiler code and found that there are two kinds of intermediate representation, IR and PSI. What is difference between those?
    i
    • 2
    • 2
  • m

    morozov

    09/26/2019, 8:00 AM
    Can somebody help with this issue? https://github.com/mnewlive/make-it/issues/9
    k
    • 2
    • 5
  • e

    efemoney

    10/11/2019, 5:13 PM
    Hey everyone, I just pulled github.com/JetBrains/kotlin into IntelliJ 2019.2.3 and I keep getting a script dependencies error opening the root
    build.gradle.kts
    . Did anyone face similar?
    • 1
    • 1
  • e

    efemoney

    10/14/2019, 8:10 AM
    Not sure what’s wrong but I’m getting tons of unresolved references in newly forked kotlin project. Plus build scripts are failing to resolve dependencies. Forked and cloned kotlin project in IJ 2019.2.3. I’ve set up all the JDKs to point to java 8 and 9 (like recommended, not working on stdlib) and building
    ./gradlew dist
    from command line works. I also did the “New module from existing sources” bit on first run.
    i
    • 2
    • 2
  • j

    jossiwolf

    10/22/2019, 6:49 PM
    Are there any good resources on setting up for working on the Kotlin Compiler?
    t
    r
    • 3
    • 11
  • t

    tarek

    10/28/2019, 11:42 AM
    Hi I’m trying to fix an issue in
    :js:js.translator
    that affects
    :kotlin-test:kotlin-test-js:kotlin-test-js-it
    I made changes to files in
    :js:js.translator
    and then rebuild it (
    ./gradlew :js:js.translator:build
    ) But it does not seem to affect behavior of
    :kotlin-test:kotlin-test-js:kotlin-test-js-it
    I’m sure there’s a missing step to ensure that module uses the newly (locally) built kotlin version, like
    publishLocally
    or something I tried
    ./gradlew install
    in the root dir and then
    mvn install
    in the libraries dir but it still does not seem to work Any ideas? 🙏
    i
    • 2
    • 5
  • b

    Brais Gabin

    10/28/2019, 7:46 PM
    Hello! Is it normal to have a lot of failing test at
    master
    ? I’m running
    ./gradlew ideaPluginTest
    . I set
    JDK_16
    and
    JDK_17
    to the same JDK as
    JDK_18
    as it’s pointed out in the README.
    s
    • 2
    • 2
  • t

    Tillmann Berg

    11/26/2019, 10:19 PM
    I just started having a look at the Kotlin repo by adding a sample to the standard library. While doing that I noticed that some of the generated samples on the website don't run, for example https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/with-index.html . The reason is that the
    import samples.Sample
    leaks through to the webpage and there the import cannot be found. I guess, changing the import statement to
    samples.*
    would fix this, but it would be cleaner to correct the generation of the html. Could someone point me to where this HTML is generated?
    i
    • 2
    • 5
  • a

    AJ Alt

    01/15/2020, 11:26 PM
    Does anyone know why the
    ConvertTrimIndentToTrimMarginIntention
    was removed? @dimonchik0036 mentions KT-31502 in the commit that removed it, but I don't have permission to view that issue.
    • 1
    • 1
  • a

    adam-mcneilly

    02/17/2020, 2:24 AM
    For this running ticket for standard lib samples: https://youtrack.jetbrains.com/issue/KT-20357 Is there any way to locally validate, beyond running the tests? Is there any way I can generate a local version of the website from my code to see how the documentation would look?
    i
    • 2
    • 3
  • s

    Sinan Kozak

    03/25/2020, 3:33 PM
    Hello, when I run tests locally with
    ideaPluginTest
    nj2k and idea-plugin, some of test are failing. Even though, I didn’t touch them. Would it be about a setup/environment problem? List of test are in thread…
    d
    • 2
    • 22
  • t

    turansky

    03/26/2020, 12:33 PM
    @bashor @anton.bannykh Is there possibility to run tests only for 
    js
     or 
    js/js.translator
     subprojects?
    b
    b
    • 3
    • 6
  • s

    Sinan Kozak

    03/26/2020, 12:38 PM
    Does a CI job run for PR? Is it possible to check test result for a PR? Or do you just trust that kontributors already run test and build tasks?
    d
    • 2
    • 3
  • t

    turansky

    03/28/2020, 2:10 PM
    Which version of IDEA Kotlin plugin must be declared in
    Plugins
    when I run
    ./gradlew runIde
    in Kotlin
    master
    ? Something like
    1.4-SNAPSHOT
    ?
    i
    • 2
    • 2
Powered by Linen
Title
t

turansky

03/28/2020, 2:10 PM
Which version of IDEA Kotlin plugin must be declared in
Plugins
when I run
./gradlew runIde
in Kotlin
master
? Something like
1.4-SNAPSHOT
?
i

ilya.gorbunov

03/28/2020, 7:19 PM
Localy built plugin has
@snapshot@
version there.
👍 1
t

turansky

03/28/2020, 7:36 PM
JDK 8 instead of JDK 11 resolve the problem
View count: 1