IJPL-172897 Rename EelDescriptor.{upgrade,toEelApi}

According to feedback, the name `upgrade` confuses people.

We refused `getEelApi` because this call usually implies a getter, and a getter usually implies some lightweight operation.

We refused `make`, `convert`, `get` and other short methods because they're as confusing as `upgrade`.

GitOrigin-RevId: 56adf5362f93bc4f98954db79c039e5e898b4550
This commit is contained in:
Vladimir Lagunov
2025-05-20 16:27:30 +00:00
committed by intellij-monorepo-bot
parent a404ba9362
commit 3fcec7e44c
48 changed files with 81 additions and 75 deletions
@@ -69,7 +69,7 @@ class PythonWithLanguageLevelImpl internal constructor(
}
override suspend fun getReadableName(): @Nls String {
val eelApi = pythonBinary.getEelDescriptor().upgrade()
val eelApi = pythonBinary.getEelDescriptor().toEelApi()
val home = eelApi.userInfo.home.asNioPath()
val separator = when (eelApi.platform) {
is EelPlatform.Windows -> "\\"
@@ -15,6 +15,6 @@ internal class SystemPythonInitialLoader : ProjectActivity {
override suspend fun execute(project: Project) {
if (getCacheTimeout() == null) return // Cache is disabled, no need to preload it
logger.debug("Preloading pythons for $project")
SystemPythonService().findSystemPythons(project.getEelDescriptor().upgrade())
SystemPythonService().findSystemPythons(project.getEelDescriptor().toEelApi())
}
}
@@ -53,7 +53,7 @@ internal class SystemPythonServiceImpl(scope: CoroutineScope) : SystemPythonServ
scope.launch {
_cacheImpl.complete(getCacheTimeout()?.let { interval ->
Cache<EelDescriptor, SystemPython>(scope, interval) { eelDescriptor ->
searchPythonsPhysicallyNoCache(eelDescriptor.upgrade())
searchPythonsPhysicallyNoCache(eelDescriptor.toEelApi())
}
})
}
@@ -47,7 +47,7 @@ class SystemPythonServiceShowCaseTest {
fun testListPythons(): Unit = timeoutRunBlocking(10.minutes) {
for (systemPython in SystemPythonService().findSystemPythons(forceRefresh = true)) {
fileLogger().info("Python found: $systemPython")
val eelApi = systemPython.pythonBinary.getEelDescriptor().upgrade()
val eelApi = systemPython.pythonBinary.getEelDescriptor().toEelApi()
val process = eelApi.exec.spawnProcess(systemPython.pythonBinary.pathString, "--version").eelIt()
val output = async {
(if (systemPython.languageLevel.isPy3K) process.stdout else process.stderr).readWholeText()