PY-78035: Sort existing pythons for V2 "new interpreter" widget.

There is a list of `PythonSelectableInterpreter` which should be sorted and filtered.

`PythonSelectableInterpreter`s are comparable now: we can sort them by type (using `uiCustomization` hash) and then by language.

There is a `sortForExistingEnvironment` function that implements the core logic of this patch.

The test is `SortForExistingEnvironmentTest`, but we also run `DetectedSelectableInterpreterSortTest` several times to make sure the order is not broken.


Merge-request: IJ-MR-161055
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: 030e1b3fd171b2c41ca3473abde90607b95a9414
This commit is contained in:
Ilya Kazakevich
2025-04-24 14:43:04 +00:00
committed by intellij-monorepo-bot
parent f650f745fd
commit 4fa65266ab
8 changed files with 138 additions and 15 deletions

View File

@@ -148,5 +148,6 @@
<orderEntry type="module" module-name="intellij.platform.externalSystem.impl" />
<orderEntry type="module" module-name="intellij.platform.externalSystem" />
<orderEntry type="library" name="http-client" level="project" />
<orderEntry type="library" name="commons-lang3" level="project" />
</component>
</module>