Tried 1.9.0-Beta on a (complex) MPP + Compose proj...
# eap
o
Tried 1.9.0-Beta on a (complex) MPP + Compose project, previously at 1.8.10. Got stuck with what looks similar to https://youtrack.jetbrains.com/issue/KT-58777. Is there any known workaround at this time? Anything I could try to proceed?
s
Investigating it later today! Are you using Gradle lazy Apis on Kotling Gradle Plugin entities? You might try of non lazy equivalent would work
This is an issue in the compose gradle plugin. It seems to be already fixed in master
I asked then about a new release, hopefully they will be able to do so soon
o
Yes, thank you so much for investigating at the speed of light! I have just checked the YT ticket, and I'll try to proceed with a local build of the Gradle plugin. Not sure if I can make it today, but as soon as I have something to report, I'll follow up here.
s
I checked a local build! Worked like a charm!
o
Same here, the build now correctly configures itself. Now going through supply chain security checks for changes in NPM packages... 🙃
Now I'm getting to the beef:
kotlinx.serialization compiler plugin internal error
, caused by an NPE... I'll investigate, but this is stuff for another topic. No further Gradle/MPP issues so far. Well done!
j
fwiw seems ok with
1.5.0-dev1057
The other issue here is the compose compiler version ....I've been trying
1.4.7-dev-k1.9.0-Beta-bb7dc8b44eb
androidx one...that works with Compose for Desktop but not web/ios.
o
I'm using the same Compose compiler version, but did not get far enough yet to run UI stuff. Any details to share what is not working on Web?
j
haven't looked too deeply yet but getting
Copy code
Querying the mapped value of map(task ':compose-web:jsBrowserDevelopmentRun' property 'inputFilesDirectory') before task ':compose-web:jsDevelopmentExecutableCompileSync' has completed is not supported
I'm slightly less concerned about current JS based compose for web one as hoping to move to using wasm in near future
btw I have been trying out wasm support in another project and in that one I'm using version
1.4.0-dev-wasm08
of JB compose compiler....and with that one in this project the Compose for iOS and Compose for Desktop clients are working!
maybe it's a sign that I need to move Compose for Web client in this project over to wasm sooner than planned 😃
o
I'm currently not seeing the above
Querying the mapped value
with parts of my project using Compose Web (UI/Canvas), but once I enable a sub-project using Compsose HTML, which imports the former I get some Gradle issues as well, which I've not yet looked into:
Copy code
* What went wrong:
Could not determine the dependencies of task ':frontend-js-dom:compileProductionExecutableKotlinFrontendJsDom'.
> Could not resolve all task dependencies for configuration ':frontend-js-dom:frontendJsDomRuntimeClasspath'.
   > Could not resolve project :base.
     Required by:
         project :frontend-js-dom
      > The consumer was configured to find a usage of 'kotlin-runtime' of a library, 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'. However we cannot choose between the following variants of project :base:
          - frontendJsUiPublicPackageJsonConfiguration
          - frontendJsUiRuntimeElements
          - koverArtifact
        All of them match the consumer attributes:
          - Variant 'frontendJsUiPublicPackageJsonConfiguration' capability com.example:base:0.0-SNAPSHOT declares a usage of 'kotlin-runtime' of a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir', attribute 'org.jetbrains.kotlin.platform.type' with value 'js':
              - Unmatched attributes:
                  - Provides attribute 'org.jetbrains.kotlin.js.public.package.json' with value 'public-package-json' but the consumer didn't ask for it
                  - Provides attribute 'targetName' with value 'frontendJsUi' but the consumer didn't ask for it
          - Variant 'frontendJsUiRuntimeElements' capability com.example:base:0.0-SNAPSHOT declares a usage of 'kotlin-runtime' of a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir', attribute 'org.jetbrains.kotlin.platform.type' with value 'js':
              - Unmatched attribute:
                  - Provides attribute 'targetName' with value 'frontendJsUi' but the consumer didn't ask for it
          - Variant 'koverArtifact' capability com.example:base:0.0-SNAPSHOT:
              - Unmatched attributes:
                  - Provides attribute 'kotlinx.kover.artifact.name' with value '' but the consumer didn't ask for it
                  - Provides attribute 'kotlinx.kover.kotlin.plugin' with value 'MULTIPLATFORM' but the consumer didn't ask for it
                  - Provides attribute 'kotlinx.kover.project.path' with value ':base' but the consumer didn't ask for it
                  - 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 its usage (required a usage of 'kotlin-runtime')
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'js')
        The following variants were also considered but didn't match the requested attributes:
          - Variant 'backendJvmApiElements' capability com.example:base:0.0-SNAPSHOT declares a library, preferably optimized for standard JVMs:
              - Incompatible because this component declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
          - Variant 'backendJvmRuntimeElements' capability com.example:base:0.0-SNAPSHOT declares a runtime of a library, preferably optimized for standard JVMs:
              - 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 attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
          - Variant 'backendJvmSourcesElements' capability com.example:base:0.0-SNAPSHOT declares a runtime of a component, preferably optimized for standard JVMs:
              - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
          - Variant 'frontendJsUiApiElements' capability com.example:base:0.0-SNAPSHOT declares a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir', attribute 'org.jetbrains.kotlin.platform.type' with value 'js':
              - Incompatible because this component declares a usage of 'kotlin-api' of a component and the consumer needed a usage of 'kotlin-runtime' of a component
          - Variant 'frontendJsUiSourcesElements' capability com.example:base:0.0-SNAPSHOT declares a usage of 'kotlin-runtime' of a component, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir', attribute 'org.jetbrains.kotlin.platform.type' with value 'js':
              - Incompatible because this component declares documentation and the consumer needed a library
          - Variant 'frontendJvmApiElements' capability com.example:base:0.0-SNAPSHOT declares a library, preferably optimized for standard JVMs:
              - Incompatible because this component declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
          - Variant 'frontendJvmRuntimeElements' capability com.example:base:0.0-SNAPSHOT declares a runtime of a library, preferably optimized for standard JVMs:
              - 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 attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
          - Variant 'frontendJvmSourcesElements' capability com.example:base:0.0-SNAPSHOT declares a runtime of a component, preferably optimized for standard JVMs:
              - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
          - Variant 'integrationJvmApiElements' capability com.example:base:0.0-SNAPSHOT declares a library, preferably optimized for standard JVMs:
              - Incompatible because this component declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
          - Variant 'integrationJvmRuntimeElements' capability com.example:base:0.0-SNAPSHOT declares a runtime of a library, preferably optimized for standard JVMs:
              - 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 attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
          - Variant 'integrationJvmSourcesElements' capability com.example:base:0.0-SNAPSHOT declares a runtime of a component, preferably optimized for standard JVMs:
              - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
          - Variant 'metadataApiElements' capability com.example:base:0.0-SNAPSHOT declares a library, preferably optimized for non-jvm:
              - Incompatible because this component declares a usage of 'kotlin-metadata' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
          - Variant 'metadataSourcesElements' capability com.example:base:0.0-SNAPSHOT declares a usage of 'kotlin-runtime' of a component, preferably optimized for non-jvm:
              - Incompatible because this component declares documentation, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'ir')
j
fwiw I've pushed changes I've made so far in to following branch https://github.com/joreilly/PeopleInSpace/tree/kotlin_1_9_beta
a
I'm now getting similar errors while migrating MVIKotlin from Kotlin 1.8.0 to 1.9.0 or 1.9.10. Though, I don't use Compose in this case. Filed: https://youtrack.jetbrains.com/issue/KT-62001