Commit Graph

656 Commits

Author SHA1 Message Date
Roman Shevchenko
63dd4ab11b [platform] replacing old Windows restarter with the new unified one (IJPL-34858)
GitOrigin-RevId: d76f3d239ee24444608d5c9edae88d95ddc843f0
2024-05-04 07:33:38 +02:00
Ilya.Kazakevich
ae0ed41348 [wslproxy]: survive closed socket, close socket correctly.
1.When remote side socket is closed, `SIGPIPE` might be sent. We must ignore and exit correctly (we can't die as we might accept more connections)

2. shutdown and close sockets will inform remote side that socket is closed. Without it, remote side may not notice anything until the next write.

GitOrigin-RevId: 51a6204651e49f63ac8b52d9e3e1e4928007c3ff
2024-05-01 21:06:34 +00:00
Roman Shevchenko
33df479eb8 [platform] ignoring "unknown drive" problems in the Defender configuration script (IJPL-37014)
GitOrigin-RevId: fbbaef70510d71c24d054851872118e32430bde4
2024-04-24 16:04:43 +00:00
Roman Shevchenko
a49624747f [platform] making the Defender configuration script resilient to missing excluded directories (IDEA-333056)
GitOrigin-RevId: e1d3c4813f65c88f08357bf6d0c0e1df7e502336
2023-11-24 11:11:48 +01:00
Ilya.Kazakevich
1ad4002475 CPP-35902: Fix SHELL variable when running under WSL with ttyfix
Due to https://github.com/microsoft/WSL/issues/10718 `SHELL` var is set to `ttyfix` breaking `gdb`.

We now:
1. Check if first argument (command to execute) is a valid shell and set `SHELL` accordingly
2. If not, check user default shell. Be it a valid shell, we use it
3. Unset `SHELL` otherwise

Review:
https://jetbrains.team/p/ij/reviews/118965/timeline

GitOrigin-RevId: 425b6886b4b48e29f653413c62326afa8033c694
2023-11-07 03:03:04 +00:00
Ilya.Kazakevich
5ac166f9bc wsltools: strip binaries to decrease size a little
GitOrigin-RevId: eacc71baa8de941c34fad1abe4eb101784806fca
2023-11-06 21:02:52 +00:00
Ilya.Kazakevich
44be55aeee IDEA-333736: Fix tty size for WSL
The problem:
https://github.com/microsoft/WSL/issues/10701

When stdout/err are redirected, WSL reports tty size as 1x1 which breaks `ps` tool (famous "expect trouble" message) that some people might have in profile.

`ttyfix` explicitly sets tty size and inserted by `WslDistribution`.

Tiny refactoring moved `getToolPath` to reuse it


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

GitOrigin-RevId: f33a906b139d22ecdaf0f1b0616ecaaf7bebdd16
2023-11-03 15:35:26 +00:00
Roman Shevchenko
8c0ffaaded [platform] using new restarter on Linux (IDEA-327235 prerequisite)
GitOrigin-RevId: ec238fb9cb8c21ffc6df8c393d45d8556c70bf96
2023-09-29 19:42:15 +00:00
Roman Shevchenko
d9dc08c673 [platform] using new restarter on macOS (IDEA-327235 prerequisite)
GitOrigin-RevId: 1c669198cd2d7a95358de8b79c7fb4256f2b8d1c
2023-09-28 22:39:56 +00:00
Artem Bochkarev
1d4e3aa898 IDEA-319117 call menuNeedsUpdate from menuWillOpen if necessary
and also remove unnecessary fillMenu() from menuWillOpen

GitOrigin-RevId: f7bf20c03fb629c08f66da2d21eb200cfdf728ad
2023-05-01 17:22:08 +00:00
Artem Bochkarev
ef91229aeb IDEA-315910 don't process key-events by NSMenu items
GitOrigin-RevId: 28b8d792bfe65bf8a468e17a199ca9445155c35f
2023-04-19 14:50:43 +00:00
Artem Bochkarev
1ea1c6f959 IDEA-315910 update binary
GitOrigin-RevId: 867a1cd5e6843f4dbd09231975c6feb492bb8c3b
2023-04-19 09:01:51 +00:00
Artem Bochkarev
ca6fa04dc4 IDEA-315910 update binary
GitOrigin-RevId: fdc37efa6e855c34bd7099c4063e577506ada743
2023-04-18 16:34:41 +00:00
Maxat Mansurov
29da655cee RUBY-31136 add option to WslSync for creating stubs for filtered out files.
(cherry picked from commit fdadb26083074b6e510df5c8b66bb3ee13bdb8c3)

IJ-CR-105378

GitOrigin-RevId: b5d0d16b1bba3802191775d9400b23205242238f
2023-03-27 21:47:10 +00:00
Ilya.Kazakevich
eb7bca7328 PY-59608: Support `wslproxy` when routing is broken by VPN.
fixup! PY-59608: Support ``wslproxy`` when routing is broken by VPN.

When user runs VPN with default gateway pointing to the VPN server and configures interface weight, we can't connect to WSL using its egress IP (traffic to ``172.0.0.0/8`` goes to VPN instead of WSL).

With ``wsl.proxy.connect.localhost`` enabled in registry we bind ``wslproxy`` to ``127.0.0.1`` which could be used in latest WSL2 to connect from Windows to Linux. It is a little bit slow, but still works.

fixup! PY-59608: Support ``wslproxy`` when routing is broken by VPN.
PY-59608: Support ``wslproxy`` when routing is broken by VPN.

When user runs VPN with default gateway pointing to the VPN server and configures interface weight, we can't connect to WSL using its egress IP (traffic to ``172.0.0.0/8`` goes to VPN instead of WSL).

With ``wsl.proxy.connect.localhost`` enabled in registry we bind ``wslproxy`` to ``127.0.0.1`` which could be used in latest WSL2 to connect from Windows to Linux. It is a little bit slow, but still works.


Co-authored-by: Vladimir Lagunov <vladimir.lagunov@jetbrains.com>

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

GitOrigin-RevId: 74b5ad4df9c5e95ca4ef53a465f07855a92aa324
2023-03-24 19:15:50 +00:00
Roman Shevchenko
21ecab3e0a [ui] following Defender rebranding in corresponding notifications (IDEA-298058)
GitOrigin-RevId: a13525c886b59bab9b19a92d005b5bbe2eb3da63
2023-03-02 13:49:04 +00:00
Maxat Mansurov
c609fb1643 RUBY-29825 add support for filters to wslhash.c.
Currently, filters support only includes and excludes of files matching the regex patterns. But it should be fairly easy to extend this with other types of filters in the future.

Reviewed-by: IJ-CR-102814

GitOrigin-RevId: 80b7e33aa4d6f89b8a9279d4aa2648783e363bf4
2023-02-28 15:35:14 +00:00
Maxat Mansurov
61bdde3cfa RUBY-29825 clean up wslhash.c sources.
- fixed uninitialized memory accesses
- use proper boolean constant
- reformat (naming, braces, ...)

Reviewed-by: IJ-CR-102814

GitOrigin-RevId: bf415ab0e135787ab6b99965c1443520c7dd590d
2023-02-28 15:35:11 +00:00
Roman Shevchenko
3593e6a1fa [platform] synchronizing WSL fsnotifier binaries with their Linux counterparts
GitOrigin-RevId: 77212e040e1caec7fec981157a74bf1a2fc45bc2
2023-02-10 11:07:10 +00:00
Roman Shevchenko
2b91210de7 [platform] correct population of initially empty Windows Defender exclusion list (IDEA-311426)
GitOrigin-RevId: d5180c7921253278c953a98017ea62369868082f
2023-02-02 09:27:24 +00:00
Roman Shevchenko
853ac54288 [platform] using the full path for invoking restart.py under Linux; preferring Python 3 (IDEA-279337)
GitOrigin-RevId: c8c0fd2ad25359b6ce55a1a20e5b8609efea6d1a
2023-01-16 19:36:19 +00:00
Roman Shevchenko
b0e2bc415f [platform] setting Windows Defender helper script diagnostic output encoding (IDEA-224689)
GitOrigin-RevId: a1d43d955ada2b2d70278337c5f6e8804f14a0a5
2023-01-16 11:39:04 +00:00
Roman Shevchenko
5c2eec522d [platform] changing the way the Windows Defender checker works (IDEA-298058)
GitOrigin-RevId: 64a290b7e8d7d56854bc7ae9f6d7f665be057285
2022-12-28 14:43:53 +00:00
Gregory.Shrago
7d5e20ae93 drop ancient and now dangerous "idea.ProcessCanceledException"
See IDEA-304945 and async action update.

GitOrigin-RevId: 7a10430fcdf52c65bd110114627fa5b0bb6b2a93
2022-11-12 11:47:44 +00:00
Ilya.Kazakevich
65a8ccb6c5 PY-57058: Skip interfaces with NULL addresses (wslproxy)
``ifaddrs->ifa_addr`` may be NULL according to ``getifaddr(3)``.

This is a case for the tailscale VPN at least

GitOrigin-RevId: 134cd2bcf03a01b6c52536e23b86a1135450d67b
2022-11-02 18:53:01 +00:00
Roman Shevchenko
4f73c9a0c3 [platform] getting rid of [somewhat speedier but nevertheless problematic] Windows FS helper
GitOrigin-RevId: 41b738ffb7c1fd3f4daf224782a9f2008a9d6b10
2022-10-17 20:12:21 +00:00
Roman Shevchenko
26c73abdee [vfs] even stricter input checks in macOS filesystem event helper (IJ-CR-95917)
GitOrigin-RevId: 53018f36f7a79d8d10cf1e5a569e18b707aeef99
2022-10-07 18:12:01 +00:00
Ilya.Kazakevich
e50e14ed8f Set TCP_NODELAY for `WSLProxy` to disable Nagle for interactivity
GitOrigin-RevId: 60995cbab5ab04ec5c1da3904b7311ead1a52aaf
2022-10-06 15:35:23 +00:00
Roman Shevchenko
514c4286a8 [vfs] stricter input checks in macOS filesystem event helper (IJ-CR-95917)
GitOrigin-RevId: 2515283e17942a43d570c8a9cba80d4d4b26d978
2022-10-05 10:11:50 +00:00
Roman Shevchenko
1c3fcb41fd [vfs] checking input bounds in macOS filesystem event helper (IDEA-302494)
GitOrigin-RevId: fb8a71627641018341b5040655f9508847c19b4f
2022-09-27 11:06:13 +00:00
Vladislav Rassokhin
90a833f4ee IDEA-296416 Add Windows ARM64 version of native binaries
`fsnotifier-wsl` is just copy of `../../linux/aarch64/fsnotifier`

GitOrigin-RevId: 106009c3731b42a2687ed05b353f6a0dd3f4b37f
2022-09-19 15:49:51 +00:00
Vladislav Rassokhin
9364c35ca2 [build-scripts] rearrange Windows binaries, arch-independent names of binary artifacts (IDEA-296416)
GitOrigin-RevId: daed16a5ad0a875d82e94e3908edbe1fe0af975f
2022-09-07 20:46:59 +00:00
Arseny.Chernyaev
00bf3987ff retrieve parent process id while obtaining processes list
(cherry picked from commit 70e08724586cc553aadfd250231688e0a3566d7c)

IJ-MR-94381

GitOrigin-RevId: 684864540480750d36cf51837300174cb1e927aa
2022-08-22 21:23:07 +00:00
Artem Bochkarev
f39cc03d92 IDEA-298038: avoid complete clearing of appmenu
GitOrigin-RevId: 8b1e4110839b1e35b606af62dac211c5d782712a
2022-08-02 10:52:45 +00:00
Artem Bochkarev
1cdfbcad75 IDEA-296486: minor correction (syntax)
fixed remark from review

GitOrigin-RevId: cc976db4791656b6429e250b8f3c3895d72724e1
2022-07-12 08:17:42 +00:00
Artem Bochkarev
289753525f IDEA-296486: remake renaming appmenu items
rename all items in single function call on AppKit without waiting

GitOrigin-RevId: 576a5b67f2620734e4d2ff65e651202ec3af1aa5
2022-07-11 19:07:23 +00:00
Roman Shevchenko
4d07e99dc1 [platform] updating Linux fsnotifier binaries with pinned artifacts
GitOrigin-RevId: 21d96dd91492bfb88fbb4c1dd2d28dbe04bd632e
2022-06-13 13:23:25 +00:00
Roman Shevchenko
825c930c50 [platform] arch-independent names of Linux binary artifacts
GitOrigin-RevId: cf35459a0cce96ba1b21b8462c784933f51d58e5
2022-06-13 10:34:02 +00:00
Artem Bochkarev
11c77aa610 IDEA-295159: obtain appmenu pointer on AppKit-thread
GitOrigin-RevId: a4ddefe47da198159fb64a2af2962083327e3344
2022-06-11 10:29:16 +00:00
Vladislav Rassokhin
0e8583fec9 [linux-menu] add libdbm for aarch64, rebuild for x86_64
GitOrigin-RevId: e294f90bca177e99765245e44e399f259b50e9fe
2022-05-30 07:56:36 +00:00
Vladislav Rassokhin
314890b18a IJI-844 Update fsnotifier for Linux to 222.2688
GitOrigin-RevId: 08e341d58df3609e41ee0857b87ec43097eab2cb
2022-05-30 07:56:11 +00:00
Roman Shevchenko
b9904cdf9f [platform] uniform I/O calls in macOS printenv; formatting (binary)
GitOrigin-RevId: eb9d1f07dbb3abb908d522d8e31f40fdd80be277
2022-04-22 21:52:56 +00:00
Ilya.Kazakevich
2ca053a0cc PY-50751: Custom tool for wsl sync: support of dir symlinks
Symlinks on Windows are junctions (since no UAC required), so only directory symlinks are supported.

GitOrigin-RevId: 9f9134d59597d2987a7c1b95602dc6e477651dfb
2022-04-10 15:01:25 +00:00
Anton Tarasov
838f4c5753 Add VM property to support JBR-4284
GitOrigin-RevId: 56ecc234d9a5952f9a156750fc2f4218ae9eb052
2022-03-23 16:09:12 +00:00
Artem Bochkarev
9d6334d012 IDEA-260857: dispose java wrapper after use
GitOrigin-RevId: a6a9da7a949db4617b959a98d2ac216360c489d4
2022-02-16 12:17:50 +00:00
Artem Bochkarev
847037b19b IDEA-260857: use localized strings for AppMenu items
GitOrigin-RevId: 0ad8adf523307a796b978cda0007482696d606c7
2022-02-16 10:26:29 +00:00
Artem Bochkarev
6212505851 IDEA-260857: implemented wrappers for AppMenu items
also cleanup warnings from native code

GitOrigin-RevId: 27081d0c43e59edd0d3b4747a132500e078354ad
2022-02-16 10:26:27 +00:00
Artem Semenov
0b1f451a41 IDEA-287926 Add -Djavax.swing.JTree.excludeAccessibleChildrenFromClosedNodes JVM option
(cherry picked from commit 6c14ce9bad399ded218ad9457124f81b0ac964e6)

IJ-CR-20375

GitOrigin-RevId: 8219f32520bcbc9c9c0b320e1034526277f3d6be
2022-02-08 12:32:38 +00:00
Artem Semenov
6664bdf74d IDEA-287926 Add -Djavax.swing.JTree.excludeAccessibleChildrenFromClosedNodes JVM option
(cherry picked from commit 661fcd965ab486d7981fb6c64ad55c0a35838f1b)

IJ-CR-20375

GitOrigin-RevId: 636fce1017d1f07152144e0279e8cc22d9952614
2022-02-08 12:32:36 +00:00
Ilya.Kazakevich
e23b3dcbc9 PY-50751: Custom rsync for WSL.
``rsync`` is slow because every file system access call from WSL to Windows and vice versa is slow.
We need to decrement number of such calls.

This approach does the following:
* Calculates hashes on Windows side using Intellij process
* Calculates hashes on WSL side using native Linux process
* Compares them searching for differences
* Splits different files into groups, tars each group and copies them on the other side.

From what I checked this is the fastest approach to sync WSL and Windows.

* How to use *

`WslSyncAction` is a temporary internal only action. Run it and try to sync some folder.

`WslSync` is a class with static method you can use to sync to folders.

GitOrigin-RevId: 6c63329d73ff32b7ee5e4436bfde39e72fe35a44
2022-02-04 23:47:52 +00:00