From 005032695d2103afd6f578be1cf55b06d7fa7b0a Mon Sep 17 00:00:00 2001 From: Vladimir Lagunov Date: Mon, 22 Jan 2024 13:57:04 +0100 Subject: [PATCH] IDEA-343180 Enable execution process in WSL with IJent The registry flag wsl.use.remote.agent.for.launch.processes becomes true All processes that are started in WSL through WSLDistribution.patchCommandLine will be running through IJent. IJent is a new daemon running on a remote machine that communicates with an IDE via RPC. IJent takes control on running processes on WSL, including a shell in a terminal. GitOrigin-RevId: beedd39ef1743f5c7875c59e6c18362dffad01d0 --- .../src/com/intellij/execution/wsl/WSLCommandLineOptions.java | 2 +- platform/ijent/resources/META-INF/IJent.xml | 2 +- .../src/com/intellij/execution/wsl/ProductionWslIjentManager.kt | 2 +- .../testSrc/com/intellij/execution/wsl/WSLDistributionTest.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/execution/src/com/intellij/execution/wsl/WSLCommandLineOptions.java b/platform/execution/src/com/intellij/execution/wsl/WSLCommandLineOptions.java index 40e8b7be4820..0503596f2654 100644 --- a/platform/execution/src/com/intellij/execution/wsl/WSLCommandLineOptions.java +++ b/platform/execution/src/com/intellij/execution/wsl/WSLCommandLineOptions.java @@ -15,7 +15,7 @@ import java.util.List; public final class WSLCommandLineOptions { - private boolean myLaunchWithWslExe = !Registry.is("wsl.use.remote.agent.for.launch.processes", false); + private boolean myLaunchWithWslExe = !Registry.is("wsl.use.remote.agent.for.launch.processes", true); private boolean myExecuteCommandInShell = true; private boolean myExecuteCommandInInteractiveShell = false; private boolean myExecuteCommandInLoginShell = true; diff --git a/platform/ijent/resources/META-INF/IJent.xml b/platform/ijent/resources/META-INF/IJent.xml index 41008c82f6b9..695e873f7a1c 100644 --- a/platform/ijent/resources/META-INF/IJent.xml +++ b/platform/ijent/resources/META-INF/IJent.xml @@ -13,7 +13,7 @@ key="wsl.use.remote.agent.for.launch.processes" os="windows" restartRequired="false" - defaultValue="false"/> diff --git a/platform/platform-impl/src/com/intellij/execution/wsl/ProductionWslIjentManager.kt b/platform/platform-impl/src/com/intellij/execution/wsl/ProductionWslIjentManager.kt index fa4eb3feaa23..4f57a78a6275 100644 --- a/platform/platform-impl/src/com/intellij/execution/wsl/ProductionWslIjentManager.kt +++ b/platform/platform-impl/src/com/intellij/execution/wsl/ProductionWslIjentManager.kt @@ -25,7 +25,7 @@ class ProductionWslIjentManager(private val scope: CoroutineScope) : WslIjentMan override val isIjentAvailable: Boolean get() { val id = PluginId.getId("intellij.platform.ijent.impl") - return Registry.`is`("wsl.use.remote.agent.for.launch.processes", false) && PluginManagerCore.getPlugin(id)?.isEnabled == true + return Registry.`is`("wsl.use.remote.agent.for.launch.processes", true) && PluginManagerCore.getPlugin(id)?.isEnabled == true } @DelicateCoroutinesApi diff --git a/platform/platform-tests/testSrc/com/intellij/execution/wsl/WSLDistributionTest.kt b/platform/platform-tests/testSrc/com/intellij/execution/wsl/WSLDistributionTest.kt index f33c47f8822a..74cc51acc0a0 100644 --- a/platform/platform-tests/testSrc/com/intellij/execution/wsl/WSLDistributionTest.kt +++ b/platform/platform-tests/testSrc/com/intellij/execution/wsl/WSLDistributionTest.kt @@ -86,7 +86,7 @@ class WSLDistributionTest { myExecuteCommandInLoginShell = true myExecuteCommandInShell = true myInitShellCommands = [] - myLaunchWithWslExe = true + myLaunchWithWslExe = false myPassEnvVarsUsingInterop = false myRemoteWorkingDirectory = null mySleepTimeoutSec = 0.0