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

Error building KMM project for Arm64 simulator #96

Closed
nesfeder opened this issue Feb 1, 2022 · 8 comments
Closed

Error building KMM project for Arm64 simulator #96

nesfeder opened this issue Feb 1, 2022 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@nesfeder
Copy link

nesfeder commented Feb 1, 2022

Hey y'all, I'm experiencing a build error (see below for gradle log output) in my KMM project after adding

implementation("org.reduxkotlin:redux-kotlin-threadsafe:0.5.5")
implementation("org.reduxkotlin:redux-kotlin-thunk:0.5.5")

to my commonMain dependencies.

This seems to only be an issue for Arm64 simulator as the build passes when deploying to a physical device. Possibly similar to https://youtrack.jetbrains.com/issue/KT-49417?

> Task :shared:compileKotlinIosSimulatorArm64 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':shared:compileKotlinIosSimulatorArm64'.
> Could not resolve all files for configuration ':shared:iosSimulatorArm64CompileKlibraries'.
   > Could not resolve org.reduxkotlin:redux-kotlin-threadsafe:0.5.5.
     Required by:
         project :shared
      > No matching variant of org.reduxkotlin:redux-kotlin-threadsafe:0.5.5 was found. The consumer was configured to find a usage of 'kotlin-api' of a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'ios_simulator_arm64' but:
          - Variant 'iosArm64-api' capability org.reduxkotlin:redux-kotlin-threadsafe:0.5.5 declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_simulator_arm64'
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
          - Variant 'iosArm64-iosArm64MetadataElements' capability org.reduxkotlin:redux-kotlin-threadsafe:0.5.5 declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a usage of 'kotlin-metadata' of a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64' and the consumer needed a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_simulator_arm64'
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
          - Variant 'iosX64-api' capability org.reduxkotlin:redux-kotlin-threadsafe:0.5.5 declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_simulator_arm64'
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
          - Variant 'iosX64-iosX64MetadataElements' capability org.reduxkotlin:redux-kotlin-threadsafe:0.5.5 declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a usage of 'kotlin-metadata' of a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64' and the consumer needed a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_simulator_arm64'
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
          - Variant 'jsIr-api' capability org.reduxkotlin:redux-kotlin-threadsafe:0.5.5 declares a usage of 'kotlin-api' of a component:
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attributes:
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about its target Java environment (preferred optimized for non-jvm)
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_simulator_arm64')
...

Anything I can do to address this? I've also attached a sample project that reproduces the issue. And here's my iosApp config I'm using to run the build from Android Studio:
Screen Shot 2022-02-01 at 12 26 39 PM

Project to reproduce: MyApplication.zip

If y'all are already aware of this or a fix is known, please close this - I apologize if I missed it 😁

@Syrou
Copy link

Syrou commented Apr 9, 2022

Have a PR #103 for this waiting for approval

1gravity added a commit to 1gravity/redux-kotlin that referenced this issue Apr 15, 2022
- migrate to https://jmfayard.github.io/refreshVersions
- migrate to Android build tools 7.1.3
- migrate to Kotlin 1.6.20
- migrate to Gradle 7.4.2
- replace the Groovy publish script by a Kotlin script
- add iosSimulatorArm64 as target (fixes reduxkotlin#96)
@1gravity
Copy link

1gravity commented Apr 15, 2022

This repo doesn't seem to be maintained any more so I forked it and fixed this issue (plus did a good amount of migrations and refactoring) here https://github.com/1gravity/redux-kotlin. Since I can't publish under org.reduxkotlin I created new artifacts. You can test this and let me know if it works for you:

implementation("com.1gravity.redux:redux-kotlin-threadsafe:0.5.8-SNAPSHOT")

This also includes the redux-kotlin-thunk artifact because that one is a single file so I included it into the core library.
I can also create a pr for this repo if the maintainers want to integrate it.

@Syrou
Copy link

Syrou commented Aug 1, 2022

@1gravity I just referenced your fork in #94 to start perhaps adding compose to your fork, at the very least we probably should start looking into a more active fork

@1gravity
Copy link

1gravity commented Aug 3, 2022

@Syrou I saw that someone already took ownership of this repo. It's either adding compose functionality to my fork or merging all my changes back into this repo (I made a lot of changes). I guess it depends on how active the new maintainer is. I'm out for another 3 weeks and once I'm back I'll assess the best path forward.

@melbic
Copy link

melbic commented Jan 5, 2023

Any news here?

@mpetuska
Copy link
Member

All the missing kotlin targets were added and will be published with 0.6.0 release soon. Apologies for MASSIVE delays.

@mpetuska
Copy link
Member

Compose support will land as soon as compose 1.3.0 drops via https://github.com/reduxkotlin/redux-kotlin-compose

@mpetuska mpetuska added the enhancement New feature or request label Jan 16, 2023
@mpetuska mpetuska self-assigned this Jan 16, 2023
@mpetuska
Copy link
Member

Closed by #114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants