kotlinx-cli icon indicating copy to clipboard operation
kotlinx-cli copied to clipboard

macos_arm64 not ready

Open xzayda opened this issue 2 years ago • 5 comments

Please add this target to module configuration as Kotlin 1.5.30 now supports it. Currently using this lib in native build on Apple Silicon M1 results in following error

   > Could not resolve org.jetbrains.kotlinx:kotlinx-cli:0.3.3.
     Required by:
         project :flowstorm-client-app
      > No matching variant of org.jetbrains.kotlinx:kotlinx-cli:0.3.3 was found. The consumer was configured to find a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'macos_arm64' but:
          - Variant 'jsIrApiElements-published' capability org.jetbrains.kotlinx:kotlinx-cli:0.3.3 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 attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'macos_arm64')
          - Variant 'jsIrRuntimeElements-published' capability org.jetbrains.kotlinx:kotlinx-cli:0.3.3:
              - Incompatible because this component declares a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'macos_arm64')
          - Variant 'jsLegacyApiElements-published' capability org.jetbrains.kotlinx:kotlinx-cli:0.3.3 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 attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'macos_arm64')
          - Variant 'jsLegacyRuntimeElements-published' capability org.jetbrains.kotlinx:kotlinx-cli:0.3.3:
              - Incompatible because this component declares a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'macos_arm64')
          - Variant 'jvmApiElements-published' capability org.jetbrains.kotlinx:kotlinx-cli:0.3.3 declares an API of a component:
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'macos_arm64')
          - Variant 'jvmRuntimeElements-published' capability org.jetbrains.kotlinx:kotlinx-cli:0.3.3 declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'macos_arm64')
          - Variant 'linuxX64ApiElements-published' capability org.jetbrains.kotlinx:kotlinx-cli:0.3.3 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 'linux_x64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_arm64'
          - Variant 'macosX64ApiElements-published' capability org.jetbrains.kotlinx:kotlinx-cli:0.3.3 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 'macos_x64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_arm64'
          - Variant 'metadataApiElements-published' capability org.jetbrains.kotlinx:kotlinx-cli:0.3.3 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 'common' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'macos_arm64')
          - Variant 'mingwX64ApiElements-published' capability org.jetbrains.kotlinx:kotlinx-cli:0.3.3 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 'mingw_x64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_arm64'

xzayda avatar Sep 07 '21 12:09 xzayda

Piggybacking on this to also request the linuxArm64 target. Can a maintainer comment on any potential blockers? I'm happy to take a stab at this

ethanmdavidson avatar Nov 20 '21 23:11 ethanmdavidson

Hello, @ethanmdavidson! Do you use linuxArm64 in multiplatform projects with jvm and/or js target at the same time or do you have only native targets in project?

MacosArm64 will be supported, there is no blockers, we just need to add extra setting for deployment. linuxArm64 has another position, so it'd be great to understand your use case.

LepilkinaElena avatar Nov 22 '21 07:11 LepilkinaElena

For the project I have in mind, native targets are the priority. However, supporting jvm and js targets would also be desirable. The use case here is a CLI tool which can also be embedded in jvm/js projects.

Also, the project description says it is "Platform-agnostic" and "can be used in any Kotlin project", which in my mind means it should support every platform that Kotlin can target.

ethanmdavidson avatar Nov 22 '21 15:11 ethanmdavidson

Also, the project description says it is "Platform-agnostic" and "can be used in any Kotlin project", which in my mind means it should support every platform that Kotlin can target.

It's true, but I ask with another goal. At least in the current moment there is such an opportunity for native targets, so you don't need published target. The future of this option is under the question right now, so I can't say that it's very reliable, but at least as temporary workaround you now can use it for native targets you need. But if there are jvm and js you need use gradle dependencies, and these two approaches are impossible to combine, then you really need to wait published target.

LepilkinaElena avatar Nov 23 '21 09:11 LepilkinaElena

@LepilkinaElena hi, I'm using linuxArm64 in a kotlin-native project. I'm only targeting native builds to linux arm64 in my project https://github.com/mvysny/solar-controller-client/ . I've filed a separate feature request for linuxArm64 support: #89

mvysny avatar Mar 21 '23 11:03 mvysny