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

    galex

    11/28/2017, 1:58 PM
    Hello, why is Ant still necessary if the project switched to Gradle ?
    v
    • 2
    • 1
  • d

    devbridie

    11/30/2017, 4:47 PM
    @mglukhikh Would you mind if I take over https://youtrack.jetbrains.com/issue/KT-21502 ? I think it is an easy one to start off with for a first kontribution.
    m
    • 2
    • 2
  • d

    devbridie

    12/01/2017, 11:05 AM
    Hi, Trying to write a test for Map.getOrDefault in j2k. However, the test runner throws
    // ERROR: Unresolved reference: getOrDefault
    , assumedly because getOrDefault was defined in JDK8. How should I deal with this?
    s
    • 2
    • 2
  • i

    ilya.gorbunov

    12/11/2017, 3:58 AM
    @adam-mcneilly The samples reside along with the standard library. You can take the recent pull requests for this issue as an example: https://youtrack.jetbrains.com/issue/KT-20357
    a
    • 2
    • 2
  • x

    xdetant

    12/15/2017, 10:24 AM
    am I missing something ? are dependencies up to date ?
    d
    i
    • 3
    • 3
  • y

    yole

    12/19/2017, 1:08 PM
    you make a translation and publish it on your own domain. at this time we aren’t hosting any translations on kotlinlang.org itself
    t
    • 2
    • 1
  • k

    kevinmost

    12/20/2017, 4:06 PM
    👋 hoping this is the right channel to ask this, I figured a lot of the discussions around the Kotlin internals happens here. I was looking at the Kotlin compiler plugins (namely, no-arg and Parcelize, which I figured were some of the simpler ones), trying to get a feel for them. I'd love to contribute to compiler plugin work at some point. I noticed that they're generating bytecode directly: https://github.com/JetBrains/kotlin/blob/master/plugins/noarg/noarg-cli/src/NoArgExpressionCodegenExtension.kt#L54 Is it feasible and/or desirable to generate Kotlin source code (now that KotlinPoet is a thing, though it's still early-stage from what I understand), run it through the embedded Kotlin compiler, and emit the generated bytecode from that instead? It seems more maintainable and less error-prone, at least from my perspective, to generate source code than to try to write out bytecode by hand. Just trying to get some perspective on the way the plugins are written, I assume that one of the main reasons for writing bytecode is just that KotlinPoet is new, and compiler plugins have been a thing for a while now 🙂
    r
    y
    +2
    • 5
    • 17
  • t

    Thiago

    12/23/2017, 9:02 PM
    Hello, Is it possible to contribute by performing Kotlin and IDE bug fixes, or contribute code? How to carry out these activities? I entered the bug reporting page and did not understand how to perform this activity. Can someone help me ?
    k
    • 2
    • 1
  • s

    shiraji

    12/25/2017, 5:16 PM
    For this issue https://youtrack.jetbrains.com/issue/KT-20357, what is the min number of samples for 1 PR? Can I send PR for just one method’s sample?
    y
    • 2
    • 1
  • u

    [removed]

    12/28/2017, 3:04 PM
    Hello, I've found small performance problem in standard library, https://youtrack.jetbrains.com/issue/KT-22042, but I don't know whether I should try to contribute fix for it. What's the current policy about stdlib performance? Is it okay to sacrifice a bit of local code readability/reusing for the sake of minor (~10-20%) improvements?
    y
    i
    • 3
    • 2
  • r

    ravidsrk

    12/28/2017, 4:45 PM
    Hello, I want to contribute to this Up for grabs bug https://youtrack.jetbrains.com/issue/KT-21878. How do i go about it?
    y
    • 2
    • 10
  • m

    marcinmoskala

    01/05/2018, 3:52 PM
    This sound crazy. In Poland even Christmas gives only 2 free days (if you are lucky enough to have them during working days)
    g
    • 2
    • 1
  • s

    shiraji

    01/17/2018, 5:44 PM
    Can anyone review this PR? https://github.com/JetBrains/kotlin/pull/1464
    o
    m
    • 3
    • 3
  • g

    Gregory Golda

    01/18/2018, 7:35 PM
    Yeah, that too. I can run compilerTest task. What I need though is to be able to trace the flow as I learn the code and make small changes. Is there any task that will run the kotlinc with an input file I provide? I'm also not familiar with IntelliJ, are there some resources that describe development process for Kotlin?
    s
    • 2
    • 1
  • d

    dsavvinov

    01/18/2018, 8:28 PM
    @Gregory Golda 1. IMO, it is more convenient to use IDEA for debugging rather than launching tests from command line. All tests should have usual "Run ..."-icon in gutter (just do not forget to set "Delegate IDE build/run actions to gradle") 2. Most of our test-runners are generated automatically based on testdata files (you can find them in
    compiler/testData
    for compiler and in
    idea/testData
    for IDE). Testdata files are essentially kotlin code, with, possibly, some additional markup (e.g. indicating that some diagnostic should be reported here, etc.) 3. Generated runner-classes usually end with "Generated"-suffix, like
    DiagnosticTestGenerated
    . They are very simple themselves and usually consist of a bunch of one-line methods, like
    doTest(...)
    . Most of the test-case logic is implemented in their supertypes, like
    AbstractDiagnosticTest
    4. If you want to add your own test, you can create your testdata, e.g. in
    compiler/testData
    and run pre-defined run configuration from IDEA ("Generate Compiler Tests"). It will automatically discover new testdata and update runner (tip: it is easy to find which runner has been updated by looking at the git diff) After that, you can create your own test and start stepping through the compiler code. If you will have any further questions, don't hesitate to ask! Cheers! 🙂
    👍 7
    g
    • 2
    • 36
  • g

    Gregory Golda

    01/19/2018, 2:31 PM
    could someone explain how to create new plugin (basing on noarg or allopen) and add it to the source tree using IDEA?
    g
    y
    • 3
    • 3
  • g

    Grzegorz Gołda

    01/21/2018, 1:05 PM
    I'm pretty frustrated by now. Can't set up IDEA to be usable. Did it like the README in github repo says, but there are problems I can't resolve. I can run 'clean' or 'dist' and it works, but vvents pop up saying that Kotlin is not configured. Trying to configure it doesn't work, because it's forever finding runtime. Other events regarding Gradle or Maven show up, but no actions are available. But most importantly, it all works so slowly I can't really edit anything. Trying to do anything has 10-30s delay. I have 4xXeon 3.2 GHz, 24 GB RAM, SSD drive. Is there anything I can do to be able to work with IDEA? I've tried to find any solution for 4 days now. Googled, experimented, can't find anything useful.
    l
    • 2
    • 2
  • d

    diesieben07

    01/22/2018, 10:59 AM
    Hm, it seems
    gradlew runIde
    on the command line works. So it's some issue with the Gradle import, maybe?
    d
    • 2
    • 3
  • d

    devbridie

    01/25/2018, 11:09 AM
    I am having trouble running generateTests with a compile error in :compiler:cli:compileKotlin, is this a known issue? https://pastebin.com/raw/ag9zdzXn
    d
    • 2
    • 2
  • l

    ltongues

    01/29/2018, 6:18 PM
    May 2017 commit https://github.com/JetBrains/kotlin/commit/00a5ff23643d2b753ba2140d2baa72f05480cf06 fixes a typo in language grammar, but the typo is still in the docs. Somebody probably forgot to regenerate documentation https://kotlinlang.org/docs/reference/grammar.html
    a
    o
    • 3
    • 3
  • a

    adam-mcneilly

    02/02/2018, 4:07 PM
    What's an appropriate time to wait before nudging a PR? I submit one to the website two weeks ago, but it hasn't been acknowledged. I thought it might be at least be assigned to someone (even if accepting/denying it came later), but that hasn't happened yet.
    l
    h
    • 3
    • 11
  • h

    h0tk3y

    02/06/2018, 5:16 PM
    Done, thanks.
    a
    • 2
    • 2
  • r

    raulraja

    02/07/2018, 9:48 PM
    Trying to determine if an instance
    Protobuf.Function
    has an
    override
    modifier but don't see anything in the flags for that. Any ideas or has anybody else attempted this before?. I'm in the context of processing annotations. Let me know if #kapt is better suited for this. thanks!
    e
    • 2
    • 28
  • e

    Eugenio

    02/18/2018, 3:31 PM
    Question to JB: why is the
    kotlin-build-common-test
    Maven repo not kept up to date? I would love to be able to get the various
    DebugProtoBuf
    without having to grab and compile the sources!
    i
    u
    • 3
    • 6
  • g

    Grzegorz Gołda

    02/18/2018, 11:31 PM
    and in constructor,
    myWritingAllowed = SwingUtilities.isEventDispatchThread()
    • 1
    • 2
  • a

    alllex

    02/22/2018, 2:08 PM
    Hey, I stumbled upon
    kotlin.internal.contracts
    thing, contents of which is embedded in all standard functions such as
    run
    ,
    apply
    ,
    require
    , etc. What is it exactly? Where can I read about it?
    d
    • 2
    • 2
  • j

    jw

    02/24/2018, 3:48 AM
    Ilya G will guide you
    👍 1
    o
    • 2
    • 1
  • j

    JasonB

    02/27/2018, 10:44 PM
    org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call 'slugsToObjectList' into local final fun <anonymous>(it: kotlin.collections.List<kotlin.String>): arrow.core.Option<arrow.core.Either<com.ep.smartid.ums.web.UserController.ObjectLoadError, kotlin.collections.Collection<com.ep.smartid.ums.domain.Application>>> defined in com.ep.smartid.ums.web.UserController.patchUser.<anonymous> { slugsToObjectList(it, { this.applicationService.getApplication(it) }).some() } Cause: slugsToObjectList (Ljava/util/Collection;Lkotlin/jvm/functions/Function1;)Larrow/core/Either;: Cause: Captured field not found: com/ep/smartid/ums/web/UserController$patchUser$2$applications$1$1.this$0
    d
    • 2
    • 3
  • s

    sathawale27

    03/15/2018, 2:08 PM
    In android-ktx, there are some extension functions which are placed in Uri.kt. One of them is toFile(). val file = uri.toFile() returns the file from uri. It returns File still it is in android.net.Uri package. I was thinking that it should be in separate File.kt. Why it is placed in Uri.kt instead of File.kt separate file? I just wanted to know the intentions of doing it.
    k
    • 2
    • 1
  • g

    GarouDan

    03/18/2018, 4:42 PM
    For example, I was wondering, in the kotlin std lib we have already some helpful math functions but we could create more ones. And Java, Javascript maybe already have some nice libraries to do this, but if we would like to create a shared code (my dream is use the same language in the same project (and I think Kotlin is in the very right way) to create desktop, web, mobile and cli programs) we will have some difficulty because not all math functions will be available, for example, so, maybe another library will be useful. Is this a good direction, if yes, can I contribute with this on some way?
    b
    • 2
    • 1
Powered by Linen
Title
g

GarouDan

03/18/2018, 4:42 PM
For example, I was wondering, in the kotlin std lib we have already some helpful math functions but we could create more ones. And Java, Javascript maybe already have some nice libraries to do this, but if we would like to create a shared code (my dream is use the same language in the same project (and I think Kotlin is in the very right way) to create desktop, web, mobile and cli programs) we will have some difficulty because not all math functions will be available, for example, so, maybe another library will be useful. Is this a good direction, if yes, can I contribute with this on some way?
b

bashor

03/20/2018, 5:34 PM
Feel free to provide more info about that is missed.
View count: 2