-
Notifications
You must be signed in to change notification settings - Fork 164
Add PTY support to SWT #2025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PTY support to SWT #2025
Conversation
Currently there is no way to execute a process inside a PTY, the Program class only allows to execute a native program (what theoretically could be a Terminal Shell) but not access to a real terminal session. This now migrated the terminal support from CDT in a way that it could be used via SWT as an alternative to the Program class to execute a process in a terminal session.
Test Results 402 files - 143 402 suites - 143 25m 45s ⏱️ - 2m 7s For more details on these failures, see this check. Results for commit 9919870. ± Comparison against base commit f468eca. This pull request removes 74 tests.
|
No MacOS implementation? |
I see max os in the cdt repo so I would assume it is the same source like for linux there as it has no dedicated folder here ... (@jonahgraham might can confirm) |
Linux and macOS both use the unix directory in CDT: https://github.com/eclipse-cdt/cdt/tree/main/core/org.eclipse.cdt.core.native/native_src/unix with some ifdefs such as this |
@jonahgraham thanks for the insights, it is then the right time to drop old windows support. |
Optional dependencies to swt are quite nasty - as they have to be handled in non-osgi env, fragments and etc. As the jsvg example shows we would better stay away from that adventure again. Maybe go for eclipse.platform repo now. |
@akurtakov yes sadly that means we need to rewrite all native code something I'd like to avoid actually. |
I have now checked adding this to platform but this would mean we need to push new binaries, new fragments and so on for other supported architectures as well and setup builds. I therefore thing it might be better to go for a longer term solution here
this would bring the most benefit in the shortest time from my point of view with less effort and intermediate solutions. |
Should this one be closed now as using FFM is not on the table any time soon? |
Yes this can be closed in the meanwhile. |
Currently there is no way to execute a process inside a PTY, the Program class only allows to execute a native program (what theoretically could be a Terminal Shell) but not access to a real terminal session.
This now migrated the terminal support from CDT in a way that it could be used via SWT as an alternative to the Program class to execute a process in a terminal session.
The only new public API would be the
PTY
and theSpawner
(what maybe better is renamed toPTYProcess
).FYI @akurtakov @jonahgraham I have only migrated the relevant java parts, remove deprecated code and made some adjustments, omitted the conpty part for now (what could be provided as a separate fragment as it requires JNA and is only relevant for windows). The java code might also be more compacted but I first want to get general agreement on that we can actually integrate it here.
I also just committed the native sources as-is just to show how it looks like these need to be integrated into the native build and I could probably need some help here.