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

    zokipirlo

    03/27/2020, 12:32 PM
    Is it possible to somehow configure Intellij (Android Studio) to work better? 🙂 I have 64 gb, and with all Kotlin files, which are more than 500 lines long is freezing a lot. Impossible to write code sometimes, because it's not unusual to stuck for more than 5s. Set to use 4 gb which is maximum in settings, but rarely come over 2gb. It's always dropping back to 1 gb (looking at bottom right corner). CPU cores are also very low all the time. Is there any special settings to squeze hardware a lot more? Because ram is more or less free, cpu is on few percent, but IDE is freezing 🙂
    m
    r
    +3
    • 6
    • 42
  • z

    zak.taccardi

    03/30/2020, 4:14 PM
    are there any plans to improve the “Find Usages” in IntelliJ/Android Studio for a
    typealias
    ? For example,
    typealias LoadString: () -> String
    finds all usages of
    () -> T
    and I specifically just want
    LoadString
    m
    a
    • 3
    • 9
  • l

    leandro

    03/31/2020, 9:00 AM
    Does one need an IntelliJ license to run the EAP/beta versions?
    f
    m
    • 3
    • 7
  • y

    yawkat

    04/02/2020, 10:03 AM
    What does this error mean? From what I can tell the Kotlin SDK is the one auto-configured by intellij. This is a kotlin-js project, and other tasks are also not working well, like multi-minute freezes during refactoring and lots of cpu load apparently for highlighting
    Untitled
    a
    • 2
    • 4
  • s

    Slackbot

    04/02/2020, 9:28 PM
    This message was deleted.
    m
    • 2
    • 4
  • e

    elect

    04/06/2020, 2:50 PM
    is it possible to revert partially a commit via Idea gui?
    :google: 2
    d
    m
    • 3
    • 2
  • r

    rocketraman

    04/09/2020, 7:35 PM
    Oh man, performance is night and day with IJ 2020.1, Kotlin 1.4-M1, and the build change below. I'm starting to "Develop with Pleasure" again. :-)
    a
    s
    • 3
    • 5
  • o

    okue

    04/11/2020, 8:30 AM
    Hi. Now I’m trying to add a another sourceSets
    integrationTest
    based on https://docs.gradle.org/6.3/userguide/java_testing.html#sec:configuring_java_integration_tests. But, I’m facing a problem that internal methods and classes are not visible from my custom source set
    intergrationTest
    when coding at IDEA. (Gradle can build successfully because I setup
    compilations["integrationTest"].associateWith(compilations["main"])
    ) Is there a way to resolve this problem?
    a
    • 2
    • 2
  • p

    pablisco

    04/11/2020, 7:50 PM
    I’ve tried looking for a solution for this everywhere but can’t find anything. I have a KMP project using gradle. When I import it into intelliJ I get the following error:
    Task 'assemble' not found in root project
    On gradle there seems to have zero problems. Not sure why it’s trying to run the assemble task 🙃 This is the gradle output from IntelliJ: https://gist.github.com/pablisco/02a76c227e95766e1407a375679328a9 The project is: https://github.com/pablisco/virustrend What am I doing wrong? 😅
    w
    • 2
    • 4
  • g

    Gary Tierney

    04/12/2020, 8:38 PM
    is there a way to increase the amount of time before IntelliJ will cancel a completion request? I'm debugging an issue with imports not being resolved in completions and having the
    ProgressManager
    cancel on me when I'm at a breakpoint is a tad annoying
    a
    • 2
    • 1
  • m

    mbonnin

    04/14/2020, 6:17 PM
    Does that ring a bell to anyone? Happens on a
    settings.gradle.kts
    file and IntelliJ 2020.1. Itt was working well with 2019.3
    a
    • 2
    • 3
  • a

    Alexander Vasiljev

    04/16/2020, 2:39 AM
    Hello. I am using worksheets script (.ws.kts). Is it the right channel to talk about worksheets Intellij feature?
    a
    • 2
    • 6
  • n

    napperley

    04/16/2020, 10:30 PM
    After getting IntelliJ to generate a new project from the Native | Gradle template it includes a inaccurate comment in the build file:
    // For ARM, should be changed to iosArm32 or iosArm64
    With Kotlin Native there are ARM based targets for other OS's besides iOS (eg linuxArm32Hfp, and linuxArm64), and iOS development can't be done on a Linux PC. The contents of the comment should be based on what host OS is used.
    a
    • 2
    • 1
  • c

    Colton Idle

    04/18/2020, 3:21 AM
    I see that intellij idea 2020.1.1 Preview was released. Where can I find the release notes for it?
    m
    • 2
    • 1
  • c

    christophsturm

    04/20/2020, 10:45 AM
    with this code
    val webRootDirectory = Paths.get("src", "main", "resources", "web").toAbsolutePath()
    idea complains “declaration has type inferred from a platform call which can lead to unchecked nullability issue” when i add a
    !!
    , it instead complains “unnecessary non null assertion (!!) on a non null receiver of type path”
    s
    m
    a
    • 4
    • 5
  • p

    poohbar

    04/20/2020, 4:13 PM
    “Optimize imports” in Kotlin+Java mixed project now takes 5 minutes as opposed to 20 seconds.
    r
    a
    • 3
    • 7
  • e

    EyeCon

    04/21/2020, 9:17 AM
    Can we somehow make IntelliJ use a certain default for Gradle settings? In particular, I don't want to use the Gradle wrapper for new projects (I know it's not the common way but I try to use one Gradle installation on my computer). This is easy enough to change after the initialization, but I couldn't find a way to do this by default. I need this when importing a ready made Gradle project.
    a
    • 2
    • 2
  • k

    keturn

    04/24/2020, 5:19 PM
    Running a kotlin worksheet, its working directory seems to be the working directory of intellij. How can the worksheet get the project directory (or the directory of its own source file, maybe?) so I'm able to work with the project's files?
    p
    a
    • 3
    • 4
  • c

    camdenorrb

    04/25/2020, 6:55 PM
    Can't move multiple kotlin files to another package?
    a
    • 2
    • 1
  • n

    napperley

    04/26/2020, 3:52 AM
    IntelliJ show a green box for a source file, however during actual compilation a error occurs, with the message mentioning that the types have to be specified explicitly (for the linuxX64, and linuxArm32 modules). Below is the contents of the source file where compilation fails (on
    _gtkWidgetPtr?.reinterpret()
    ):
    // ...
    
    actual open class AppWindow(private val app: GuiApplication) : WindowBase {
        private var _gtkWidgetPtr: CPointer<GtkWidget>? = null
        override val gtkWidgetPtr: CPointer<GtkWidget>?
            get() = _gtkWidgetPtr?.reinterpret()
        val gtkAppWinPtr: CPointer<GtkApplicationWindow>?
            get() = _gtkWidgetPtr?.reinterpret()
        override val gtkWindowPtr: CPointer<GtkWindow>? by lazy {
            _gtkWidgetPtr?.reinterpret()
        }
        // ...
    }
    a
    • 2
    • 1
  • v

    vineethraj49

    04/27/2020, 12:15 AM
    does intellij (no longer?) warn about unused variables in companion objects? I seem to remember it doing so it does seem to work as expected with class methods and variables inside a function. aaaa! the class in the library is marked with
    @Suppress("unused")
    and that's being "carried forward", why?
    a
    • 2
    • 1
  • m

    mbonnin

    04/28/2020, 11:02 PM
    Using intelliJ 2020.1, I get a  
    javax/xml/bind/JAXBException
     error when run from intelliJ, which hints at a JDK11 somewhere... But I do have JDK 1.8 in both the project structure and also in the "Gradle JVM" setting. Any clue why my build would run on JDK11 ?
    • 1
    • 1
  • n

    natpryce

    04/30/2020, 4:41 PM
    Hi. I’ve discovered to my surprise that the Java-to-Kotlin converter adds spurious rename commits to the Git history. I consider the converter messing with Git history at all to be a bug. And these rename commits interfere with the rebasing features of IntelliJ (for example, if you change the Java code in a historical version & rebase, the rebasing tries to merge the Java code changes with changes to the Kotlin file that occurred after conversion to Kotlin). Is there any way to turn this behaviour off?
    m
    a
    • 3
    • 13
  • i

    Ian

    04/30/2020, 7:15 PM
    I'm finding that intellij (latest version) is very slow while editing Kotlin code - it can take 10-20 seconds for the IDE to catch up with syntax highlighting and errors. I'm using it on a 32 core machine with 32GB RAM assigned to Intellij. Anyone have any ideas on why it's so slow? I don't recall this being a problem in the past.
    z
    r
    c
    • 4
    • 3
  • p

    Pierre Marais

    05/02/2020, 8:10 AM
    Hi, is there a possibility that this timeout could be overridden in order to have kotlin scratch files that run for longer than 30s? https://github.com/JetBrains/kotlin/blob/75f1fb0237b6c248643ba3cb7013ea2750247659/idea/idea-jvm/src/org/jetbrains/kotlin/idea/scratch/compile/KtScratchExecutionSession.kt.191#L40
    a
    • 2
    • 2
  • h

    Hanno

    05/04/2020, 3:50 PM
    Hi, does anyone know if there is a possibility to pass in parameters when build in intellij is delegated to gradle? My build depends on a -D param that the IDE should pick up. Thanks :) (Not a run config or task execution, the project build)
    a
    • 2
    • 5
  • j

    Jakub Pi

    05/05/2020, 4:43 PM
    I'm getting different results when I run the following code:
    val digest = MessageDigest.getInstance("SHA-256")
        digest.update("foo".toByteArray())
        val result1 = digest.digest()
        digest.reset()
        val result2 = digest.digest("foo".toByteArray())
        val areEqual = MessageDigest.isEqual(result1, result2)
        println(areEqual)
    The call to
    digest.update()
    is ignored when run inside of a scratchpad (as opposed to compiled code). So scratchpad prints
    false
    while running the same block inside of a
    main()
    prints
    true
    . Any ideas what could be causing this?
    a
    • 2
    • 1
  • t

    todd.ginsberg

    05/06/2020, 4:54 PM
    Mine just worked with double ctrl on Mac (2020.1.1)
    👍🏻 2
    💯 2
    k
    • 2
    • 1
  • c

    christophsturm

    05/12/2020, 11:34 AM
    is there a refactoring that converts a property to a function and changes all the call sites?
    w
    • 2
    • 2
  • s

    Sinan Kozak

    05/12/2020, 1:56 PM
    Hi, we use editorconfig plugin to keep our code style inline within the team. After some time, updating editorconfig becomes a problem because idea code style is not in sync with editorconfig and next time code style is exported, it still used values from it’s own settings. Is it possible to import editorconfig as Code Style Scheme? It would be super nice if editor config actually overrides xml settings of Code Style Scheme.
    w
    • 2
    • 5
Powered by Linen
Title
s

Sinan Kozak

05/12/2020, 1:56 PM
Hi, we use editorconfig plugin to keep our code style inline within the team. After some time, updating editorconfig becomes a problem because idea code style is not in sync with editorconfig and next time code style is exported, it still used values from it’s own settings. Is it possible to import editorconfig as Code Style Scheme? It would be super nice if editor config actually overrides xml settings of Code Style Scheme.
w

wasyl

05/12/2020, 2:26 PM
Doesn’t EditorConfig plugin override IntelliJ settings? I get this warning in preferences on CodeStyle > Kotlin page
s

Sinan Kozak

05/12/2020, 2:32 PM
I have that warniing but setting is not overriden or changed.
And you can still able to update options without any feedback. Preview screen respects to ide settings not editorconfig setting
Ok it is possible Set From editor config but it is for sub level. There is no setting to apply editor config to all idea code style. At least for me
w

wasyl

05/12/2020, 2:54 PM
Oh, I don’t know then. For me it’s enough that even though other settings are saved, whatever is in EditorConfig takes precedence for everyone anyway
View count: 4