Repository navigation
Conversation
Signed-off-by: Jason Bell <[email protected]>
Signed-off-by: Jason Bell <[email protected]>
Signed-off-by: Jason Bell <[email protected]>
Signed-off-by: Jason Bell <[email protected]>
|
Thanks for pushing Windows forward, this is great to see. We cross-compiled 1.
Adding 2.
Swapping those for the wrappers ( 3. License headers on new files These new files start with the build tag and a two-line SPDX header instead of the canonical CONTRIBUTING asks for 4.
It might be cleaner to bump the existing With 1 and 2 fixed, plus a few small unix-only splits we've opened separately (#106, #107, #108), |
Signed-off-by: Bell8571 <[email protected]>
Signed-off-by: Bell8571 <[email protected]>
Signed-off-by: Bell8571 <[email protected]>
Part of Windows support (#68, coordinated on #81). Second small slice moving unix-only syscalls behind build tags; graphics stay with #82. `lspSocketpair` calls `syscall.Socketpair`, which does not exist on Windows, so `idelsp` fails to compile there. The unix implementation moves into a `!windows` file unchanged. On Windows it returns an explicit "language servers are not supported on Windows yet" error instead of the package failing to build. The transport also depends on `net.FileConn` and on handing the server one bidirectional handle as its stdin and stdout, neither of which carries over to Windows, so a real Windows transport (loopback pair with piped stdio) is a separate change. Linux and macOS are unchanged; `TestLSPSocketpairIsCloseOnExec` still pins the unix implementation. After this, the package's only remaining Windows compile error is the `Setpgid` process-group attribute, which the next slice handles. Signed-off-by: Eric Brooks <[email protected]>
…tening (#111) Part of Windows support (#68, coordinated on #81). Found by running a locally built `rune.exe` on Windows 11; graphics stay with #82. `newUnixListener` created `<dataDir>/sockets` only after `bind(2)` failed with `ENOENT`. On Windows, AF_UNIX reports a missing parent directory as `WSAENETDOWN` instead, so the directory was never created, every retry failed, and the home workspace's extensions never started. The directory is now created before the first bind; the retry loop keeps its stale-socket handling unchanged. Linux and macOS behave the same: the `ENOENT` path only ever created this directory, and `MkdirAll` on an existing one is a no-op. A new test starts a listener under a data directory that does not exist yet and checks the socket lands in `<dataDir>/sockets`. Verified natively: with this, #110 and the other Windows slices applied locally, a first launch on a fresh data directory logs zero errors and the socket file is created. Signed-off-by: Eric Brooks <[email protected]>
…109) Part of Windows support (#68, coordinated on #81). First runtime fix found by running a locally built `rune.exe` on Windows 11; graphics stay with #82. The data directory, workspace server log and default config paths were built with `path.Join`, which always joins with a forward slash, so on Windows they came out as `C:\Users\me/.rune`. They now use `filepath.Join`. Linux and macOS are unchanged: both functions join the same way there. `extensionsCmdDir` was `"/tmp"`, which is not an absolute path on Windows. It resolved under the home directory to `C:\Users\me\tmp`, which does not exist, so building the home workspace's extensions executor failed and the window stayed blank. It stays `"/tmp"` on unix and is `os.TempDir()` on Windows. New tests pin both on every OS: the defaults match `filepath.Join`, and `extensionsCmdDir` is an absolute directory that exists. On Linux `path.Join` and `filepath.Join` agree, so these cannot fail there before the change; they fail on Windows without it, as does the existing `TestResolveDefaultConfigPathPrefersYAMLThenStar`. Signed-off-by: Eric Brooks <[email protected]>
…106) Part of Windows support (#68, coordinated on #81). First of a few small slices that move unix-only syscalls behind build tags so the tree compiles for `GOOS=windows`; graphics stay with #82. `cmd/rune/main.go` referenced `syscall.SIGURG` and `unix.Dup2`, and the ssh workspace's signal map referenced `SIGUSR1`/`SIGUSR2`. None of these exist on Windows, so both packages fail to compile there. The unix bodies move into `!windows` files unchanged. Windows gets small counterparts: `SIGURG` never arrives, the launch log takes over the standard error handle with `SetStdHandle` (which the runtime also consults for fatal writes, so crash output lands in the log too), and `USR1`/`USR2` are simply absent from the map. Behavior on Linux and macOS is unchanged. New tests pin the `SIGURG` check and the forwarded user signals. Signed-off-by: Eric Brooks <[email protected]> Signed-off-by: ernestrc <[email protected]> Co-authored-by: ernestrc <[email protected]>
Part of Windows support (#68, coordinated on #81). Found by running a locally built `rune.exe` on Windows 11; graphics stay with #82. The firstmover lock is a unix socket. When a leader dies without removing it, the next process gets an address-in-use error from `bind(2)` and falls back to following, then to a coup once the dead leader stays unresponsive. That check used `syscall.EADDRINUSE`, which on Windows is an invented Go errno rather than the Winsock `WSAEADDRINUSE` that bind returns, so the error was treated as unexpected and the service gave up. After any run that did not exit cleanly, every storage user failed on the next launch: session history, window size and position, installed packages. Windows now also matches `WSAEADDRINUSE`, and the lock directory is created before the first bind, since Windows reports a missing parent directory as `WSAENETDOWN` rather than `ENOENT` (same shape as #111). Signed-off-by: Eric Brooks <[email protected]> Signed-off-by: ernestrc <[email protected]> Co-authored-by: ernestrc <[email protected]>
Part of Windows support (#68, coordinated on #81). Third slice; graphics stay with #82. Four call sites built `syscall.SysProcAttr` literals with `Setpgid`, `Setsid` and `Setctty`, and the file scheme killed process groups with `syscall.Kill`. None of these exist on Windows, so `workspace`, `workspacerpc`, `extensionv2`, `idedebug` and `vte` fail to compile there. This collects them in a small `internal/procattr` package: `NewGroup`, `NewSession`, `LeadsGroup`, `KillGroup` and `Signal`. The unix implementations are the old code moved unchanged, including `killProcessGroup` from the file scheme. On Windows a new group is `CREATE_NEW_PROCESS_GROUP`, a group is killed with `taskkill /T /F` (which walks the process tree, with "not found" mapped to `os.ErrProcessDone` like `ESRCH` on unix), sessions and controlling terminals do not exist, and `Signal` supports `SIGKILL` only. Linux and macOS are unchanged: the existing process-group tests in `file_scheme_test` and `workspace_runner_test` pass as before, and new tests pin that the helpers build exactly the attributes the literals built. The Windows-tagged tests cover the `taskkill` arguments and the group check; `GOOS=windows go vet ./internal/procattr/` passes. `idelsp`'s single `Setpgid` literal is deliberately left alone here because #107 touches the same file's imports; it becomes a one-line follow-up once both land. Signed-off-by: Eric Brooks <[email protected]> Signed-off-by: ernestrc <[email protected]> Co-authored-by: ernestrc <[email protected]>
Draft first slice of Windows graphics support. Companion issue: #81 (comment)
This PR
internal/term/gui/wingfx— per-monitor DPI v2, dark title bar, rounded corners, Mica (Win11) / Acrylic (Win10)internal/term/gui/gui_native.go—prepareNativeWindow+applyNativeWindowEffects(no-op off Windows)internal/term/gui/font/emoji_windows.go— Segoe UI Emoji / Noto Color Emoji search pathsWire-up in
gui.go(two calls only):