Commit Graph

122 Commits

Author SHA1 Message Date
Vitaly Legchilkin
84934e9e9e [python] (IJPL-205889) (BAZEL-2462) don't call getOrCreateAdditionalData for non-python sdks
+ add requirePythonSdk() verification for the Sdk extension functions, these methods are not designed to be called for non-python sdks and now will throw IllegalArgumentException.

also corrects dependency tree:
+ move PythonSdkUtil to the python.sdk module, remove dependency on psi.impl
+ create PySkeletonUtil for skeleton utils and leave it in the psi.impl

[python] (IJPL-205889) (BAZEL-2462) don't call getOrCreateAdditionalData for non-python sdks

+ add requirePythonSdk() verification for the Sdk extension functions, these methods are not designed to be called for non-python sdks and now will throw IllegalArgumentException

also corrects dependency tree:
+ move PythonSdkUtil to the python.sdk module, remove dependency on psi.impl
+ create PySkeletonUtil for skeleton utils and leave it in the psi.impl

GitOrigin-RevId: 20d958c5e15cc4e05545b2e61b126b5e015696ed
2025-10-10 18:17:28 +00:00
Nikolay Chashnikov
c3d006d45e [plugin model] use 'internal' visibility for content modules which are used from modules of other plugins (IJPL-207059)
These modules and their classes don't have external usages, so they shouldn't be made 'public' at least for now. The 'namespace' is also set to 'jetbrains' for plugins which contain such modules or modules which use them to allow 'internal' visibility to work.

GitOrigin-RevId: 198007e49320075dc27faadde6963e98332296a4
2025-10-08 18:39:06 +00:00
Ilia Kirianovskii
f43aa95086 [bazel] Update build files (IJI-3062)
GitOrigin-RevId: 98a67396a48bddc3d084cc93c50ae2f2017bfe8c
2025-09-29 00:11:15 +00:00
Vladimir.Koshelev
c5b44ca085 [python] PY-84398 get rid of package prefix in python modules.
It doesn't work. Sad, but true.

GitOrigin-RevId: c6cf4f2971ce813a2ce18afb2dcee22c2c5dad75
2025-09-26 15:15:29 +00:00
Vladimir.Koshelev
ba393efaa7 [python] PY-84398 get rid of embedded loading rules in PythonCore plugin, fix related issues
GitOrigin-RevId: 54f4bb333e0ca06a002a86c75f0bbc474863253e
2025-09-26 15:15:29 +00:00
Ilia Kirianovskii
e23fd3f184 [python] Add intellij.python.terminal._test module descriptor to run tests in dev-mode (IJPL-116621)
GitOrigin-RevId: 78265cfee46d31e3f0fa9be0c2f15677801ee9f1
2025-09-24 23:50:16 +00:00
Ilia Kirianovskii
6f8920da99 [bazel] Update build files (IJI-3062)
GitOrigin-RevId: 2394c1289e33945f7640f249b17cbf34b31fd695
2025-09-23 09:25:59 +00:00
Sergey Simonchik
4b817d5a92 [terminal] drop commandEndMarker after bundling latest ConPTY (IJPL-190952)
GitOrigin-RevId: ccfa2c9245cfafca020a3439ef765542389152ca
2025-09-17 08:18:33 +00:00
Ilia Kirianovskii
dc268560b6 [bazel] Update build files (IJI-2835)
GitOrigin-RevId: 275260ab73f59d3c08f0b4cb9f4c89b74054094a
2025-08-20 08:49:22 +00:00
Vladimir Krivosheev
c70092d737 IJPL-189625 fix uk.org.webcompere:system-stubs-jupiter - do not use outdated byte-buddy version
GitOrigin-RevId: b88c1660e07e9db6ac6868eac4fba9063f353011
2025-08-18 11:29:12 +00:00
Konstantin Hudyakov
ec841e40c7 Revert "[terminal] IJPL-199576 Add fake test back to terminal module to make tests pass"
This reverts commit a31d3f539b1b8eacd7b73ee3812db9c0e959e51b.

GitOrigin-RevId: 8c498f4c4659779e7646292da1303b42e9d68493
2025-08-04 17:26:14 +00:00
Konstantin Hudyakov
7a9c4fd586 [terminal] IJPL-199576 Add fake test back to terminal module to make tests pass
Existing teamcity builds use "Terminal Tests" configuration that relies on having tests in the `intellij.terminal` module.
This change will be reverted once we start using new run configuration in teamcity builds.

GitOrigin-RevId: a31d3f539b1b8eacd7b73ee3812db9c0e959e51b
2025-08-01 15:12:44 +00:00
Konstantin Hudyakov
afe39e9977 [terminal] IJPL-199576 Create separate module for tests
GitOrigin-RevId: ebe38532cb9274f84c6490a0b0d52a2eb251f017
2025-08-01 15:12:43 +00:00
Leonid Shalupov
cff76ea65e bazel: split test and build sections in convert jps to bazel:L update Bazel files
GitOrigin-RevId: 90063178de33c2a95bfdebd160a721d6977d8097
2025-07-18 16:18:47 +00:00
Ilya.Kazakevich
fd5d67817e PY-82318: Kill process that keeps python installation.
We create tmp dir in tests in a temporary dir and want to drop it then.

However, some background python process (I blame package manager cache) keeps this directory which prevents it from being deleted on Windows.

We now drop it.

GitOrigin-RevId: 35b3e1b75c1e3be7df1dd4e3b3fd155a24baff41
2025-07-01 16:48:04 +00:00
Ilya.Kazakevich
9e838edb33 PY-82318: Kill process that keeps python installation.
We create tmp dir in tests in a temporary dir and want to drop it then.

However, some background python process (I blame package manager cache) keeps this directory which prevents it from being deleted on Windows.

We now drop it.

GitOrigin-RevId: cd79c06b248916f479174bb4f83db781f7397eda
2025-06-30 21:03:54 +00:00
Ilya.Kazakevich
d1fcfa5850 PY-82318: Kill process that keeps python installation.
We create SDK in tests in a temporary dir and want to drop it then.

However, some background python process (I blame package manager cache) keeps this directory which prevents it from being deleted on Windows.

We now drop it.

GitOrigin-RevId: 36e2045e57e6cfae2f31465ae6d6d8e505d5edac
2025-06-30 04:48:09 +00:00
Evgenii Ilichev
06fb3e21e6 Update test definitions in BUILD.bazel
GitOrigin-RevId: 12636c0153e8909f9d9658a07278edac5ceb9c23
2025-06-18 19:05:49 +00:00
Ilya.Kazakevich
df6383ad88 PY-81497: Conda doesn't support spaces in paths.
We do not need quotes for zsh as we do not use spaces.

GitOrigin-RevId: f6870d5359aa1ae2c00b4a4c1a2e9d16cf32624c
2025-06-02 23:25:33 +00:00
Ilya.Kazakevich
288637a08e PY-81497: Conda doesn't support spaces in paths
https://github.com/conda/conda/blame/main/conda/core/prefix_data.py#L346

GitOrigin-RevId: 4f3959d2f36ea6bb44123b136192679311172d20
2025-06-02 18:56:26 +00:00
Vladimir Lagunov
87760e00c4 Eel cleanup: optimize imports
GitOrigin-RevId: fcf10b235485a79402805793d13150983e595e33
2025-05-20 16:27:30 +00:00
Vladimir Lagunov
123a0d6b38 IJPL-172897 EelApi: rename PtyOrStdErrSettings to InteractionOptions
The name `PtyOrStdErrSettings` is too specific. It literally contains all possible variants, so adding a new element would lead to confusion.

GitOrigin-RevId: ce5d4735b49d67e9b9f7900b9ee6e16268ad81a8
2025-05-20 16:27:30 +00:00
Andrii Zinchenko
5ace6d13eb [eel] IJPL-184988: Get rid of EelResult
- remove results from the channels

GitOrigin-RevId: 25c5ab5cfcc56c5bf62e53427e7702de1e3368a3
2025-05-15 08:24:55 +00:00
Andrii Zinchenko
24ca6b4997 [eel] IJPL-172897: remove "results" from EelExecApi
GitOrigin-RevId: a99ed91bdfd15c018d5e12542b991c401ac190e8
2025-05-13 21:59:42 +00:00
Vladimir Krivosheev
3616fb0a2f simplify bazel labels (another step towards using simple names that reflect directory structure) — handle camelCase case
GitOrigin-RevId: 709eafe49fcb3be48c50440ae19a08e083bc8cb3
2025-05-12 07:18:42 +00:00
Leonid Shalupov
ffa9fb5880 project model: do not re-export intellij.platform.testFramework.common
GitOrigin-RevId: 7d4f3c50f4a91c55af565e4cab5b6f74b20f4e10
2025-05-11 21:56:24 +00:00
Vladimir Krivosheev
6f8ff07ccc simplify bazel labels (another step towards using simple names that reflect directory structure)
GitOrigin-RevId: 12bfb2d0fa315d87c7a4ade363d0f834cf324b71
2025-05-08 16:58:30 +00:00
Vladimir Lagunov
e5dc14f056 Eel/IJent: Remove ability to terminate Windows processes
Initially, there was a common contract for Posix and Windows processes:
* kill: SIGKILL on Posix, TerminateProcess on Windows.
* interrupt: SIGINT on Posix, Ctrl+C on Windows.
* terminate: SIGTERM on Posix, a hack with ProcessExit on Windows.

The latter one is suspicious: it brings a non-existent feature to Windows processes, which, by the way, doesn't work reliably. Also, there was no demand for that feature: it was borrowed for granted from FSD.

Although java.lang.Process provide methods `destroy` and `destroyForcibly`, they do the same on Windows.

This commits removes the `terminate` method for Windows processes, to conform java.lang.Process abilities and to not provide unneeded functions.

GitOrigin-RevId: 3e0a9b90470e0110dd9afd2d90e0dc2f4e73ef0f
2025-05-08 13:33:15 +00:00
Andrii Zinchenko
a7e22b196b [eel] IJPL-172897: cleanup: remove deprecated exec api builder
GitOrigin-RevId: 4eee2a51401f229a57ac4f5057e078f57fc9bcb9
2025-04-08 16:10:58 +00:00
Ilia Kirianovskii
79a21079c1 [bazel] Update build files
GitOrigin-RevId: 8d9a1df0af34463753bd089b8d18d628d5758324
2025-04-03 08:22:59 +00:00
Ilya.Kazakevich
5e4396a97c PY-71499: Spaces in a conda env path break terminal action on **nix.
To activate conda on **nix, we provide a path to `active` script and a path to the env directory.

Terminal shell integration scripts then "source" `activate` providing an env path as an argument.

The latter is called `JEDITERM_SOURCE` env var, the former is `JEDITERM_SOURCE_ARGS`.

The problem is those integration scripts treat `JEDITERM_SOURCE_ARGS` as a list, so they use shell magic to break it into several arguments, so `/path/foo bar/` effectively presented as `['/path/foo', 'bar/']`.

To fix it, we introduce the ` JEDITERM_SOURCE_SINGLE_ARG ` key which means "do not explode argument."


(cherry picked from commit a0a7c7a7bc8789078dd6cf109f4fd4386c9b7da6)

IJ-MR-159065

GitOrigin-RevId: 0c44ce6c43b292f30a094ac79d5f5d7e8935935c
2025-04-03 00:12:19 +00:00
Ilya.Kazakevich
bbf5ce4eee Python: mark symbols internal to prevent external usage
GitOrigin-RevId: 7cf3e1dcd0313534a098a299e7ef093b851b997f
2025-03-31 20:37:05 +00:00
Vladimir Krivosheev
2826736b48 update bazel files
GitOrigin-RevId: 9a1f20bfe703fbdc66366dd15f45569df0688201
2025-03-28 18:42:12 +00:00
Ilya Kazakevich
ca46fea6b0 PY-78762: Activate conda in Powershell.
We used to use `Invoke-Expression` but then migrated to `&`.

However, a conda activation script is a command (code block), not a file, so we need to use `Invoke-Expression` as '&' doesn't support it.

We check if a file exists, and if it does -- we use '&' which is safe and fast. We use `Invoke-Expression` otherwise.


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

GitOrigin-RevId: ea0772b3f5f9641a85b542903c44c3b78aed0715
2025-03-28 14:51:58 +00:00
Ilya.Kazakevich
67f28a5033 PY-78762 (partially): Conda activation for PS cleanup:
1. Use a conda path from SDK
2. report error using echo

GitOrigin-RevId: 1e22cb84352eeada7a05f8fddecd841b9474d87f
2025-03-27 19:42:54 +00:00
Konstantin Hudyakov
582fb251ce [terminal] Fix PowerShell virtual env customizer test
The meaning of parameters of `LocalShellIntegrationInjector.injectShellIntegration` was changed in the scope of IJPL-176934.
So, the test was running with the shell integration of the New Terminal (Gen1).
Update the values to run it with the Classic Terminal shell integration.
But maybe it is worth adding the same test that will run with Reworked Terminal (Gen2) shell integration.

GitOrigin-RevId: 0bd43d4e1f65c7e42600d18d3b99b4177ea2639d
2025-02-07 08:38:52 +00:00
Vladimir Krivosheev
c3c21baac5 update bazel files
GitOrigin-RevId: 1a10e8174a47f688a95a93af0540f722462acd97
2025-02-03 11:42:18 +00:00
Ilya.Kazakevich
69d4f52dbb Python tests: move venv test fixture into a separate module
We finally decouple test framework from community impl

GitOrigin-RevId: 87178107f2fe785d295aca4cb46527634f465f90
2025-02-02 21:05:54 +00:00
Vladimir Krivosheev
b8245e1370 IJ-CR-146078 update bazel files
GitOrigin-RevId: 3bcfd10f71c84283bded464e142ead99edc6a278
2025-02-02 15:20:11 +00:00
Ilya.Kazakevich
88dc070d16 Python: move classes to access pythons created by setup-env script into right module.
We now store classes to access pythons installed by tests setup env right next to the script

GitOrigin-RevId: 922e5cfbb89e1e550679796e02deb24553ad6852
2025-02-02 07:05:23 +00:00
Ilya.Kazakevich
eab4466488 Python: move VirtualEnvReader out of psi-impl module
GitOrigin-RevId: c4d7bd0bf0c5592b13a2ccffcd217c1bae819637
2025-01-29 21:40:40 +00:00
Vladimir Krivosheev
f565c7eee8 update bazel files
GitOrigin-RevId: 6098b437c6d0239551d19af7bd631f5e372a8b48
2025-01-18 10:56:48 +00:00
Konstantin.Nisht
d100810ce6 [eel] IJPL-172897: Export intellij.platform.eel from intellij.platform.eel.provider, as an API module can be exported from the module with utilities
GitOrigin-RevId: 6819299595d2401de7451929e6e80169a81c5c10
2025-01-17 19:46:01 +00:00
Vladimir Krivosheev
9485392013 update bazel files
GitOrigin-RevId: c4c38c3273b34ae07b97f31a6f7d9ef80e7d6387
2025-01-12 14:08:41 +00:00
Ilya Kazakevich
7a430b2f54 PY-71633: Use call operator to execute PS terminal activation.
See `powershell-integration.ps1`.
Call operator is space-proof and more reliable.

Quote from MSDN:

>>>
Call operator `&`

Runs a command, script, or script block. The call operator, also known as the invocation operator, lets you run commands that are stored in variables and represented by strings or script blocks.
>>>

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_operators?view=powershell-7.4#call-operator-

We also add tests: as we do not have Windows tests in the platform, we use PyCharm infra.


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

GitOrigin-RevId: 6de26e0d88cff45e30d9354a96b62e8b00c7547a
2025-01-08 23:05:02 +00:00
Vladimir Krivosheev
0bc1cf1557 update bazel files
GitOrigin-RevId: 7320d3eff3aba093692ce66839c720ece6d7c4db
2024-12-30 11:28:24 +00:00
Vladimir Krivosheev
a522f96d66 do not export deps blindly (part 3)
GitOrigin-RevId: 7277ece9ded25f1111febc8dccaba9ac8cc75c21
2024-12-22 20:28:42 +00:00
Vladimir Krivosheev
98799639aa do not use _test as lib - test targets do not support this
GitOrigin-RevId: f2f49db4294b6a64040dbbd5f1d95e972cbd70a3
2024-12-15 18:32:30 +00:00
Vladimir Krivosheev
17916c90f8 libraries -> lib, resources, opt-in, test deps
GitOrigin-RevId: db66ee95dcb0f0553b40c9cc56cd6afed8634cdd
2024-11-27 13:53:42 +00:00
Egor.Eliseev
0c73c9eff9 PY-72274 separating content for python core/pro plugins
1. Delete `intellij.python.community.impl.xml` (move content to `PythonCore` plugin). It is necessary to fix incorrect dependencies: `PythonCore`, `Pythonid` include the same module.
2. Fixed dependencies: if some plugin/module needs Python core functionality, then it should depend on `PythonCore`.


Co-authored-by: Vladimir Koshelev <Vladimir.Koshelev@jetbrains.com>

Merge-request: IJ-MR-136158
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: ce9ed4c17f601ee1ca2b6cf608f4e30fdac1d879
2024-06-19 21:39:24 +00:00