Hi, I can’t get coroutines to work with kotlin 1.3...
# intellij
h
Hi, I can’t get coroutines to work with kotlin 1.3. here is the version and everything im using. When I have a hello world application, all works fine, the root cause is the coroutines.

https://kotlinlang.slack.com/files/UA001QPFG/FDA3JAT61/screen_shot_2018-10-09_at_10.30.18_am.png

g
Maybe you could share your project
h
Ill upload the whole project to got in amoment
i also included the .idea, and the .gradle so u can take a look at all of that stuffs
g
Your projects works fine for me
h
what versions are u using?
and your OS
g
MacOS
h
😞
g
Ultimate 2018.2
I don’t think this is OS-related
h
let me send my logs
g
do you use “run” icon on main method?
h
yep
i could screenshare if you dont mind
g
In this case Idea used compiled classpath to run the project
I would recommend to use application plugin instead
h
hmm that kinda is a bit unsatisfactory solution
g
Why?
h
i gotta compile then run
g
At least you use exactly the same code to run from CLI and from IDE
h
and no debugger
g
Why no debugger?
No, I mean that you can just add application plugin and use
run
task from Gradle
In this case debugger works just fine
Actually “run” button from IDE also works fine for me
Check your run configuration
h
ohh ok
g
For example you can try to delete it
But I saw many cases when running Kotlin code directly from IDE on Gradle project using Idea runner doesn’t work
One more thing
Try to enable option “Delegate IDE build/run actions to gradle”
this probably will help
h
where can i find that option?
g
Preferences -> Build.. -> Build Tools -> Gradle -> Runner
or just use search
h
that fixed the issue
thank you so much
👍 1
can you explain how come that fixed it? im still a bit perplexed on what specifically that does
g
Because you have Gradle project and everything already configured to work with Gradle, you can ask IDE to delegate build actions to Gradle directly instead of using Gradle project model and try to build it using own Idea build system
h
so if i had not checked that, because my idea plugin version i 1.30-m2, it’s trying to use that version to run it, and it’s not compatible therefore it fails?
g
Not sure what exactly caused your issue, probably some bundled version of Kotlin compiler that shipped with Kotlin plugin
h
I agree. Probably because it’s EAP and not 100% polished. I am sure it will be fixed by 1.3 release by the wonderful people at jetbrains 🙂
g
I would still recommend to use delegation to Gradle, much more stable especially with tests
h
Alright, thank you for that. Seem’s nice to be able to use the kotlin version via gradle for specific things
o
Would be nice to submit an issue. /cc @alexey.tsvetkov
h
would you like me to do it? 😅
not sure
o
Yep, that would be perfect.
👍 1