ionspin / kotlin-multiplatform-bignum

A Kotlin multiplatform library for arbitrary precision arithmetics
Apache License 2.0
339 stars 40 forks source link

Not compatible with new native wasmJs platform #275

Closed sergeych closed 6 months ago

sergeych commented 6 months ago

When adding to new MP project that inclides wasmJs variant, it can't find the comatible published library:

Could not resolve all dependencies for configuration ':composeApp:wasmJsCompileClasspath'.
> Could not resolve com.ionspin.kotlin:bignum:0.3.8.
  Required by:
      project :composeApp
   > No matching variant of com.ionspin.kotlin:bignum:0.3.8 was found. The consumer was configured to find a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm', attribute 'org.jetbrains.kotlin.wasm.target' with value 'js' but:
       - Variant 'androidNativeArm32ApiElements-published' capability com.ionspin.kotlin:bignum:0.3.8 declares a library for use during 'kotlin-api':
           - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'wasm'
           - Other compatible attributes:
               - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
               - Doesn't say anything about org.jetbrains.kotlin.wasm.target (required 'js')

To reproduce, add as dependency to any project with wasmJs dependency, e.g. something like (in build.kts):

kotlin {
    @OptIn(ExperimentalWasmDsl::class)
    wasmJs {
        moduleName = "composeApp"
        browser {
            commonWebpackConfig {
                outputFileName = "composeApp.js"
            }
        }
        binaries.executable()
    }
//....
ionspin commented 6 months ago

Hello @sergeych , The wasmJs is only available in the snapshot, so you'll need to use the instructions for the snapshot build. There's no timeline when 0.3.10 is coming out.

Happy holidays!

ionspin commented 5 months ago

@sergeych 0.3.9 with wasmJs is out on maven, just FYI.

sergeych commented 5 months ago

Thanks! Was just thinking about it.

On Sun, 28 Jan 2024, 12:47 Ugljesa Jovanovic, @.***> wrote:

@sergeych https://github.com/sergeych 0.3.9 with wasmJs is out on maven, just FYI.

— Reply to this email directly, view it on GitHub https://github.com/ionspin/kotlin-multiplatform-bignum/issues/275#issuecomment-1913536236, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACJIILQDBPHOYK67BKAWT3YQYNCBAVCNFSM6AAAAABBHMFPJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGUZTMMRTGY . You are receiving this because you were mentioned.Message ID: @.***>