Commit Graph

104 Commits

Author SHA1 Message Date
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
Konstantin Hudyakov
6a4d2bff4f [terminal] IDEA-342678 Fix PowerShell initialization in projects with virtual env and conda env
GitOrigin-RevId: bffd94a96ffe0d7cf53eb0df6de12b4a41a6b65b
2024-01-29 17:03:15 +00:00
Andrey Cherkasov
1a62d88764 Cleanup: use light services
^IDEA-254577

GitOrigin-RevId: 01afb3f2166f8713cd4599f37d43ecf7f4d2944c
2024-01-23 06:03:51 +00:00
Ilya.Kazakevich
9d4751f238 [python, ds, jupyter]: Migrate Python support to V2
Layout:

  JPS modules
  `intellij.python.community`
  `intellij.python.community.impl`
  `intellij.python.parser`
  `intellij.python.psi`
  `intellij.python.psi.impl`
  `intellij.python.ast`
  use package `com.jetbrains.python`
  and go to `intellij.python.community.impl` v2 module

  JPS module
  `intellij.python`
  uses package `com.intellij.python.pro`
  and goes to `intellij.python/pro` v2 module

  Both v2 modules (along with lots of others) come with
  `PythonId` (prof) or `PythonCore` (community) plugins

  DS bundles  `intellij.python.community.impl`

  Idea and other Mini IDEs get `PythonCore` or `PythonId` plugin that bundle modules for Idea and mini IDEs

GitOrigin-RevId: 98f418c52d90d51b9adf3250c561f2c36c767e2d
2024-01-22 20:26:58 +00:00
Ilya.Kazakevich
5903ec85c4 Migrate python terminal to v2
GitOrigin-RevId: 690d4ead522e2153b89d1ab09ed2026237173160
2023-12-21 21:23:23 +00:00
Sergey Simonchik
5adb20dcc6 terminal: move bash integration to shell-integrations folder (IJ-CR-107365)
GitOrigin-RevId: 1a82bdc56211848e3c7f45d15e13ae2927e84185
2023-05-17 15:43:20 +00:00
Ilya.Kazakevich
93be54fc7d PY-58019: Support `pwsh.exe along with powershell.exe` in terminal activation.
``pwsh.exe`` is a new name for PowerShell 7.1. It is more or less backward compatible

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

GitOrigin-RevId: ddc8606b884a7b93bab93c0fc30e4f4b4230a095
2023-05-10 20:18:32 +00:00
Vladimir Krivosheev
227d75a1fc don't extend DynamicBundle
GitOrigin-RevId: 49cbebd629a92877dbeeffba8d97b0631fb9407e
2023-05-05 09:46:42 +00:00
Ilya.Kazakevich
9f5a2469ad PY-53890: Run powershell with execution policy `RemoteSigned` to support conda in the terminal activation
Merge-request: IJ-MR-104573
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: 92e1ebd9893968ece915c0f1ae12686c7d828ff6
2023-03-14 00:56:38 +00:00
Daniil Ovchinnikov
578eaaf60e rename library kotlin-stdlib-jdk8 -> kotlin-stdlib
GitOrigin-RevId: cddf45ccfd5563d3fe209bea62a1c37c94f44ff9
2023-01-10 12:22:34 +00:00
Valery Teplyakov
ebc066ac2d [fleet] Activate project virtualenv in terminal
FL-10630, FL-15640

GitOrigin-RevId: 3d32440dcf03bd079b29170ea29630849e87a8d2
2022-12-19 02:09:08 +00:00
Vladimir Lagunov
c0d5e73846 PY-57644 Escape characters in PowerShell Conda activator
GitOrigin-RevId: b45b6888327b7aa630106351b3ed673760fb41b7
2022-12-01 14:07:21 +00:00
Andrey Vokin
7fc185917b [PyCharm] use readAction for findSdkForDirectory
GitOrigin-RevId: 28bc6b35c25a212ad0de6490ab19e0696373597d
2022-11-18 14:51:53 +00:00
Ilya.Kazakevich
f0ae385d6b DS-3992: Activate local conda as virtual env (as we're done before).
This is a quick-and-dirty for terminals. Regular conda execution shouldn't be affected since we store python path in ``homePath`` now.

With this change, ``activate.bat`` read by IJ and vars (including ``PATH``) are passed to the terminal

GitOrigin-RevId: 711e5ea84519894ad3779626d4411196abb5a6b6
2022-11-03 21:37:24 +00:00
Ilya.Kazakevich
50ce0b803b Move conda in separate package (as part of refactoring)
GitOrigin-RevId: 9d93793cba64d0aa8352399cd7dd8a1537aec845
2022-09-26 13:53:11 +00:00
Vladimir Krivosheev
0af2e7b5c5 fix - reduce member visibility (public -> private)
GitOrigin-RevId: fe8a4740e27d192798a9fa55ff41112d1b633e49
2022-09-14 15:09:45 +00:00
Andrey Vokin
dad512ccde DS-3673 Interpreter widget doesn't show WSL interpreter
GitOrigin-RevId: bb7754bc6d30d2d9818acbb5cb522b758b78539f
2022-08-12 14:19:48 +00:00
Andrey Vokin
c34f3f30f4 DS-3673 Interpreter widget doesn't show WSL interpreter
GitOrigin-RevId: 6c709c7f4dce4226da9e5d9847b1030d7b836894
2022-08-11 08:35:59 +00:00
Andrey Vokin
3bb6f6204f DS-1661 Add working directory to customizeCommandAndEnvironment
DS-1661 New opened terminal sessions use the Workspace environment even though the opened folder has a different environment set in settings

GitOrigin-RevId: e47df9bc9b6ee65e85f0667f0390be7edce4a891
2022-07-08 09:09:25 +00:00