Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io.coil-kt.coil3:coil-gif:3.0.0-alpha10 doesn't resolve "wasmJs" dependencies (wasmJsRuntimeClasspath target) #2532

Closed
valeriyo opened this issue Oct 9, 2024 · 1 comment

Comments

@valeriyo
Copy link

valeriyo commented Oct 9, 2024

This is just to document what's happening.

I'm attempting to add "wasmJs" support in a module which depends on io.coil-kt.coil3:coil-gif:3.0.0-alpha10 (latest):

  @OptIn(ExperimentalWasmDsl::class)
  wasmJs {
    browser()
  }

and it fails to resolve with:

* What went wrong:
Could not determine the dependencies of task ':kotlinNpmInstall'.
> Could not resolve all dependencies for configuration ':client:ui:design:wasmJsNpmAggregated'.
   > Could not resolve androidx.annotation:annotation:1.1.0.
...

and the chain of dependencies is:

+--- io.coil-kt.coil3:coil-gif:3.0.0-alpha10
|    +--- androidx.core:core-ktx:1.13.1
|    |    +--- androidx.annotation:annotation:1.1.0 FAILED
...

where androidx.core:core-ktx:1.13.1 is latest stable but androidx.annotation:annotation:1.1.0 is 5 years old (https://mvnrepository.com/artifact/androidx.annotation/annotation)

Forcing androidx.core:core-ktx:1.15.0-beta01 doesn't help, because it still depends on an old annotation library:

+--- androidx.core:core-ktx:1.15.0-beta01
|    +--- androidx.annotation:annotation:1.8.1 FAILED
...

Forcing androidx.annotation:annotation:1.9.0-rc01 does work though:

+--- io.coil-kt.coil3:coil-gif:3.0.0-alpha10
|    +--- androidx.core:core-ktx:1.13.1
|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.9.0-rc01 (*)
|    |    +--- androidx.core:core:1.13.1
|    |    |    +--- androidx.annotation:annotation:1.6.0 -> 1.9.0-rc01 (*)
|    |    |    +--- androidx.annotation:annotation-experimental:1.4.0
|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 2.0.20 (*)
|    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0
|    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.9.0-rc01 (*)
|    |    |    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0
|    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.9.0-rc01 (*)
|    |    |    |    \--- com.google.guava:listenablefuture:1.0
|    |    |    +--- androidx.interpolator:interpolator:1.0.0
|    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.9.0-rc01 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.6.2
|    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.9.0-rc01 (*)
|    |    |    |    +--- androidx.arch.core:core-common:2.2.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.9.0-rc01 (*)
|    |    |    |    +--- androidx.arch.core:core-runtime:2.2.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.9.0-rc01 (*)
|    |    |    |    |    \--- androidx.arch.core:core-common:2.2.0 (*)
|    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.6.2 FAILED
|    |    |    |    +--- androidx.profileinstaller:profileinstaller:1.3.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.9.0-rc01 (*)
|    |    |    |    |    +--- androidx.concurrent:concurrent-futures:1.1.0 (*)
|    |    |    |    |    +--- androidx.startup:startup-runtime:1.1.1
|    |    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.9.0-rc01 (*)
|    |    |    |    |    |    \--- androidx.tracing:tracing:1.0.0
|    |    |    |    |    |         \--- androidx.annotation:annotation:1.1.0 -> 1.9.0-rc01 (*)
|    |    |    |    |    \--- com.google.guava:listenablefuture:1.0
|    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 2.0.20 (*)
|    |    |    |    \--- androidx.lifecycle:lifecycle-common:2.6.2 FAILED
...

up to androidx.lifecycle:lifecycle-common:2.6.2, which is 1 year old (https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-runtime-ktx)

Forcing androidx.lifecycle:lifecycle-common:2.9.0-alpha04 (latest) doesn't work -- it basically doesn't support "wasmJs" target:

* What went wrong:
Could not determine the dependencies of task ':kotlinNpmInstall'.
> Could not resolve all dependencies for configuration ':client:ui:design:wasmJsNpmAggregated'.
   > Could not resolve androidx.lifecycle:lifecycle-common:2.9.0-alpha04.

This is as far as it goes. Basically, coil-gif can't be used with wasmJs at this point.

@colinrtwhite
Copy link
Member

colinrtwhite commented Oct 9, 2024

coil-gif is only supported on Android at the moment. This is documented here. If you need GIF support ASAP, this proof of concept here might help.

@colinrtwhite colinrtwhite closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants