are there any plans to make user friendly compiler error message a priority for kotlin like for exam...
c
are there any plans to make user friendly compiler error message a priority for kotlin like for example elm, rust or scala have done? https://www.scala-lang.org/blog/2016/10/14/dotty-errors.html https://elm-lang.org/news/compiler-errors-for-humans https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html
šŸ‘ 4
o
This might be relevant if Kotlin code was usually written in a notepad and not in a world-class IDE.
šŸ˜‚ 3
a
I agree that this would be cool, but AFAIK it's not a priority for Kotlin currently. And yes, IDE helps a lot here (especially automatic quick fixes).
c
maybe you can discuss it internally, it really should be a priority. i mean rust, scala, elm are doing it and typescript also had better error messages as a priority in 3.x iirc.
anytime someone asks about an error message here in the slack or in a forum there should be thought how could the error message be changed to make the question obsolete.
āž• 2
a
The truth is, for the next year (at least) the compiler team will focus on the new compiler frontend. Error messages are just not a priority right now. But you are very welcome to file issues in YouTrack with suggestions how a particular message can be improved. Hopefully, we'll work on that a little later.
c
I’m a huge fan of fixing technical debt, but you cannot say well now we will work one year just on our new compiler frontend, ux bugs do not matter right now. kotlin is at version 1.5, day to day usability must always matter.
šŸ‘ 1
l
@christophsturm Is it that common to have people not know why the Kotlin code is not compiling? I mean, in Rust, there's a bunch of stuff that is "illegal" to write because of strict object ownership, so having the error messages teach you why it doesn't compile is quite critical for newcomers, but for Kotlin, and its IDE support, it's a different story.
c
one example where the compiler could do a bit more heavy lifting is when it does not find the correct method to call because there are multiple overloads
there could be 100s of small examples where an exception could be misleading, i find especially the article how elm handles is very inspiring.
its just a question what the people working on kotlin want kotlin to be.
I like kotlin as a language and i like the standard library. I don’t like most things coming from the jvm. for example the overly complex directory structure of gradle projects, or some gradle error messages. when the test runner setup is wrong it logs that as a test failure and you have to look into the report to see whats up.
everything spreads. if you care to fix the small details you will attract other people that like beautiful things. if you try to build things and you get a huge gradle stacktrace or your whole build file is red in idea, thats not so welcoming.
I do notice that kotlin has other problems right now than making compiler messager super understandable or trying to get to the exact point where something is misspelled instead of underlining 10 lines in red. I mean i have to restart idea 5 times per day because suddenly my build fails and my whole gradle file is underlined in red.
l
What IDEA version are you using, which Kotlin IDE plugin version, which Gradle version and with Kotlin version in the project?
I don't have to restart the IDE 5 times per day for AS Arctic Fox and IDEA 2020.3 (as for IDEA 2021.1 RC, it crashes on its own, I have up on it for now blob joy)
c
latest stable for everything and idea RC
theres tons of tickets about it and people post on the slack about it too
l
I'd try IDEA non RC, might not give you red Gradle kts files 5 times per day.
c
about 2 months ago i switched between 2020.3 and 2021.1 multiple times per day because different projects triggered different bugs. now i have settled for 2021.1 rc because i have a better feel for when i have to restart it
thats where i would start
l
Thes are regressions brought by the new type inference and JVM IR I believe. There were no such gibberish in the past.
I'd start by reporting a few issues for these on kotl.in/issue with a small reproducing snippet.
c
I think it has always been like this. this one is with gson, which i never used, but i remember seeing exactly the same problem with jackson
I don’t spend more than 30 minutes per day on idea bug reports. for today i have spent that amount already
šŸ˜… 1
this is for all the people who say ā€œwith a great ide like idea we don’t need good error messagesā€ https://youtrack.jetbrains.com/issue/KTIJ-7634
šŸ™ 1