Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c0d4ed1
Updated to the latest Kotlin dev version
nikpachoo Aug 4, 2025
bf2a81b
KT-80320 Removed -Wextra and -Xuse-fir-experimental-checkers CLI opti…
dkrasnoff Aug 21, 2025
8f9f8a6
Updated kotlin version to the latest dev
dkrasnoff Aug 21, 2025
f5c5916
Updated kotlin version to the latest dev
berezinant Sep 2, 2025
d587e08
chore: update Kotlin to 2.3.0-dev-6977
nikpachoo Sep 9, 2025
55e2ca4
fix: update test output
nikpachoo Sep 9, 2025
2a68884
Remove unnecessary version fields
dkrasnoff Aug 29, 2025
5809835
KTL-724 Added compiler arguments support
dkrasnoff Aug 29, 2025
2467e03
KTL-1220: Removed dev repositories
dkrasnoff Aug 7, 2025
3fd446f
Added running build with dev repository for kotlin-community/* branches
dkrasnoff Aug 7, 2025
b81e22f
KTL-1220: Ignored tests connected to completion.
dkrasnoff Aug 8, 2025
2667af6
KTL-1220: Removed idea dependencies from dependabot ignore list
dkrasnoff Aug 8, 2025
76a2558
KTL-1220: Removed jdk7 and jdk8 stdlib dependencies
dkrasnoff Aug 13, 2025
bb94bb3
Basic compilation with toolchains
zwiora Aug 22, 2025
d8ef185
Bump the kotlin version to 2.3.0-dev-4627
zwiora Aug 25, 2025
04d45fc
small fixes
dkrasnoff Aug 25, 2025
fad433b
small fixes
dkrasnoff Aug 25, 2025
7569027
small fixes
dkrasnoff Aug 25, 2025
5735e37
Adjust findMainClasses
zwiora Aug 26, 2025
e42b072
Implement deprecation warnings
zwiora Aug 26, 2025
374042f
Fix bytecode
zwiora Aug 26, 2025
d21b794
Fix exceptions
zwiora Aug 27, 2025
26017af
Fix displaying errors
zwiora Aug 28, 2025
6a191af
fix all tests except ResourceE2ECompileTest
zwiora Aug 29, 2025
b50ffb3
Compilation with CompilationService and CompilationLogger
zwiora Sep 3, 2025
9383be7
Fix returning multiple warnings
zwiora Sep 3, 2025
0410646
Update test to work with the new kotlin compiler version
zwiora Sep 3, 2025
35f983f
Add free arguments to toolchain compilation
zwiora Sep 4, 2025
1c37567
Use snapshot version
zwiora Sep 4, 2025
dbff4da
Get end position of log messages
zwiora Sep 5, 2025
2e78031
Add Xplugin argument
zwiora Sep 8, 2025
137f052
Clean compilation code
zwiora Sep 8, 2025
e983da7
Adjust to the new version of KotlinLogger
zwiora Sep 8, 2025
dbcd7e8
Switch to nightly version
zwiora Sep 16, 2025
34d2850
Bump the kotlin version to 2.3.0-dev-9070
zwiora Sep 22, 2025
fc19b2a
Fix gradle
Sep 24, 2025
f1d8893
Fix gradle unnecessary dependencies
Sep 24, 2025
ddecdff
Fix build
Sep 24, 2025
27e801f
Fix build in dependencies
Sep 24, 2025
09aed82
Adjust tests to the current kotlin version
zwiora Sep 24, 2025
90a72c2
Clean commented code in build
zwiora Sep 24, 2025
ba16ec1
Revert unnecessary changes
zwiora Sep 24, 2025
2d6398d
Add KOTLIN_VERSION_PLACEHOLDER in CompilerArgumentsEndpointTest resou…
zwiora Sep 24, 2025
80e52f4
Bump kotlin version to 2.3.0-dev-9111
zwiora Sep 24, 2025
2c29025
Adjustments for compilation benchmarks
zwiora Sep 26, 2025
1f1f84a
Revert "Adjustments for compilation benchmarks"
zwiora Sep 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ updates:
- dependency-name: "org.jetbrains.kotlin:kotlin-compiler"
- dependency-name: "org.jetbrains.kotlin:kotlin-reflect"
- dependency-name: "org.jetbrains.kotlin:kotlin-stdlib-js"
- dependency-name: "org.jetbrains.kotlin:kotlin-compiler-for-ide"
- dependency-name: "org.jetbrains.kotlin:kotlin-stdlib"
- dependency-name: "org.jetbrains.kotlin:kotlin-script-runtime"
- dependency-name: "org.jetbrains.kotlin:ide"
- dependency-name: "org.jetbrains.kotlin:idea"
- dependency-name: "org.jetbrains.kotlin:kotlin-test"
- dependency-name: "org.jetbrains.kotlin:core"
- dependency-name: "org.jetbrains.kotlin:common"
Expand Down
36 changes: 23 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ version = "${libs.versions.kotlin.get()}-SNAPSHOT"
val propertyFile = "application.properties"

plugins {
alias(libs.plugins.spring.dependency.management)
alias(libs.plugins.spring.boot)
alias(libs.plugins.spring.dependency.management)
alias(libs.plugins.kotlin.plugin.spring)
id("base-kotlin-jvm-conventions")
}
Expand All @@ -25,9 +25,6 @@ allprojects {
dependencies {
dependencies {
implementation(libs.jackson.module.kotlin)
implementation(libs.kotlin.idea) {
isTransitive = false
}
}
}
}
Expand All @@ -39,24 +36,26 @@ val resourceDependency: Configuration by configurations.creating {
}

dependencies {
annotationProcessor("org.springframework:spring-context-indexer")
implementation("com.google.code.gson:gson")
annotationProcessor(libs.spring.context.indexer)
implementation("org.springframework.boot:spring-boot-starter-web")
implementation(libs.springdoc)
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation(libs.aws.springboot.container)
implementation(libs.springdoc)
implementation(libs.gson)
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlin.compiler.arguments.description)
implementation(libs.junit)
implementation(libs.logback.logstash.encoder)
implementation(libs.intellij.trove4j)
implementation(libs.kotlin.reflect)
implementation(libs.bundles.kotlin.stdlib)
implementation(libs.kotlin.compiler)
implementation(libs.kotlin.script.runtime)
implementation(libs.kotlin.compiler.ide) {
isTransitive = false
}
implementation(libs.kotlin.core)
implementation(project(":executors", configuration = "default"))
implementation(project(":common", configuration = "default"))
implementation("org.jetbrains.kotlin:kotlin-build-tools-api:${libs.versions.kotlin.get()}")
implementation("org.jetbrains.kotlin:kotlin-build-tools-impl:${libs.versions.kotlin.get()}")
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:${libs.versions.kotlin.get()}")
implementation("org.jetbrains.kotlin:kotlin-tooling-core:${libs.versions.kotlin.get()}")

testImplementation(libs.kotlin.test)
testImplementation("org.springframework.boot:spring-boot-starter-test") {
Expand All @@ -77,6 +76,8 @@ fun buildPropertyFile() {

fun generateProperties(prefix: String = "") = """
# this file is autogenerated by build.gradle.kts
server.error.include-message=always
server.error.include-binding-errors=always
kotlin.version=${kotlinVersion}
policy.file=${prefix + policy}
indexes.file=${prefix + indexes}
Expand Down Expand Up @@ -131,7 +132,7 @@ val buildLambda by tasks.creating(Zip::class) {
from(libWasmFolder) { into(libWasm) }
from(libComposeWasmFolder) { into(libComposeWasm) }
from(libJVMFolder) { into(libJVM) }
from(compilerPluginsForJVMFolder) {into(compilerPluginsForJVM)}
from(compilerPluginsForJVMFolder) { into(compilerPluginsForJVM) }
from(libComposeWasmCompilerPluginsFolder) { into(libComposeWasmCompilerPlugins) }
into("lib") {
from(configurations.compileClasspath) { exclude("tomcat-embed-*") }
Expand Down Expand Up @@ -160,4 +161,13 @@ tasks.withType<Test> {
doFirst {
this@withType.environment("kotlin.wasm.node.path", executablePath)
}

// We disable this on TeamCity, because we don't want to fail this test,
// when compiler server's test run as a K2 user project.
// But for our pull requests we still need to run this test, so we add it to our GitHub action.
if (System.getenv("TEAMCITY_VERSION") != null) {
filter {
excludeTestsMatching("com.compiler.server.CompilerArguments*")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach
freeCompilerArgs.addAll(
"-Xreport-all-warnings",
"-Xrender-internal-diagnostic-names",
"-Xuse-fir-experimental-checkers"
)

allWarningsAsErrors.set(false)
extraWarnings.set(true)

// Adding additional cli options for testing purpose
project.providers.gradleProperty("kotlin_additional_cli_options").orNull?.let { options ->
Expand Down
6 changes: 2 additions & 4 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ plugins {
}

dependencies {
implementation(libs.kotlin.compiler)
implementation(libs.kotlin.gradle.plugin.idea)
implementation(libs.kotlin.base.fe10.analysis)
}
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:${libs.versions.kotlin.get()}")
}
4 changes: 2 additions & 2 deletions common/src/main/kotlin/component/KotlinEnvironment.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package component

import com.intellij.openapi.util.Disposer
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments
import org.jetbrains.kotlin.cli.common.arguments.parseCommandLineArguments
import org.jetbrains.kotlin.cli.common.arguments.toLanguageVersionSettings
Expand All @@ -19,9 +18,10 @@ import org.jetbrains.kotlin.js.config.JSConfigurationKeys
import org.jetbrains.kotlin.library.impl.isKotlinLibrary
import org.jetbrains.kotlin.serialization.js.JsModuleDescriptor
import org.jetbrains.kotlin.serialization.js.KotlinJavascriptSerializationUtil
import org.jetbrains.kotlin.serialization.js.ModuleKind
import org.jetbrains.kotlin.js.config.ModuleKind
import org.jetbrains.kotlin.utils.KotlinJavascriptMetadataUtils
import org.jetbrains.kotlin.wasm.config.WasmConfigurationKeys
import org.jetbrains.kotlin.com.intellij.openapi.util.Disposer
import java.io.File

// NOTE: if new class paths are added, please add them to `JavaExec` task's inputs in build.gradle.kts as well
Expand Down
20 changes: 9 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[versions]
kotlin = "2.2.20-RC2"
kotlinIdeVersion = "1.9.20-506"
kotlinIdeVersionWithSuffix = "231-1.9.20-506-IJ8109.175"
kotlin = "2.3.0-dev-9111"
spring-boot = "3.5.5"
spring-dependency-managment = "1.1.7"
springdoc = "2.8.13"
Expand Down Expand Up @@ -30,25 +28,19 @@ kotlin-stdlib-js = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-js",
kotlin-stdlib-wasm-js = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-wasm-js", version.ref = "kotlin" }
kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlin" }
kotlin-test-junit = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit", version.ref = "kotlin" }
kotlin-compiler = { group = "org.jetbrains.kotlin", name = "kotlin-compiler", version.ref = "kotlin" }
kotlin-compiler-arguments-description = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-arguments-description", version.ref = "kotlin" }
kotlin-script-runtime = { group = "org.jetbrains.kotlin", name = "kotlin-script-runtime", version.ref = "kotlin" }
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-gradle-plugin-idea = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin-idea", version.ref = "kotlin" }
kotlin-dom-api-compat = { group = "org.jetbrains.kotlin", name = "kotlin-dom-api-compat", version.ref = "kotlin" }
kotlin-compose-compiler-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-compose-compiler-plugin", version.ref = "kotlin" }
kotlin-base-fe10-analysis = { group = "org.jetbrains.kotlin", name = "base-fe10-analysis", version.ref = "kotlinIdeVersionWithSuffix" }
kotlin-compiler-ide = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-for-ide", version.ref = "kotlinIdeVersion" }
kotlin-idea = { group = "org.jetbrains.kotlin", name = "idea", version.ref = "kotlinIdeVersionWithSuffix" }
kotlin-core = { group = "org.jetbrains.kotlin", name = "core", version.ref = "kotlinIdeVersionWithSuffix" }
kotlinx-coroutines-core-jvm = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core-jvm", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinx-coroutines-test" }
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinx-datetime" }
kotlinx-io-bytestring = { group = "org.jetbrains.kotlinx", name = "kotlinx-io-bytestring", version.ref = "kotlinx-io" }
kotlinx-io-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-io-core", version.ref = "kotlinx-io" }
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
kotlinx-serialization-json-jvm = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json-jvm", version.ref = "kotlinx-serialization" }
kotlinx-serialization-core-jvm = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core-jvm", version.ref = "kotlinx-serialization" }
springdoc = { group = "org.springdoc", name = "springdoc-openapi-starter-webmvc-ui", version.ref = "springdoc" }
aws-springboot-container = { group = "com.amazonaws.serverless", name = "aws-serverless-java-container-springboot3", version.ref = "aws-serverless-java-container-springboot3" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
logback-logstash-encoder = { group = "net.logstash.logback", name = "logstash-logback-encoder", version.ref = "logstash-logback-encoder" }
intellij-trove4j = { group = "org.jetbrains.intellij.deps", name = "trove4j", version.ref = "trove4j" }
Expand All @@ -68,6 +60,12 @@ compose-material3 = { group = "org.jetbrains.compose.material3", name = "materia
compose-components-resources = { group = "org.jetbrains.compose.components", name = "components-resources", version.ref = "compose" }
kotlin-serialization-plugin = {group= "org.jetbrains.kotlin", name="kotlin-serialization-compiler-plugin", version.ref = "kotlin"}
gradle-develocity = {group = "com.gradle", name= "develocity-gradle-plugin", version.ref = "gradle-develocity"}
gson = { group = "com.google.code.gson", name = "gson"}

#spring stack dependencies
aws-springboot-container = { group = "com.amazonaws.serverless", name = "aws-serverless-java-container-springboot3", version.ref = "aws-serverless-java-container-springboot3" }
spring-context-indexer = { group = "org.springframework", name = "spring-context-indexer"}
springdoc = { group = "org.springdoc", name = "springdoc-openapi-starter-webmvc-ui", version.ref = "springdoc" }

[bundles]
kotlin-stdlib = ["kotlin-stdlib", "kotlin-stdlib-jdk7", "kotlin-stdlib-jdk8"]
Expand Down
4 changes: 1 addition & 3 deletions indexation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ plugins {

dependencies {
implementation(project(":common", configuration = "default"))
implementation(libs.kotlin.compiler.ide) {
isTransitive = false
}
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:${libs.versions.kotlin.get()}")
}

application {
Expand Down
56 changes: 33 additions & 23 deletions indexation/src/main/kotlin/DescriptorsUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package indexation
import model.ImportInfo
import model.Icon
import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.idea.imports.importableFqName
import org.jetbrains.kotlin.idea.util.IdeDescriptorRenderers
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.renderer.ClassifierNamePolicy
import org.jetbrains.kotlin.renderer.ParameterNameRenderingPolicy
Expand All @@ -13,34 +11,45 @@ import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
import org.jetbrains.kotlin.resolve.scopes.MemberScope
import org.jetbrains.kotlin.types.asFlexibleType
import org.jetbrains.kotlin.types.isFlexible
import org.jetbrains.kotlin.renderer.DescriptorRenderer

internal val renderer = IdeDescriptorRenderers.SOURCE_CODE.withOptions {
// Local replacement for IDEA's importableFqName
private val DeclarationDescriptor.importableFqNameOrNull: FqName?
get() = when (this) {
is PackageFragmentDescriptor, is PackageViewDescriptor -> null
is ConstructorDescriptor -> containingDeclaration.importableFqNameOrNull
is PropertyAccessorDescriptor -> correspondingProperty.importableFqNameOrNull
else -> DescriptorUtils.getFqNameSafe(this).takeIf { !it.isRoot }
}

internal val renderer = DescriptorRenderer.COMPACT.withOptions {
classifierNamePolicy = ClassifierNamePolicy.SHORT
typeNormalizer = IdeDescriptorRenderers.APPROXIMATE_FLEXIBLE_TYPES
parameterNameRenderingPolicy = ParameterNameRenderingPolicy.ALL
typeNormalizer = {
if (it.isFlexible()) it.asFlexibleType().upperBound
else it
// Approximate flexible types by their upper bound
typeNormalizer = { type ->
if (type.isFlexible()) type.asFlexibleType().upperBound else type
}
}

internal fun DeclarationDescriptor.toImportInfo(): ImportInfo? {
val importName = importableFqName?.asString() ?: return null
val importName = importableFqNameOrNull?.asString() ?: return null
if (name.asString() == "Companion") return null
return when (this) {
is FunctionDescriptor -> {
if (visibility.isPublicAPI) {
val returnTypeVal = if (returnType != null) renderer.renderType(returnType!!)
else {extensionReceiverParameter?.let { param ->
" for ${renderer.renderType(param.type)} in ${DescriptorUtils.getFqName(containingDeclaration)}"
} ?: "" }
ImportInfo(
importName = importName,
shortName = name.asString(),
fullName = name.asString() + renderer.renderFunctionParameters(this),
returnType = returnTypeVal,
icon = Icon.METHOD
) } else null
val returnTypeVal = if (returnType != null) renderer.renderType(returnType!!)
else {extensionReceiverParameter?.let { param ->
" for ${renderer.renderType(param.type)} in ${DescriptorUtils.getFqName(containingDeclaration)}"
} ?: ""
}
ImportInfo(
importName = importName,
shortName = name.asString(),
fullName = name.asString() + renderer.renderFunctionParameters(this),
returnType = returnTypeVal,
icon = Icon.METHOD
)
} else null
}

is ClassDescriptor -> {
Expand Down Expand Up @@ -72,8 +81,10 @@ internal fun DeclarationDescriptor.toImportInfo(): ImportInfo? {
internal fun DeclarationDescriptor.getInnerClassesAndAllStaticFunctions(): List<DeclarationDescriptor>? {
return if (this !is ClassDescriptor || !visibility.isPublicAPI)
null
else (unsubstitutedInnerClassesScope.getContributedDescriptors(DescriptorKindFilter.ALL, MemberScope.ALL_NAME_FILTER) +
staticScope.getContributedDescriptors(DescriptorKindFilter.ALL, MemberScope.ALL_NAME_FILTER)).distinct()
else (
unsubstitutedInnerClassesScope.getContributedDescriptors(DescriptorKindFilter.ALL, MemberScope.ALL_NAME_FILTER) +
staticScope.getContributedDescriptors(DescriptorKindFilter.ALL, MemberScope.ALL_NAME_FILTER)
).distinct()
}

internal fun ModuleDescriptor.allImportsInfo(): List<ImportInfo> {
Expand All @@ -91,9 +102,8 @@ internal fun ModuleDescriptor.allPackages(): Collection<FqName> {
val result = mutableListOf<FqName>()
fun impl(pkg: FqName) {
result += pkg

getSubPackagesOf(pkg) { true }.forEach { impl(it) }
}
impl(FqName.ROOT)
return result
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.compiler.server.api

import com.compiler.server.model.ExtendedCompilerArgumentValue
import com.fasterxml.jackson.annotation.JsonTypeInfo

data class CompilerArgumentResponse(val compilerArguments: Set<CompilerArgument>) {

data class CompilerArgument(
val name: String,
val shortName: String?,
val description: String?,
@field:JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "type")
val type: ExtendedCompilerArgumentValue<*>,
val disabled: Boolean,
val predefinedValues: Any?
)
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.compiler.server.api

import com.fasterxml.jackson.annotation.JsonIgnoreProperties

@JsonIgnoreProperties(ignoreUnknown = true)
data class ProjectFileRequestDto(val text: String = "", val name: String = "")
13 changes: 13 additions & 0 deletions src/main/kotlin/com/compiler/server/api/RunRequest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.compiler.server.api

import com.compiler.server.model.ProjectType
import com.compiler.server.validation.CompilerArgumentsConstraint
import com.fasterxml.jackson.annotation.JsonIgnoreProperties

@JsonIgnoreProperties(ignoreUnknown = true)
data class RunRequest(
val args: String = "",
val files: List<ProjectFileRequestDto> = listOf(),
@CompilerArgumentsConstraint(ProjectType.JAVA)
val compilerArguments: Map<String, Any> = emptyMap()
)
13 changes: 13 additions & 0 deletions src/main/kotlin/com/compiler/server/api/TestRequest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.compiler.server.api

import com.compiler.server.model.ProjectType
import com.compiler.server.validation.CompilerArgumentsConstraint
import com.fasterxml.jackson.annotation.JsonIgnoreProperties

@JsonIgnoreProperties(ignoreUnknown = true)
data class TestRequest(
val args: String = "",
val files: List<ProjectFileRequestDto> = listOf(),
@CompilerArgumentsConstraint(ProjectType.JAVA)
val compilerArguments: Map<String, Any> = emptyMap()
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.compiler.server.api

import com.compiler.server.model.ProjectType
import com.compiler.server.validation.CompilerArgumentsConstraint
import com.fasterxml.jackson.annotation.JsonIgnoreProperties

@JsonIgnoreProperties(ignoreUnknown = true)
class TranslateComposeWasmRequest(
val args: String = "",
val files: List<ProjectFileRequestDto> = listOf(),
@CompilerArgumentsConstraint(ProjectType.COMPOSE_WASM)
val firstPhaseCompilerArguments: Map<String, Any> = emptyMap(),
@CompilerArgumentsConstraint(ProjectType.COMPOSE_WASM)
val secondPhaseCompilerArguments: Map<String, Any> = emptyMap()
)
15 changes: 15 additions & 0 deletions src/main/kotlin/com/compiler/server/api/TranslateJsRequest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.compiler.server.api

import com.compiler.server.model.ProjectType
import com.compiler.server.validation.CompilerArgumentsConstraint
import com.fasterxml.jackson.annotation.JsonIgnoreProperties

@JsonIgnoreProperties(ignoreUnknown = true)
data class TranslateJsRequest(
val args: String = "",
val files: List<ProjectFileRequestDto> = listOf(),
@CompilerArgumentsConstraint(ProjectType.JS)
val firstPhaseCompilerArguments: Map<String, Any> = emptyMap(),
@CompilerArgumentsConstraint(ProjectType.JS)
val secondPhaseCompilerArguments: Map<String, Any> = emptyMap()
)
Loading