hello :wave: are there any migration guides from 1...
# ktor
d
hello 👋 are there any migration guides from 1.3.x -> 1.4/1.5? looks like some of the artifacts got renamed and no longer resolve
looks like in
1.5
artifacts now pull
.kotlin_metadata
files only, i.e.
Copy code
api("io.ktor:ktor-client-cio:$ktorVersion")
no longer resolves
io.ktor.client.engine.cio.CIO
nvm it was an issue with my local .m2 repo, clearing the cache and redownloading artifacts solved the issue
c
the maven version of
rm -rf node_modules
😆
d
yeah there seems some issue between intellij and gradle resolving those incorrectly (i.e. I build it locally from command line and it worked -> then Intellij tried to reimport it and blew up)
🤔 unsure what is causing this but there is some issue with my update to Kotlin 1.4 that is blowing up Gradle
hitting the same problem with unable to resolve
io/ktor/client/engine/cio/CIO
from one of my integration tests that use GradleRunner
https://github.com/ExpediaGroup/graphql-kotlin/pull/1007 -> updates work if I’m using Ktor
1.3.1
but blows up when
1.4
or
1.5
is used
a
@Dariusz Kuc could you please share the steps to reproduce your problem? I've tried to run tests from
GraphQLKtorClientTest
using https://github.com/dariuszkuc/graphql-kotlin/tree/lib_updates but they all passed.
d
sure
1. clone project 2. run
./gradlew clean build
from root project dir 3. notice that all
graphql-kotlin-gradle-plugin
integration tests that use Ktor CIO fail (from test report
index.html
)
Copy code
> There was a failure while executing work items
   > A failure occurred while executing com.expediagroup.graphql.plugin.gradle.actions.DownloadSDLAction
      > io/ktor/client/engine/cio/CIO
just did that on a fresh installation of Maven + Gradle (no previous caches)
Copy code
------------------------------------------------------------
Gradle 6.8
------------------------------------------------------------

Build time:   2021-01-08 16:38:46 UTC
Revision:     b7e82460c5373e194fb478a998c4fcfe7da53a7e

Kotlin:       1.4.20
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          11.0.9 (Oracle Corporation 11.0.9+11)
OS:           Mac OS X 10.15.7 x86_64
opening up project in IntelliJ shows following dependencies for the
graphql-kotlin-ktor-client
notice that jackson pulls in the jvm artifacts for JSON and core but there is no CIO JVM artifact
updated GH action on the PR to upload build reports on failure -> all the Gradle integration tests that rely on Ktor CIO fail with
java.lang.ClassNotFoundException: io.ktor.client.engine.cio.CIO
also note: when running a clean build (with wiped out dependencies)
graphql-kotlin-ktor-client
module build successfully, but once the build fails on the plugin integration tests then ktor client starts failing on the build as well
j
does changing dep from
ktor-client-cio
to
ktor-client-cio-jvm
help? had to do that when going from 1.3.1 to 1.4.0 in one of my projects
d
pretty sure it would work but I guess it would made adopting the client on android a little bit harder
*guess it would be resolved once we move the module to multiplatform
my guess there is something between Gradle and Maven that get confused (as clearing just .m2 directory does make it work temporarily)
a
I've reproduced it with my sandbox project. Could you please try to build that project? Maybe this problem is related to Gradle cache.
d
yes your project doesn't build for me either
it does seem like there is some gradle cache issue
since wiping out local .m2 cache resolves the issue, it is something between gradle and maven that blows up