https://kotlinlang.org logo
#server
Title
# server
n

noncom

11/29/2017, 11:56 AM
Kotlin 1.2.0 is out now, but including Ktor into the project brings kotlin 1.1.51 dependency with it, does anyone know how to handle this while leaving the project to run on 1.2.0 ?
c

cy

11/29/2017, 11:56 AM
exclude transitive dependencies?
n

noncom

11/29/2017, 11:57 AM
okay, I thought maybe there was a better way..
thanks!
o

orangy

11/29/2017, 12:01 PM
I think we can deploy 0.9 alpha with 1.2, what do you think @cy?
👍 1
n

noncom

11/29/2017, 12:19 PM
For now, I can say that excluding the 1.1.51 deps makes my server fail
when I go to 127.0.0.1 there's no reponse
and everything works okay, should I remove the exclusion clauses
probably there is some kind of incompatibility present
with kotlin 1.2.0
hmm, other than ERR_EMPTY_RESPONSE in the brower there's no indication that anything fails
the IDE console writes some info when the request happens, not indicating any error
it only does so once, btw, for the first request. it does not write anything else for the following ones
c

cy

11/29/2017, 1:29 PM
what engine do you use? netty?
n

noncom

11/29/2017, 2:59 PM
yes
c

cy

11/29/2017, 3:06 PM
0.9.1-alpha-8
is built with kotlin 1.2.0
👍 2
n

noncom

11/29/2017, 3:27 PM
Cool!
and it works now, without any problems!
thanks!
Kotlin releases are so frequent, it literally must be a race
to keep up with it
o

orangy

11/29/2017, 3:36 PM
It’s weird that it doesn’t work OOB, should be. May be changes in coroutines though. Should we investigate it, or just require 1.2 to use with ktor?
@elizarov
r

rocketraman

11/29/2017, 7:11 PM
I'm using 0..9.0 with 1.2.0, excluding the 1.1.x deps, and it seems to work ok. Haven't done extensive testing but its working so far.
(Jetty backend)
@noncom Make sure you're really excluding all the 1.1.51 deps. I have this in my gradle config:
Copy code
configurations {
    all*.exclude module: 'kotlin-stdlib-jre7'
    all*.exclude module: 'kotlin-stdlib-jre8'

    all*.resolutionStrategy {
      force "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
      force "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
      force "org.jetbrains.kotlin:kotlin-runtime:$kotlinVersion"
      force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
      force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
      force "org.jetbrains.kotlin:kotlin-test:$kotlinVersion"
      force "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
    }
  }
n

noncom

11/30/2017, 10:31 AM
@rocketraman yes, I was doing exactly this, fully removing them. Also, I've visually verified the absense of the 1.1.x deps in the "External libraries" group in the Project panel, so I don't think there was a mistake
I should make a note, however, that I was using the Netty backend, and Sergey asked me to clarify this, probably guessing of a possible reason
and he fixed it
👍 1
3 Views