Use x/term on Unix systems, deduplicate tscreen_*.go#2
Use x/term on Unix systems, deduplicate tscreen_*.go#2niten94 wants to merge 4 commits intomicro-editor:legacyfrom
x/term on Unix systems, deduplicate tscreen_*.go#2Conversation
|
Unfortunately I've no MacOS for tests too. |
e0961ee to
e701458
Compare
|
I have split the changes into different commits since not all are similar.
Would it be possible if Zachary could test if bugs don't occur when running shell commands in Micro with this pull request, and if they do on the commit before e701458 (1482264)? I remember seeing old comments in issues where he seemed to have MacOS, but I'll re-add |
e701458 to
60065f3
Compare
|
Sorry, I realized that there were files I did not add so I added them now. |
60065f3 to
731bc08
Compare
|
I realized that it isn't easy to modify the fork to use the same workaround on Mac OS as upstream, even if someone can test. I should have realized this months ago and submitted the current changes while It's also not much needed to remove small amount of duplicated code, and the workaround on Mac OS doesn't need to be changed for now since there seems to be no bugs reported. |
Use Linux screen implementation on all Unix systems and remove other files except tscreen_darwin.go. The method to operate files on Mac OS used in the fork cannot be changed, due to lack of clear information and opportunity to test related issues.
731bc08 to
57a2541
Compare
|
I'll replace this PR with #3, because the changes weren't presented well and most comments were written by me about PR revisions. |
Reasons why
syscall.Syscall6(syscall.SYS_IOCTL, ...)has to be replaced are written below:Syscall(...)and Go 1.23 or newer has to be used withSYS_IOCTLsincesyscall(2)is removed in OpenBSD 7.5unsafe.Pointerhas to be converted touintptrin arguments like written in 4th pattern in documentationThere may be changes in any platform where using
syscall.Syscall*will not work, so calls are replaced with functions inx/sysandx/terminstead.Micro started up properly when I tested using an OpenIndiana and OpenBSD 7.6 VM. I do not have a MacOS machine so I cannot test if there are no bugs on MacOS. The changes may not be tested and thought well enough.
Fixes micro-editor/micro#3557