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

Library lacks support for IR compiler #1481

Closed
mdahm opened this issue Jul 10, 2023 · 4 comments · Fixed by #1668
Closed

Library lacks support for IR compiler #1481

mdahm opened this issue Jul 10, 2023 · 4 comments · Fixed by #1668
Assignees
Labels
Milestone

Comments

@mdahm
Copy link

mdahm commented Jul 10, 2023

Affected Version

1.0.0

API

fluent

Platform

js

Kotlin Version

1.8.22

How to reproduce the problem?

 js(IR) {
    browser() {
      testTask {
        useKarma {
          useChromeHeadless()
          // Otherwise:
          // enabled = false
        }
      }

      commonWebpackConfig {
        this.outputFileName = "protokolle-webpack.js"
//mode = KotlinWebpackConfig.Mode.DEVELOPMENT
        cssSupport {
          enabled.set(true)
        }
      }
    }

    generateTypeScriptDefinitions()
    binaries.executable()
  }

Describe the bug

  • What went wrong:
    Could not determine the dependencies of task ':protokolle:jsTestPackageJson'.

Could not resolve all dependencies for configuration ':protokolle:jsTestNpm'.
Could not resolve ch.tutteli.atrium:atrium-fluent:1.0.0.
Required by:
project :protokolle
> No matching variant of ch.tutteli.atrium:atrium-fluent:1.0.0 was found. The consumer was configured to find a library for use during 'kotlin-runtime', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js', attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir' but:
- Variant 'jsApiElements-published' capability ch.tutteli.atrium:atrium-fluent:1.0.0 declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js':
- Incompatible because this component declares a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'legacy' and the consumer needed a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir'
- 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 'jsRuntimeElements-published' capability ch.tutteli.atrium:atrium-fluent:1.0.0 declares a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js':
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'legacy' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir'
- 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 'jvmApiElements-published' capability ch.tutteli.atrium:atrium-fluent:1.0.0:
- Incompatible because this component declares a component for use during compile-time, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- 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.js.compiler (required 'ir')
- Variant 'jvmRuntimeElements-published' capability ch.tutteli.atrium:atrium-fluent:1.0.0 declares a component for use during runtime:
- 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 'js'
- 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.js.compiler (required 'ir')
- Variant 'metadataApiElements-published' capability ch.tutteli.atrium:atrium-fluent:1.0.0:
- Incompatible because this component declares a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- 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.js.compiler (required 'ir')

  • Try:

Expected behaviour

New IR format should be supported...

@mdahm mdahm added the bug label Jul 10, 2023
@robstoll
Copy link
Owner

Thanks for the report 👍

@robstoll robstoll added this to the 1.1.0 milestone Jul 10, 2023
@robstoll robstoll self-assigned this Jul 10, 2023
@robstoll
Copy link
Owner

robstoll commented Jul 11, 2023

We will switch to IR with the drop of Kotlin 1.3, Atrium 1.1.0 will require Kotlin 1.4 but still support the kotlin 1.3 extension which will be dropped with Atrium 1.2.0. Once this happen we will be able to switch to IR -- I hoped we could already with 1.1.0 but the kotlin 1.3 extension is in the way -- Anyway, I plan to release a special version which does not include the kotlin 1.3 extension and already uses the IR compiler. Stay tuned...

@robstoll robstoll modified the milestones: 1.1.0, 1.2.0 Jul 14, 2023
@robstoll
Copy link
Owner

@mdahm v1.1.0-IR-alpha is out: https://github.com/robstoll/atrium/releases/tag/v1.1.0-IR-alpha

Let me know in case it doesn't work for you. I keep this issue open for the moment so that others see it was well

@robstoll
Copy link
Owner

@mdahm did it work out for you?

@robstoll robstoll linked a pull request Jan 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants