Did you manage to get any progress on EAP support?
# fun-adaptive
l
Did you manage to get any progress on EAP support?
t
Yes, I 'm working on that on daily basis, and solved almost everything. There there is one problem open, the JS compiler linker throws an error, I'm about to put some hours into that right now.
Fixed that one as well. This is for base 2.2.0, now I have to • upgrade to EAP (which I think will be much easier, the big changes were between 2.1 and 2.2) • figure out how to keep the "stable" and EAP versions synchronised over time • figure out how to publish the EAP version to some snapshot repository
l
I tend to update to the latest EAP within a day of its release. Especially now since I'm working with them to test the reintroduction of smart completion with K2.
t
Well, to be honest, I cannot actually guarantee that I upgrade to the latest EAP in a day: • Sometimes the changes takes time to implement, of course the EAP will introduce changes more gradually than a big release, but still. • AFAIK iOS target must be built on Mac OS, so it is not easy to release with an automatic CD/CI That said, changes that actually break compiler plugins are not that frequent. And it is actually possible to use previous versions of the plugin until one such change comes around. I wonder how other compiler plugin developers handle this, I'll ask on #C7L3JB43G
I wonder how Compose keeps up.
l
Thanks
t
So, 2.2.0 works and I've been able to publish a snapshot release for that. However, 2.2.20-Beta1 crashes, I'll have to check why.
I've got to the point where I think my code is OK with 2.2.20-Beta1. Ktor throws an exception related to coroutines, probably because the Kotlin 2.2.20-Beta1 depends on coroutines 1.10.2 and I haven't figure out which Ktor version should I use for that.
l
Did you upload it so I can try?
t
It is publishing just now, I'll try with the example project first so I can see that it works. Had to upgrade Ktor to 3.2.2.
It's there and the example project seems to be working with it. Version:
0.25.719+2.2.20-Beta1-SNAPSHOT
There is one breaking change: if you have a service implementation you have to add a
@ServiceProducer
annotation to the class. I'll update the documentation later today or tomorrow morning. Kotlin: 2.2.20-Beta1 Coroutines: 1.10.2 Ktor: 3.2.2
I'm actually quite happy I did this, it had to be done anyway and now it is behind me. 🤓
l
Thanks. I'll take a look tonight.
I'll let you know how it goes.
@Tóth István Zoltán OK, I'm testing now. Are you saying that
0.25.719+2.2.20-Beta1-SNAPSHOT
should go in the version field? Like so?
Copy code
plugins {
    id 'org.jetbrains.kotlin.js'
    id 'fun.adaptive' version '0.25.719+2.2.20-Beta1-SNAPSHOT'
}
t
Yes, also for the dependencies.
l
Interesting. I'm getting an error saying that the version cannot be found. If I change the version back to the original one, the error no longer appears. Is this on a different repository?
t
You have to add the maven central snapshot repository for this:
Copy code
/*
 * Copyright © 2020-2024, Simplexion, Hungary and contributors. Use of this source code is governed by the Apache 2.0 license.
 */
rootProject.name = "adaptive-mpw-example"
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

pluginManagement {
    repositories {
        mavenCentral()
        gradlePluginPortal()
        maven("<https://central.sonatype.com/repository/maven-snapshots/>")
    }
}

dependencyResolutionManagement {
    repositories {
        mavenCentral()
        maven("<https://central.sonatype.com/repository/maven-snapshots/>")
    }
}
The example project
eap-0.25.719-2.2.20-Beta1
branch worked for me.
l
I have maven central. I don't have
central.sonatype
though. I'm getting errors trying to add it. This is on me though, I just don't understand what gradle is telling me, because gradle is a black box to me.
t
I think you just have to convert it into groovy. This is in settings.gradle, not in build.
I typically fight tooth and nail until the gradle config works and then put it into a pedestal and do not touch it as long as possible. :D
l
Yeah, I know what, but I would have expected the
maven
function to exist there too. But it tells me it can't find the function
maven()
.
t
I think it would look like this in groovy: maven { url "https://central.sonatype.com/repository/maven-snapshots/" }
l
Woah. Thanks. That seems to have worked better.
Slightly better at least.
After adding the
enableFeaturePreview
, I'm getting this error:
Copy code
org.gradle.api.internal.catalog.GeneratedClassCompilationException: Unable to compile generated sources:
  - File RootProjectAccessor.java, line: 29, method getArray() is already defined in class org.gradle.accessors.dm.RootProjectAccessor
> Unable to compile generated sources:
    - File RootProjectAccessor.java, line: 29, method getArray() is already defined in class org.gradle.accessors.dm.RootProjectAccessor
t
I'm not sure you need that. I think I use that because I use library catalogs.
l
I see. I was hoping that triggered the other problem I had: It doesn't find the dependencies.
And yes, I added the repository to the regular repository list as well:
Copy code
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':kotlinNpmInstall'.
> Failed to query the value of task ':kotlinNpmInstall' property 'packageJsonFiles'.
   > Could not resolve all dependencies for configuration ':client-adaptive:client-adaptive-js:npmAggregated'.
      > Could not find fun.adaptive:core-ui:.
        Required by:
            project :client-adaptive:client-adaptive-js
And similar errors for all the others.
t
There is a double colon after core-ui 😄
And others as well, core-core doesn't have the double colon.
l
What. Can it be that easy?
Seems like it. Thanks. 🙂
OK, it's quite late. At least the dependency stuff works now. Now I can actuallt start looking at using it.