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

    Tomasz Krakowiak

    03/31/2021, 9:49 AM
    Hello, may I add Pair.swap(), Pair.sort(), Triple.sort() to stdlib? ^^
    e
    z
    • 3
    • 13
  • h

    Hyugga

    04/08/2021, 4:03 AM
    Required environment variables are missing: JDK_16, JDK_17, JDK_18, JDK_9. May I have links to the reference versions of JDKs you all are downloading to build against?
    d
    • 2
    • 2
  • a

    apatrida

    05/07/2021, 7:34 PM
    I'm thinking about solutions to the propagation of
    OrNull
    and here is an idea to start a discussion: https://github.com/apatrida/KEEP/blob/master/proposals/OrNull-syntactical-sugar.md
    r
    e
    +2
    • 5
    • 28
  • f

    Franz Ka

    05/12/2021, 5:47 PM
    Hello all ! I'm new on this Slack. I'd like to contribute to kotlin project on GitHub but I don't know how to ... Can someone help me please?
    a
    • 2
    • 3
  • i

    Iaroslav Postovalov

    05/28/2021, 12:15 PM
    https://youtrack.jetbrains.com/issue/KT-46941
    t
    • 2
    • 3
  • d

    diesieben07

    06/03/2021, 6:02 PM
    I am trying to work on a pull request that will improve TS declaration generation. I'm struggling however with the tests. The tests for the TS generation seem to be in
    js/js.translator/testData/typescript-export
    . The readme there tells me I first need to run the box tests via JUnit. I don't know how to do this. I ran
    test
    task from
    js:js.tests
    however it takes forever (I gave up and stopped it after like 1200 very slow tests.... can I filter these somehow?). I ran
    quickText
    , which seems to be much faster (it's still running, at 4000 tests now...), however it has failed tests (again how can I just run the tests that I want to?). Additionally, I have no idea how I would go about making my own set of tests in the
    typescript-export
    set? Do I just copy one of the existing folders and go from there? Thanks for any insight! 🙈
    w
    • 2
    • 2
  • d

    Dave

    06/09/2021, 6:38 AM
    I have raised a youtrack ticket [https://youtrack.jetbrains.com/issue/KT-47200] regarding JsExport and an alternative mechanism to export. I would be grateful to anyone who can help.
    d
    • 2
    • 2
  • m

    mcpiroman

    06/11/2021, 2:26 PM
    Sounds like I've missed that, but: 1. How do I build the Kotlin locally and use it in another project, especially given that gradle discouragers from using mavenLocal? I could use a cli kotlinc, but I aim for full gradle plugin, to write something like
    plugins { kolin("js") version "1.5.30.1234-local" }
    , if that's even possible, this is. 2. Can I use the latest dev/nightly builds like build-1.5.30-dev-2088 which I see are frequent on github release page? Kotlin itself uses those to bootstrap itself and I have tried adding some of the gradle dependency links from the repo, but with no luck.
    r
    • 2
    • 2
  • m

    mcpiroman

    06/17/2021, 2:28 PM
    Working with the Kotlin repo itself in the intellij. Importing gradle fails with 
    Unexpected state for resolution: Unknown
     error for every gradle project. The resulting error message is 
    Could not resolve all dependencies for configuration ':allopen-ide-plugin:compileClasspath'
     but I guess that's because it's the first project. When I do 
    Refresh gradle dependencies
     on the root (
    kotlin
    ) project, the gradle model builds, but is not imported. But when I then 
    Reload Gradle Project
     the circle repeats, see line 2. The thing is, when I execute 
    gradlew assemble
     in the shell, for example, everything builds fine. Hence I do not post this at #gradle I've been instructed to ask here but I apologize if this is not the correct place.
    ➕ 1
    d
    • 2
    • 1
  • i

    Iaroslav Postovalov

    06/18/2021, 6:43 PM
    @mglukhikh Hello! I'm working on KT-18435, and I've started implementing it as an IR lowering phase for == calls. My problem is that
    IrClass
    doesn't have
    sealedSubclasses
    . I see only two options to solve this problem: 1. Publish
    IrBuiltIns.toIrSymbol
    function to use
    ClassDescriptor.getSealedSubclasses
    (and it seems to be a bad way). 2. Add such property and support it in
    fir2ir
    and
    psi2ir
    . I need some opinions from the compiler team to get if I can add this property or this problem can be solved in another way.
    d
    i
    +2
    • 5
    • 21
  • j

    Justin

    07/10/2021, 8:56 PM
    hi kontributors! I'm new and want to help out but I'm running into a few issues after cloning the repo. Fedora 34 Intellij IDEA - 2021.1.3 (Kotlin 211 1.5.20) Gradle 7.1.1 JDK 1.8 (also have 11 available) wondering if i need to downgrade the IDE version and also how i can find Java 6 for this (if it's still needed?)
    d
    • 2
    • 2
  • s

    Slackbot

    07/16/2021, 1:11 PM
    This message was deleted.
    d
    s
    • 3
    • 2
  • r

    rnett

    07/31/2021, 5:18 AM
    Can I get someone to look at https://github.com/JetBrains/kotlin/pull/4449 (for KT-42183)? It's been stale for ~1.5 months now.
    ➕ 1
    u
    • 2
    • 3
  • p

    Piotr Krzemiński

    08/09/2021, 10:09 AM
    hi folks! I'm working on Kotlin/Python backend (#python, #python-contributors) and adjusting lazy properties init and I have a question about writing lowerings. I'm struggling with the internal compiler API. For each IrFile, a variable 
    properties_initialized_someFileName_kt
     is checked inside the init functions (we base our Python backend on the JS one, so this also happens in JS/IR backend). The problem in Python is that variables need to be initialized before they are read, so for each IrFile I need to produce a top-level assignment 
    properties_initialized_someFileName_kt = False
    . Something along these lines (forgive the imprecise arguments, the returned type is the real problem):
    JsIrBuilder.buildSetField(
        symbol = ...Name.identifier("properties initialized $fileName")...,
        receiver = null,
        value = JsIrBuilder.buildBoolean(context.irBuiltIns.booleanType, false)
    )
    I tried adapting existing lowerings to emit such IR entity, but I don't know how to put 
    IrSetFieldImpl
     in the IR output because lowerings produce a list of 
    IrDeclaration
     and the types just don't match. I sort of understand lowerings that transform some existing IR node to something else, but here I need to produce something new (not map from A to B). It would be cool if you could guide me how to write such lowering, and maybe also refer me to some docs about internal compiler API.
    ✅ 1
    b
    • 2
    • 6
  • s

    scaventz

    08/16/2021, 3:12 PM
    How to use the compiler I got by running
    gradle dist
    to compile the repo itself ? Made some changes to compiler, worrying that the test case may not be comprehensive enough.
    s
    i
    • 3
    • 5
  • p

    Piotr Krzemiński

    08/20/2021, 5:43 AM
    every time I open the Kotlin project in IntelliJ, "updating indexes" looks like it's done again. It takes 10-15 minutes and during that time, I get no code suggestions, which is a bit counter-productive. Anyone faced the same problem?
    ➕ 2
    z
    • 2
    • 2
  • m

    mcpiroman

    08/26/2021, 2:47 PM
    I've modified code related to backend IR. What tests (gradle tasks) should I run?
    d
    • 2
    • 6
  • a

    Alexey Subach

    08/28/2021, 6:54 PM
    Hi Team, I was wondering if https://youtrack.jetbrains.com/issue/KT-48414 is an example of a feature that should be discussed through KEEP first, or is it rather considered as something small that could be discussed/iterated on within PR scope once there is some code? Thanks
    d
    i
    • 3
    • 3
  • m

    mcpiroman

    09/02/2021, 8:40 AM
    Working on backend compiler - I want to compile a project, but not have to wait for the frontend each time. Can I dump a tree after frontend or after psi2ir and on each run load it from disk and continue from there?
    d
    b
    • 3
    • 8
  • r

    rahulc29

    09/11/2021, 8:39 AM
    Hi Team, I'm new to the open source ecosystem and I wish to contribute to the project. I just needed a clarification, do I simply find issues on GitHub/YouTrack and send a PR? Or is there some intermediate step as well? Any input would be appreciated. Thanks.
    i
    • 2
    • 2
  • r

    rahulc29

    09/12/2021, 6:38 AM
    Hey team the kotlin.Result class seems to have no class description documentation attached (the methods are documented). I checked the source code and it looks like it encapsulates the idea of getting a value or getting some exception (like IOException while getting data from a database). Would it be a good idea to file an issue and add say, for example, example code snippets and a description on how to use it? Or is that unnecessary?
    i
    • 2
    • 1
  • i

    Ian Lynagh

    10/06/2021, 10:31 AM
    Hi folks! Does anyone know whether I should expect all the tests to pass on master please? I'm seeing e.g. 70 failures in
    compiler/fir/analysis-tests/build/reports/tests/test/index.html
    , but given all the red on https://teamcity.jetbrains.com/project.html?tab=projectOverview&projectId=Kotlin I'd just like to check whether this is normal before I try to work out what's going wrong.
    d
    • 2
    • 1
  • i

    Ian Lynagh

    10/07/2021, 1:47 PM
    How can I run
    compilerTest
    with a particular number of threads? Passing
    -Porg.gradle.parallel=false
    ,
    -Dkotlin.test.maxParallelForks=1
    and
    -Porg.gradle.workers.max=1
    doesn't seem to be having any effect
    d
    • 2
    • 4
  • l

    Luffy D. Monkey

    10/07/2021, 6:23 PM
    Hi, I am trying to build kotlin repo, but getting
    No compatible toolchains found for request filter: {languageVersion=6, vendor=any, implementation=vendor-specific} (auto-detect true, auto-download true)
    error, how do I resolve this error? I am on macOS and have insatlled java6 using brew as mentioned in the README.
    d
    i
    • 3
    • 4
  • m

    Mike Rylander

    10/07/2021, 11:41 PM
    setting up JDK 6 was possibly the hardest aspect of getting a build running whenI did it a month ago.
    l
    d
    • 3
    • 4
  • s

    solonovamax

    10/25/2021, 3:43 PM
    I posted this in #getting-started, but was told to move it here: I'm trying to package
    kotlin-native
    in the AUR and am having trouble building it. Currently, it's giving me a bunch of errors when I try to run
    gradle :bundle
    , with the message
    e: warnings found and -Werror specified
    . I've tried the following: 1. Compiling from the root directory, with
    gradle :kotlin-native:bundle
    2. Compiling from the
    kotlin-native
    directory with
    gradle :bundle
    3. Adding
    kotlin.build.disable.werror=true
    to the
    gradle.properties
    in both the root and
    kotlin-native
    directories, and performing 1 and 2 again. 4. Modifying the property
    KotlinBuildProperties.disableWerror
    in
    buildSrc/src/main/kotlin/BuildPropertiesExt.kt
    to make it always return
    true
    , then performing 1 and 2 again. 5. Commenting out
    allWarningsAsErrors = true
    in the
    build.gradle.kts
    (line 529) and performing 1 and 2 again. 6. Passing
    -Pkotlin.build.disable.werror=true
    to gradle, and performing 1 and 2 again. At this point, I'm stumped on what I need to do to build it properly.
    i
    • 2
    • 3
  • p

    Piotr Krzemiński

    12/02/2021, 12:38 PM
    hi, we recently synced our fork with JetBrains/kotlin's master, and we randomly get such failures (see the Build step) when building the repo - details in the thead. Are you aware of any issue that still persists on main repo's master or has been already fixed? not sure if it's worth syncing with main repo now, or wait
    d
    • 2
    • 6
  • s

    scaventz

    12/07/2021, 4:16 AM
    If I modify some
    JVM_IR
    lowering code, which changes the jvm bytecode of
    stdlib
    classes, can I just run
    ./gradlew jvmCompilerTest
    to test the change or I should run something like
    ./gradlew coreLibsTest
    to build the
    stdlib
    first?
    d
    i
    • 3
    • 2
  • i

    Icyrockton

    12/18/2021, 2:15 AM
    Hi, after clone kotlin repo. I got sync failed , Could not find org.jetbrains.kotlin:kotlin-build-gradle-plugin:0.0.32. detail in thread
    • 1
    • 2
  • j

    Junjie Wu

    12/20/2021, 2:45 AM
    Hi team, if I want to take one issue (KT-xxxx) to kontribute. Should I get assigned first or just go ahead and raise a pull request then find someone to review it?
    d
    i
    • 3
    • 12
Powered by Linen
Title
j

Junjie Wu

12/20/2021, 2:45 AM
Hi team, if I want to take one issue (KT-xxxx) to kontribute. Should I get assigned first or just go ahead and raise a pull request then find someone to review it?
d

dmitriy.novozhilov

12/20/2021, 7:32 AM
Hi. AFAIR external users can not change
Assignee
field, so you can just comment in issue that you will work on it and then just mention issue number in your PR
j

Junjie Wu

12/20/2021, 7:33 AM
:thank-you:
d

dmitriy.novozhilov

12/20/2021, 7:35 AM
BTW which issue you want to fix?
j

Junjie Wu

12/20/2021, 9:35 AM
@dmitriy.novozhilov I’m trying to fix this one: https://youtrack.jetbrains.com/issue/KT-50372
do you have any concerns?
d

dmitriy.novozhilov

12/20/2021, 9:36 AM
I don't cc @ilya.gorbunov
j

Junjie Wu

12/20/2021, 6:18 PM
Hi @dmitriy.novozhilov @ilya.gorbunov, I’ve put up a PR for the KT-50372, could you please help review it? PR link: https://github.com/JetBrains/kotlin/pull/4686
i

ilya.gorbunov

12/21/2021, 7:52 AM
Hi, thanks for the PR. I can a look at it, but please note that since we have not yet made a decision to include this function in the standard library, do not expect it to be merged soon.
:blob-okay-hand: 1
j

Junjie Wu

12/21/2021, 8:37 AM
Thanks @ilya.gorbunov for the review, just wonder in Kotlin how do we make decision on whether or not to add stdlib functions like this one? Will there be any public discussions we can be involved?
i

ilya.gorbunov

12/21/2021, 8:38 AM
You can greatly influence the positive decision by providing compelling use cases in the corresponding YouTrack issue.
j

Junjie Wu

12/21/2021, 8:39 AM
makes sense :thumbsup_all:
Hi, just want to follow up the issue, I’ve added some context that might be helpful on the decision making, could you please take a look?
View count: 3