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
intellij
  • m

    mp

    09/04/2020, 10:07 AM
    @Alexey Belkov [JB] can another one be referred to you cos it’s actually difficult to describe whats going on? when i press
    Parameters info
    shortcut I go this. but with
    cmd+shif+a
    action its works
    Screen Recording 2020-09-04 at 13.06.13.mov
    a
    v
    • 3
    • 4
  • n

    natario1

    09/07/2020, 10:30 AM
    Hi 👋 since updating to Kotlin 1.4.0, all symbols coming from dependencies (even Kotlin stdlib) are red in the IDE. However the code compiles just fine. I have tried cleaning the build and the IDE cache, but with no success. Any hints?
    a
    a
    • 3
    • 4
  • e

    elect

    09/10/2020, 9:08 AM
    is there a GUI way to cherry pick a commit and apply it to another branch?
    r
    • 2
    • 2
  • e

    elect

    09/11/2020, 8:23 AM
    is it possible to modify the autoformatter so that
    if (!clipOriginLowerLeft) { val tmp = T; T = B; B = tmp; }
    stays in one line instead of
    if (!clipOriginLowerLeft) { 
       val tmp = T; T = B; B = tmp; } // Swap top and bottom if origin is upper left
    g
    • 2
    • 6
  • p

    poohbar

    09/15/2020, 7:41 PM
    Can I somehow convince IntelliJ auto-formatter to REMOVE trailing commas? I can’t stand them.
    a
    r
    • 3
    • 2
  • a

    audriusk

    09/16/2020, 7:53 AM
    Also would be nice to have opposite option - to add trailing comma after file format when parameters are multi-line
    ➕ 2
    j
    • 2
    • 1
  • f

    Fleshgrinder

    09/21/2020, 9:04 AM
    Anyone else experiencing abysmal performance with the latest IntelliJ RC and Kotlin 1.4 (0 and 10)? I'm downgrading to the latest stable release to see if I have the problem there too and if the Kotlin plugin is to culprit.
    :yes: 1
    o
    p
    • 3
    • 4
  • p

    Peter

    09/22/2020, 5:20 PM
    how does extension functions impact IntelliJ performance? eg in a project with a few 100 extension functions?
    g
    • 2
    • 1
  • z

    zalewski.se

    09/23/2020, 2:06 AM
    Does anyone have a problem with
    Code Style Scheme
    being reseted back to the `default`/`project` setting all the time? Whenever I set my own
    Scheme
    it works but after a while it’s back to
    project
    setting… It’s really annoying as it’s breaking my all imports and auto-formatting 😕 I could tackle it down that it’s reverting my changes after doing
    sync project with gradle
    . It’s happening on AS (since version 4.0 I guess)
    a
    • 2
    • 3
  • e

    elect

    09/24/2020, 9:04 AM
    on two different machines, same last Idea EAP, autoformat leaves this on one untouched
    fun sliderCalcRatioFromValueT(dataType: DataType, v: Int, vMin: Int, vMax: Int,
                                      power: Float, linearZeroPos: Float): Float {
    while on the other one
    fun sliderCalcRatioFromValueT(
                dataType: DataType, v: Int, vMin: Int, vMax: Int,
                power: Float, linearZeroPos: Float,
        ): Float {
    anything I can tweak?
    w
    a
    • 3
    • 4
  • t

    tim

    09/24/2020, 9:40 AM
    is anyone getting an error with the latest EAP when trying to open more than 1 idea window: "Only one instance of IDEA can be run at a time"? I'm on linux with version: IntelliJ IDEA 2020.3 EAP (Ultimate Edition) Build #IU-203.3645.34, built on September 21, 2020
    a
    • 2
    • 4
  • d

    Daniel Svensson

    09/24/2020, 10:01 AM
    How can I avoid the Kotlin plugin crashing all day long? Are there any ceremonial sacrifices that needs to be done?
    a
    l
    • 3
    • 17
  • r

    rrva

    09/25/2020, 6:55 AM
    How should I interpret https://blog.jetbrains.com/kotlin/2020/09/the-dark-secrets-of-fast-compilation-for-kotlin/ for structuring projects today? Split it into more modules? Use gradle or intelliJ internal compiler for compilation? What are some concrete tips today? I’ve set up a gradle remote build cache and use
    org.gradle.caching=true
    org.gradle.parallel=true
    and
    org.gradle.configureondemand=true
    But I am unsure what is the path forward for compilation when working inside IntelliJ, to shorten time-to-test
    ➕ 3
    g
    • 2
    • 11
  • t

    toban

    09/29/2020, 10:04 AM
    Any way to disable the shortcut to toggle between viewing quick documentation in popup or in a tool window? I can’t find it in the keymap
    👀 1
    s
    • 2
    • 1
  • s

    Sudhir Singh Khanger

    09/30/2020, 4:24 AM
    When I run a scratch file where would I see the output?

    https://i.imgur.com/OjL3tVG.png▾

    g
    r
    • 3
    • 32
  • m

    mikehearn

    10/04/2020, 11:38 AM
    I know PSI seems to be used in Upsource and other web apps, and inspections can be run from the command line, so PSI must be somewhat re-usable. Just wondering if there's any pre-canned examples or docs on this anywhere.
    👀 1
    e
    m
    w
    • 4
    • 16
  • z

    zeugederunity

    10/06/2020, 12:56 PM
    Hello everyone, are there any known memory problems (leaks etc.) with 2020.2? Right now i've set the heapspace to 8Gb but intellij is still having low memory problems. (i cant even create a memory snapshot to find the problem)
    f
    v
    m
    • 4
    • 8
  • d

    Daniel Svensson

    10/07/2020, 7:10 AM
    How do I invoke gradle on the Kotlin repository to build a plugin from git that matches my version of IDEA? Am I missing some readme somewhere? Google is too tainted by the relevant keywords so it only brings me to pages about using the plugin "normally".
    • 1
    • 2
  • s

    Slackbot

    10/09/2020, 11:33 AM
    This message was deleted.
    c
    e
    • 3
    • 2
  • b

    bjonnh

    10/15/2020, 10:29 PM
    I'm a bit confused by how the plugin behaves when I try to follow the style "everything from the root package should be at the src root"
    f
    • 2
    • 2
  • t

    tarek

    10/16/2020, 8:29 AM
    Hi What makes it so that IDEA can or cannot resolve imports from native code (platform.Foundation in my case) ? We have a MPP app that has multiplatform modules that target android and iOS I am unable to have IDEA resolve imports and autocomplete iOS code in ios sourcesets When I create a new native project from scratch (same IDEA, same Kotlin version etc.) it works without any issues Any ideas?
    a
    • 2
    • 2
  • d

    diesieben07

    10/16/2020, 9:46 AM
    When I use
    @OptIn
    I get the warning "This class can only be used with the compiler argument '-Xopt-in=kotlin.RequiresOptIn'his class can only be used with the compiler argument '-Xopt-in=kotlin.RequiresOptIn'". I added the following in my `build.gradle.kts`:
    kotlin {
      targets.all {
        compilations.all {
          kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
        }
      }
    }
    But the warning remains.
    👀 1
    t
    a
    • 3
    • 4
  • r

    Rob Elliot

    10/28/2020, 11:10 AM
    Not specifically a kotlin thing, but in my kotlin project using IntelliJ IDEA 2020.3 EAP (Ultimate Edition) Build #IU-203.4818.26 running this MainKt file via the IDE:
    fun main() {
      println("Hello World")
    }
    now kicks off a gradle task
    :MainKt.main()
    , the net result of which is that instead of one line of output I get 34 lines of gradle build output. Is this a new thing? I kind of get that it might be desirable to reuse gradle to ensure that everything’s exactly the same in the IDE as via the build, but surely there’s a way to swallow the build output?
    w
    s
    a
    • 4
    • 8
  • o

    Omar Mainegra

    10/29/2020, 2:31 PM
    Hello, It's there a way you could bring back the IDE option "Enable new type inference algorithm..." that was removed in https://youtrack.jetbrains.com/issue/KT-37378? maybe enabled by default, or at least
    Idea
    could respect the compiler flag
    -XXLanguage:-NewInference
    , right now it doesn't seem to be the case (Idea/AS hang with the new FE). The reason I'm bringing this up because https://youtrack.jetbrains.com/issue/KT-41644 was reopen, we are still stuck in 1.3.71 even when our code works 1.4.x (cmd gradle), but without an IDE we can't migrate
    a
    • 2
    • 1
  • a

    addamsson

    10/29/2020, 7:50 PM
    IDEA suddenly stopped recognizing my common tests (in
    commonTest
    ) as tests. I can see that it is marked as a test sources directory, but the green triangle (to run it) is not visible anymore next to functions annotated with
    @Test
    . I already tried reimporting and invalidating the caches...what am I doing wrong?
    a
    • 2
    • 1
  • a

    addamsson

    10/29/2020, 8:20 PM
    also why do I get this error (happens since I upgraded my IDEA)?
    a
    • 2
    • 2
  • c

    christophsturm

    10/31/2020, 2:59 PM
    how do i report bugs in the kotlin plugin thats bundled in idea eap versions? it seems to be different than the 1.4.10 plugin but the version is not available in youtrack
    w
    a
    • 3
    • 5
  • d

    David Glasser

    11/02/2020, 10:09 PM
    A colleague is having problems installing the 1.4 plugin. In his Plugins window, under Installed it shows that he has a 1.3 version installed (I think it’s bundled). Over on Marketplace, a search for kotlin shows a 1.4 version, but it already says INSTALLED and there’s no obvious way to update to it. Are we missing something?
    • 1
    • 1
  • s

    spand

    11/03/2020, 3:30 PM
    Is it just me getting unending
    Loading ...
    screen in the editor window when trying to open a file once in a while ? Maybe its related to an unsynched gradle project but I cannot pin it down. On the latest 2020.2.3
    a
    • 2
    • 1
  • k

    Kris Wong

    11/03/2020, 4:53 PM
    it's super annoying when IDEA combines empty packages/directories in the project pane and I need to add a new file into one of them
    c
    w
    g
    • 4
    • 9
Powered by Linen
Title
k

Kris Wong

11/03/2020, 4:53 PM
it's super annoying when IDEA combines empty packages/directories in the project pane and I need to add a new file into one of them
c

christophsturm

11/03/2020, 5:09 PM
you can disable that, but yes its pretty annoying
w

wasyl

11/03/2020, 5:14 PM
I usually create class in wrong package, modify the package directive and use quick-fix to move the class to proper directory
c

christophsturm

11/03/2020, 6:03 PM
ah thats a good idea!
k

Kris Wong

11/03/2020, 6:29 PM
yeah that's the most straightforward way
didn't know i could disable that, though
g

Giorgos Neokleous

11/03/2020, 9:47 PM
Yeah I agree. This is life changing though https://twitter.com/hhariri/status/1319560406893985792?s=19
k

Kris Wong

11/03/2020, 9:49 PM
interesting. does '..' work?
g

Giorgos Neokleous

11/03/2020, 9:53 PM
Haven't tried it
Update: doesn't work for going upstream on the directory 😞
👍 1
View count: 4