From 1dde545fd2fe0b377f4e6f706b4a41f8a4aa330e Mon Sep 17 00:00:00 2001 From: Anna Koehler Date: Sat, 13 Jul 2024 10:50:23 +0200 Subject: [PATCH] [func-tests] try to create a log file for kotlin daemon immediately, since it might cause a problem on Windows GitOrigin-RevId: 234df3b2eaadc3e594df281de81d7401c4580455 --- .../commands/EnableKotlinDaemonLogCommand.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/kotlin/kotlin.performanceExtendedPlugin/src/com/intellij/performance/performancePlugin/commands/EnableKotlinDaemonLogCommand.kt b/plugins/kotlin/kotlin.performanceExtendedPlugin/src/com/intellij/performance/performancePlugin/commands/EnableKotlinDaemonLogCommand.kt index dddbcd8d2c81..cc45c7647139 100644 --- a/plugins/kotlin/kotlin.performanceExtendedPlugin/src/com/intellij/performance/performancePlugin/commands/EnableKotlinDaemonLogCommand.kt +++ b/plugins/kotlin/kotlin.performanceExtendedPlugin/src/com/intellij/performance/performancePlugin/commands/EnableKotlinDaemonLogCommand.kt @@ -4,8 +4,6 @@ package com.intellij.performance.performancePlugin.commands import com.intellij.openapi.application.PathManager import com.intellij.openapi.ui.playback.PlaybackContext import com.jetbrains.performancePlugin.commands.PerformanceCommandCoroutineAdapter -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.withContext import org.jetbrains.kotlin.idea.compiler.configuration.KotlinCompilerWorkspaceSettings import java.io.File import kotlin.io.path.div @@ -21,10 +19,7 @@ internal class EnableKotlinDaemonLogCommand(text: String, line: Int) : Performan override suspend fun doExecute(context: PlaybackContext) { val project = context.project - val kotlinDaemonLog: File = (PathManager.getLogDir() / "kotlin-daemon.log").toFile() - withContext(Dispatchers.IO) { - kotlinDaemonLog.createNewFile() - } + val kotlinDaemonLog: File = (PathManager.getLogDir() / "kotlin-daemon.log").toFile().apply { createNewFile() } val compilerSettings = KotlinCompilerWorkspaceSettings.getInstance(project) val daemonDefaultVmOptions = compilerSettings.daemonVmOptions compilerSettings.daemonVmOptions =