Changed directory name from 'script-errors' to 'errors' across multiple modules. This standardizes error directories' names and improves consistency.
GitOrigin-RevId: 222674fac4f850066abf0ab4d3fcddccd0e20ed6
`PythonSdkFlavor` detects pythons.
It uses `VirtualEnvReader` under the hood (see virtual env flavor) and system pythons (see other flavors).
We use it in `PythonLocalAddInterpreterModel` and cover it with tests
PY-74425 WIP, PY-74236: `VirtualEnvReader` shouldn't return `null` nor should it check for dir existence, use `getVEnvRootDir` as a default dir for venv.
The whole logic behind `VirtualEnvReader` is the following: we check for some env variable, and if it points to the correct path -- we use it. We fall back to the home directory otherwise.
Directory doesn't need to exist (hence, no need to check `isDirectory`) because a client might always create it.
Even worse: directory would probably not exist on a fresh OS, but a user still wants to create virtual envs there.
PY-74425 WIP: Encapsulate python names and patterns inside `VirtualEnvReader`.
`VirtualEnvReader` seems to be the main entry point to look for virtual envs on the local file system.
Historically, flavors did that, so they had a set of names and patterns to filter python by name, however:
1. `UnixPythonSdkFlavor` had named for **nix only, and `VirtualEnvSdkFlavor` had names both for Windows and **nix. It is unlikely to see a `.exe ` file on **nix or file, without an extension on Windows, so this check is useless and broken (`VirtualEnvSdkFlavor` checks for both names on both OSes)
2. `UnixPythonSdkFlavor` had regex to filter Python2, but this python was removed 4 years ago and could hardly be met on any new OS; hence this check is useless.
3. New Project Wizard needs to find pythons, but knows nothing about names and patterns.
Merge-request: IJ-MR-142040
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: ce649b4f12f7c7b60a25d8e1fb1222e075337844
This is an intermediate commit to preserve git file history.
The code doesn't compile yet.
KTIJ-30693
GitOrigin-RevId: 6a56798bc1b0396b519f15005f59e5cfee08c68b
Instead, implement the functionality via Kotlin declarations. Previously, it worked in a mixed mode: some declarations were provided via LC, some via Kotlin declarations.
Additionally, this change makes Kotlin "go to symbol/class" fully dumb-aware.
New behavior:
- All declarations are now provided via plain Kotlin declarations.
- No Light Classes are used:
- To avoid using LC, `PsiShortNamesCache` is adapted in a way that it can ignore `PsiShortNamesCache` implementations which are explicitly marked as producing generated declarations instead of existing Java-based PSI like `PsiClass`, `PsiMethod`, etc.
- `KotlinShortNamesCache` is marked as such, so it's ignored.
- As no resolve is used, all Kotlin contributors work in dumb mode.
- For facade declarations, like callables (functions or properties) from a facade or a facade class itself, new Kotlin contributors create new `PsiElementBasedNavigationItem`:
- It points to the original Kotlin declaration (or to a `KtFile` in the case of a facade class itself).
- In go to class/symbol action, duplicated declarations are merged with the original ones, so they are used only for text search purposes.
- It's reflected in the tesdata updates
- `GotoSymbolModel2.getFullName` is updated so it can handle not only `PsiElement` but also a `PsiElementNavigationItem`
- Behaviour of qualified name is stabilized:
- Previously, it produced `(in Container).Foo` for LC-based classes and `Container.Foo` for plain Kotlin classes.
- Now, it always produces `Container.Foo`
- It's reflected in the tesdata updates
^KTIJ-30913 fixed
^KTIJ-30842 fixed
GitOrigin-RevId: c671f6e161dd530e19e8abbbc7046f1cd121908d
+ IdIndex produces effectively (int->int) map, but indexes API forces it to be (IdIndexEntry->Integer), which involves a lot of boxing. Try to optimize out some of these boxing by specialized IdEntryMapExternalizer
GitOrigin-RevId: d535c1bc8f9c3eb9878588df8b817d12bd6b3afa
+ extract explicit int->int map wrapper (IdEntryToScopeMapImpl), extract an IdEntryToScopeMap interface for it
GitOrigin-RevId: cd2cc114425121a945bdf82e3e0ff7a5769a52b4
+ `-Didea.diagnostic.opentelemetry.metrics-reporting-period-ms=...`, with default=1 min (as before)
GitOrigin-RevId: 7220d207c555e458987d9e1d6e390f32bdca0fb4
cache isJavaIdentifier for ASCII characters
split array and CharSequence paths
specify some empirical initial capacity for the set
shorten the algorithm
GitOrigin-RevId: 43886096332ee00be145401a1d285dd41c66e852
This can cause unexpected and undesired changes to the files which should
not be considered sources and cannot be properly analyzed (testdata, for example).
The import optimizer might kick in when such files are moved between
folders or renamed.
^KTIJ-27447 Fixed
GitOrigin-RevId: 3b80e63d500f3780fc33334b0f10f0a9ed9bedc7