mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
[python] executable cache in PythonSdkFlavor prevents from validating newly installed conda (PY-63084)
(cherry picked from commit 2b7e6c361fd1429f0ce94d271214c5e1f5bca23b) IJ-MR-129618 GitOrigin-RevId: 55551e94e651a953863e0766419e881220c0a45b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8cd2f21240
commit
984183cbea
@@ -199,6 +199,10 @@ public abstract class PythonSdkFlavor<D extends PyFlavorData> {
|
||||
}
|
||||
}
|
||||
|
||||
public static void clearExecutablesCache() {
|
||||
ourExecutableFiles.invalidateAll();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String getIdForCache(@NotNull String fullPath, @Nullable TargetEnvironmentConfiguration configuration) {
|
||||
var builder = new StringBuilder(fullPath);
|
||||
|
||||
@@ -42,6 +42,7 @@ import com.jetbrains.python.sdk.add.v2.PythonInterpreterSelectionMethod.SELECT_E
|
||||
import com.jetbrains.python.sdk.add.v2.PythonInterpreterSelectionMode.CUSTOM
|
||||
import com.jetbrains.python.sdk.add.v2.PythonSupportedEnvironmentManagers.VIRTUALENV
|
||||
import com.jetbrains.python.sdk.conda.CondaInstallManager
|
||||
import com.jetbrains.python.sdk.flavors.PythonSdkFlavor
|
||||
import com.jetbrains.python.sdk.flavors.conda.PyCondaEnv
|
||||
import com.jetbrains.python.sdk.flavors.conda.PyCondaEnvIdentity
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
@@ -375,6 +376,7 @@ fun Panel.executableSelector(executable: ObservableMutableProperty<String>,
|
||||
|
||||
internal fun createInstallCondaFix(presenter: PythonAddInterpreterPresenter): ActionLink {
|
||||
return ActionLink(message("sdk.create.conda.install.fix")) {
|
||||
PythonSdkFlavor.clearExecutablesCache()
|
||||
CondaInstallManager.installLatest(null)
|
||||
presenter.scope.launch(presenter.uiContext) {
|
||||
presenter.reloadConda(presenter.projectLocationContext)
|
||||
|
||||
Reference in New Issue
Block a user