JetBrains / kotless

Kotlin Serverless Framework
Apache License 2.0
1.15k stars 57 forks source link

Is it possible to use kotliln 1.4 with kotless? #55

Open onema opened 4 years ago

onema commented 4 years ago

I tried deploying a test project using Kotlin 1.4.0 that otherwise deploys correctly using 1.3.72 but when I tried to deploy I get an error like this:

Unable to find method 'org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(Lorg/jetbrains/kotlin/com/intellij/openapi/project/Project;Ljava/util/Collection;Lorg/jetbrains/kotlin/resolve/BindingTrace;Lorg/jetbrains/kotlin/config/CompilerConfiguration;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Lorg/jetbrains/kotlin/com/intellij/psi/search/GlobalSearchScope;ILjava/lang/Object;)Lorg/jetbrains/kotlin/analyzer/AnalysisResult;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

Do I need to do something special to get it to work?

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import io.kotless.KotlessConfig.Optimization.MergeLambda
import io.kotless.plugin.gradle.dsl.KotlessConfig.Optimization.Autowarm
import io.kotless.plugin.gradle.dsl.kotless

plugins {
    id("org.springframework.boot") version "2.3.3.RELEASE"
    id("io.spring.dependency-management") version "1.0.10.RELEASE"
    id("io.kotless") version "0.1.6" apply true
    kotlin("jvm") version "1.4.0"
    kotlin("plugin.spring") version "1.4.0"
}

group = "test"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_11

repositories {
    mavenCentral()
    jcenter()
}

dependencies {
    //...
}

kotless {
    extensions {
        local {
            port = 8080
        }
        terraform {
            allowDestroy = true
        }
    }

    config {
        bucket = "test-bucket"

        terraform {
            profile = "default"
            region = "us-east-1"
        }
        optimization {
            mergeLambda = MergeLambda.None
            autowarm = Autowarm(false, 0)
        }
    }
}
TanVD commented 4 years ago

Actually, this is due to Kotlin 1.3.72 bundled in Gradle. I am researching for possible solutions. Hopefully, Gradle would release 6.7.* with Kotlin 1.4.0 soon. In that case it would be solved automatically

v3rm0n commented 4 years ago

Gradle 6.7 is out

TanVD commented 4 years ago

Yep, will be released with Kotless 0.1.7

gumil commented 3 years ago

When would the release be?