in src/main/kotlin/com/compiler/server/service/CompilerArgumentsService.kt [20:33]
fun getCompilerArguments(projectType: ProjectType): Set<ExtendedCompilerArgument> {
return cache.computeIfAbsent(projectType) {
when (it) {
ProjectType.JAVA, ProjectType.JUNIT -> jvmCompilerArguments
ProjectType.WASM -> wasmCompilerArguments
ProjectType.COMPOSE_WASM -> composeWasmCompilerArguments
ProjectType.JS_IR -> jsCompilerArguments
else -> throw ResponseStatusException(
HttpStatus.BAD_REQUEST,
"Unsupported projectType '$projectType' for compiler arguments discovery"
)
}.filterToSetOrEmpty { arg -> arg.supportedOnCurrentVersion }
}
}