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

    shiraji

    07/23/2018, 10:13 AM
    Hey guys, I couldn’t find the JDK9, can I put JDK10's path instead of JDK9's path? (I mean I already did it and it works. I want to send PR to README.md)
    r
    e
    • 3
    • 4
  • j

    james.ayvaz

    07/28/2018, 5:14 PM
    I’m trying to debug a code generator issue, wonderin if it is possible to step through the kapt gradle plugin without recompiling? When I try it with
    -Dorg.gradle.debug=true
    I can’t see the kapt source
    g
    • 2
    • 1
  • a

    adam-mcneilly

    07/29/2018, 9:32 PM
    I'm having trouble building, and I believe I've followed all of the instructions right, but every time I try to run
    coreLibsTest
    I get this:
    > Could not target platform: 'Java SE 10' using tool chain: 'JDK 8 (1.8)'.
    I set all of the environment variables:
    JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin
    JDK_16=/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin
    JDK_17=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin
    JDK_18=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin
    JDK_9=/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin
    Anyone have a hunch at what I might be doing wrong that it's trying to target Java 10?
    i
    • 2
    • 13
  • a

    Andrew Albert

    07/30/2018, 6:51 PM
    I've asked if I can just go on with working on a new feature, why has no one answered? It may be a silly question, but I can't start and then watch my work thrown away!
    g
    • 2
    • 1
  • i

    ilya.gorbunov

    07/30/2018, 6:53 PM
    @Andrew Albert You can look for the issues with
    #{Up For Grabs}
    tag, these usually do not require to be discussed.
    a
    • 2
    • 2
  • a

    adam-mcneilly

    08/01/2018, 5:27 PM
    In general when submitting a PR, is there anyone we should be assigning them too, or does the JB team go through them and do the assigning themselves?
    a
    • 2
    • 2
  • s

    Swapnil Madavi

    08/03/2018, 9:06 AM
    The Slack badge in the ReadMe.md file seems to be broken. How can I fix this? https://github.com/JetBrains/kotlin
    g
    • 2
    • 12
  • j

    jdemeulenaere

    09/07/2018, 10:11 AM
    Hey guys 🙂 I am starting to write an IDEA plugin, which adds an action on some files. I get to a point where I have a string which is the fully qualified name of a Java or Kotlin class (e.g. "android.widget.TextView") and I need some kind of descriptor (e.g. PsiJavaElement/KtElement or similar). All I have access to is the com.intellij.openapi.actionSystem.AnActionEvent event (hence the Project and everything available in the event) and I suppose the class is in the classpath of the project. Can anyone give me some pointers on how to achieve that ? Thanks a lot !
    • 1
    • 1
  • t

    tieskedh

    09/07/2018, 1:45 PM
    question about kontributing to tests of STD-lib: I saw the file jvm-minimal-for-tests. I have two questions about it: - Does it do what i want: setup for kontributing to standard tests? - If it does, the built crashes on my machine telling "pill-configurable" not found, can this be fixed?
    i
    • 2
    • 4
  • a

    alexcouch

    09/11/2018, 12:08 AM
    I'm trying to clone the kotlin project to contribute but I'm not quite sure if I'm doing that part right. Tried to read the README for hints but there was really nothing on cloning. Cloning it takes forever in intellij git, and when I download the project as a zip and I try to open it, it crashed my file explorer. What reason would there be for that? Am I missing something? I know the project is huge but what exactly am I supposed to do? I've cloned it before but it's like I can't for some reason my computer just doesn't like it.
    b
    • 2
    • 3
  • c

    christophsturm

    09/11/2018, 10:14 PM
    do i really need jdk9 installed to build kotlin? or can i point jdk9 to a jdk10?
    s
    • 2
    • 1
  • j

    jdemeulenaere

    09/17/2018, 2:01 PM
    Is it possible to get a LexicalScope for Java class descriptors ? Or is this concept only tied to Kotlin classes ? I'd like to get the descriptor of an extension method of a Java class but I don't know how to achieve that..
    d
    • 2
    • 4
  • t

    Timo Obereder

    10/11/2018, 10:58 AM
    Hi everyone, trying myself on my first PR on Kotlin…i’m having trouble testing my code where the idea triggers some errors running a generated test class (IntentionTestGenerated) .….as it seems i guess i shouldn’t fiddle around in the module settings…anyone ran into a similar problem?
    /Users/timoobereder/Documents/Projects/kotlin/libraries/stdlib/src/kotlin/collections/Arrays.kt
    Error:(66, 72) Kotlin: [kotlin-stdlib_main] Type parameter cannot have any other bounds if it's bounded by another type parameter
    Error:(74, 12) Kotlin: [kotlin-stdlib_main] Declaration annotated with '@OptionalExpectation' can only be used in common module sources
    Error:(115, 12) Kotlin: [kotlin-stdlib_main] Declaration annotated with '@OptionalExpectation' can only be used in common module sources
    /Users/timoobereder/Documents/Projects/kotlin/libraries/stdlib/src/kotlin/collections/Collections.kt
    Error:(206, 72) Kotlin: [kotlin-stdlib_main] Type parameter cannot have any other bounds if it's bounded by another type parameter
    /Users/timoobereder/Documents/Projects/kotlin/libraries/stdlib/src/kotlin/collections/Maps.kt
    Error:(175, 72) Kotlin: [kotlin-stdlib_main] Type parameter cannot have any other bounds if it's bounded by another type parameter
    /Users/timoobereder/Documents/Projects/kotlin/libraries/stdlib/src/kotlin/text/Strings.kt
    Error:(283, 72) Kotlin: [kotlin-stdlib_main] Type parameter cannot have any other bounds if it's bounded by another type parameter
    Error:(294, 72) Kotlin: [kotlin-stdlib_main] Type parameter cannot have any other bounds if it's bounded by another type parameter
    i’m on mac osx
    m
    • 2
    • 9
  • u

    Uzi Landsmann

    10/28/2018, 6:03 AM
    Hello! I tried convincing my team to start using some Kotlin in our Java projects. We decided on using Kotlin data classes but ran directly into a problem: our classes contain many fields, and in order to instantiate them (from Java) we had to use monstrous constructors, wheres before that we used Lombok builders. I investigated some time on trying to find a way to create builders for data classes but couldn't find any. So now I wonder: wouldn't it be great if data classes contained builders by default? That would certainly increase interoperability with Java. Oh and I'm posting it here because I thought maybe I'd try to implement it myself.
    s
    g
    • 3
    • 8
  • z

    Zappo

    10/29/2018, 7:08 PM
    Another thing to add: it seems like variations of
    measureTimeMillisWithResult
    already exist in the codebase (
    core/util.runtime/src/org/jetbrains/kotlin/utils/addToStdlib.kt
    and
    plugins/kapt3/kapt3-base/src/org/jetbrains/kotlin/kapt3/base/util/misc.kt
    ) which could be replaced by the fixed version proposed.
    d
    • 2
    • 4
  • s

    Slackbot

    11/03/2018, 4:52 PM
    This message was deleted.
    d
    i
    a
    • 4
    • 4
  • t

    Timo Obereder

    11/06/2018, 2:34 AM
    Is there an easy way to find out block statements of the same type in a kt file? so far i only played around with the
    KtExpression
    method
    nextStatement()
    , using it more than once on one expression (especially when referenced) can result in null and behaviour i don’t want. e.g.: i want to iterate through a bunch of reoccurring types and save them in a list.
    y
    • 2
    • 7
  • o

    onurozcelik

    11/09/2018, 9:08 PM
    Hi guys. I am learning Kotlin and at the same time blogging about it (currently only Turkish). I would like to contribute to the project. I think I can start with the documentation. How can I start?
    🇹🇷 1
    b
    • 2
    • 2
  • a

    alllex

    11/10/2018, 10:52 AM
    Hi everyone! I found that in Kotlin there is no inspection for empty parentheses in annotation usages. I checked that there was no issue related to that specific thing in the YouTrack and created a new one [1]. Would it be a good place for me to make a first contribution? If so I would gladly grab this issue. [1] https://youtrack.jetbrains.com/issue/KT-28118
    • 1
    • 1
  • d

    Davio

    11/27/2018, 8:17 AM
    Recently stumbled upon this issue: https://youtrack.jetbrains.com/issue/KT-11253 Seems pretty straightforward to implement, plus there is a precedent I'd like to work on this, even though it's not "up-for-grabs", what do I do here?
    • 1
    • 2
  • d

    Davio

    11/29/2018, 8:06 AM
    Is there a general Youtrack issue for fixing minor technical debt issues? How is this done?
    a
    • 2
    • 1
  • c

    cleishm

    01/08/2019, 4:21 PM
    Anyone? I’m happy to have the response be “nope, don’t want it” - although a dialogue on why/why not would be great, so I and others can understand how to better kontribute!
    o
    m
    c
    • 4
    • 10
  • h

    Harry Billinis

    01/24/2019, 1:25 PM
    Hi, I am an undergrad computer science student looking to contribute to the language. I would like to do some bug fixes that have been reported at YouTrack Kotlin. Are there any members willing to help me get started? Thanks a lot!
    d
    • 2
    • 2
  • t

    Timo Obereder

    01/28/2019, 5:08 PM
    Hi, i have a question regarding the
    plugin-common.xml
    files. Is it a responsibility of a contributor to fix those by either merge or rebase master onto the feature branch or should we just ignore those files until the feature is as its supposed to be and the reviewers will fix those before merging into master?
    d
    • 2
    • 11
  • t

    Timo Obereder

    01/28/2019, 5:26 PM
    Also regarding the
    IntentionBasedInspection
    class. Some Inspections, that are contained in the intentions folder, use this class, but at the same time it’s deprecated.
    "Please do not use for new inspections. Use AbstractKotlinInspection as base class for them"
    …so i did use the
    AbstractKotlinInspection
    class and wondering if that is the right way… https://github.com/JetBrains/kotlin/pull/2082
    d
    • 2
    • 2
  • j

    jw

    02/07/2019, 4:33 PM
    i have JDK 6-12 installed with 11 being my default. When trying to build, I set
    JAVA_HOME
    to 8 yet multiple parts of the build seem to be selecting 12 (the latest) no matter what I do
    > Configure project :kotlin-reflect
    Cannot find file by paths: [jre/lib/rt.jar, ../Classes/classes.jar] in /Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home
    
    > Task :kotlin-annotations-jvm:compileJava FAILED
    warning: [options] bootstrap class path not set in conjunction with -source 6
    error: Source option 6 is no longer supported. Use 7 or later.
    error: Target option 6 is no longer supported. Use 7 or later.
    
    > Task :kotlin-runtime:compileJava FAILED
    warning: [options] bootstrap class path not set in conjunction with -source 6
    error: Source option 6 is no longer supported. Use 7 or later.
    error: Target option 6 is no longer supported. Use 7 or later.
    u
    • 2
    • 1
  • k

    kartikpatodi

    02/14/2019, 3:42 PM
    Can anyone tell me where is the test code generation logic in the repo?
    u
    • 2
    • 2
  • a

    adam-mcneilly

    02/26/2019, 5:56 PM
    Out of professional curiosity, does anyone know why the Kotlin team went with val/var as opposed to const/let naming conventions? I know the difference between the two, but someone asked me if I happened to know the reason behind the naming and I didn't. Nor am I sure there was an explicit reason but I thought I'd ask.
    🤔 2
    l
    d
    +2
    • 5
    • 8
  • j

    jw

    03/07/2019, 4:23 PM
    i'm trying to add a bytecode text test and getting really weird values for some instructions. For example, the bytecode dump contains 3 LDC instructions each for different strings. When I add 1 separate LDC assertions for each of the strings i get a failure saying that there were actually 22(!) of the first string, 1 of the second, and 5 of the third. Is the format of these assertion comments documented anywhere? It works when I remove the string part and just test for 3 LDCs... they're a regex? i added escapes for
    |
    and now things work
    d
    • 2
    • 4
  • o

    oleksiyp

    03/17/2019, 9:45 AM
    I am wondering why in Kotlin JS reflection qualifiedName is not available. It is easy to parse kjsm files and get whatever meta information is needed, but you are not able to match it to objects because only simpleName is available in KClass. I am trying to leverage meta information to make https://mockk.io work for JS platform. Are there any objections to add qualifiedName now? I will do PR
    o
    b
    • 3
    • 6
Powered by Linen
Title
o

oleksiyp

03/17/2019, 9:45 AM
I am wondering why in Kotlin JS reflection qualifiedName is not available. It is easy to parse kjsm files and get whatever meta information is needed, but you are not able to match it to objects because only simpleName is available in KClass. I am trying to leverage meta information to make https://mockk.io work for JS platform. Are there any objections to add qualifiedName now? I will do PR
o

orangy

03/23/2019, 10:09 PM
@bashor
b

bashor

04/02/2019, 6:10 PM
The main objection is that it’s not required in most cases, but it will increase the size of the generated code.
It’s not quick but I think you can restore this information at runtime by walking objects tree from module root.
Maybe we can generate metadata more compact way and get a space for qualifier 🙂. @oleksiyp If you interesting in we can discuss details.
however, I don’t know a good way to make metadata more compact without breaking compatibility 😞.
o

oleksiyp

04/02/2019, 7:52 PM
Yes, I am interested. For me still this is major blocker. Besides discussion on how to make it compact, can you tell how to traverse module root. May be this one is enough
View count: 2