https://kotlinlang.org logo
#ktor
Title
# ktor
a

Arnab

06/10/2022, 9:35 AM
This has me confused. I just started a new ktor project and this was amongst the things that I got as part of the ktor project generator page. Apparently intellij doesn’t recognize
startsWith
as a method that can be called on a string 😮 Any clues?
e

e5l

06/10/2022, 9:35 AM
@Vadim Briliantov could you take a look?
a

Aleksei Tirman [JB]

06/10/2022, 9:39 AM
I cannot reproduce it so most likely this is an IDE problem.
a

Arnab

06/10/2022, 9:40 AM
If it is relevant, the older ktor project I have, has the following return type when it comes to
call.request.path()
-> `kotlin.String`while the newest ktor version returns a
String
type. Does this matter?
@Aleksei Tirman [JB]: Maybe, but I am using the same IDE for both the older and the new project, so how do I go about troubleshooting this?
a

Aleksei Tirman [JB]

06/10/2022, 9:43 AM
Can you share a project where you observe an error?
Note that I had to change kotlin version to 1.7.0 in the plugin in order to get the build to complete
a

Aleksei Tirman [JB]

06/10/2022, 9:47 AM
What version of IDEA do you use?
a

Arnab

06/10/2022, 9:48 AM
IntelliJ IDEA 2021.2.4 (Community Edition)
Build #IC-212.5712.43, built on December 21, 2021
Runtime version: 11.0.13+8-b1504.49 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.4
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry: ide.intellij.laf.enable.animation=true, ide.balloon.shadow.size=0
Non-Bundled Plugins: wu.seal.tool.jsontokotlin (3.7.4), com.villains.intelij.plugin.trashpandatheme (1.13), monokai-pro (1.8.1), net.antelle.intellij-xcode-dark-theme (1.2.4), com.mallowigi (50.2.0), com.mallowigi.idea (16.0), com.intellij.lang.jsgraphql (3.1.4), DBN (3.3.1779.0), org.jetbrains.kotlin (212-1.7.0-release-281-IJ5457.46), org.spekframework (2.0.18-IJ2021.2)
Kotlin: 212-1.7.0-release-281-IJ5457.46
a

Aleksei Tirman [JB]

06/10/2022, 9:57 AM
Unfortunately, I cannot reproduce it even with your versions of IDEA and the Kotlin plugin.
a

Arnab

06/10/2022, 9:57 AM
Strange, I’ll try upgrading IDEA version.
a

Aleksei Tirman [JB]

06/10/2022, 9:58 AM
You can try to disable all non-bundled plugins. Also, you can file an issue.
a

Arnab

06/10/2022, 10:06 AM
Interesting, the newest IDEA version seems to solve this. Very strange indeed.
5 Views