Skip to content

Release v0.7.0 - #5

Merged
kackerx merged 105 commits into
mainfrom
release/v0.7.0
Oct 26, 2026
Merged

kackerx merged 105 commits into
mainfrom
release/v0.7.0

Conversation

@kackerx

@kackerx kackerx commented Oct 26, 2026

Copy link
Copy Markdown
Owner

M18: Windows and SQL Server

  • Windows: native Windows builds (amd64 and arm64) in the release and CI, now six binaries and six npm platform packages plus the meta package. The state.json lock, config and data paths, subprocess quoting (cmd.exe), the clipboard (PowerShell, UTF-8) and export file names are handled for Windows. Smoke-tested in ConPTY on a real Windows host.
  • SQL Server: a new engine (sqlserver:// / mssql:// DSN): connection form, tree (databases, schemas, tables), paging, transactions and savepoints, T-SQL AutoLimit, editing and saving results, completion. Covered by integration tests (SQLMUX_TEST_MSSQL) and 46 e2e scripts.
  • Acceptance fixes: Redis palette query preview no longer panics; empty WHERE history (C-r) shows a "no history" row; the key tab's MATCH input has its own row; the tree filter's SCAN is bounded and cancelable; long connection-form errors wrap.
  • Connections: deleting a connection that is in use asks how many tabs it closes, then closes them in every session (rolling back an open transaction, saving or discarding unsaved queries first); dd on a connection node deletes it, and its right-click menu gets Edit… and Delete….
  • Docs: README Windows and SQL Server sections, config docs, CHANGELOG 0.7.0.

just check is green; the full Mac e2e regression passed (4900+ checks), plus the SQL Server e2e series against a Windows-hosted SQL Server.

This branch contains the work of #3 (windows-compat), merged in as a merge commit.

…gent on windows-compat (PR #3 redone as F18.1), native Windows (lock, shell helper, %APPDATA%, clipboard, release targets, CI job, ConPTY smoke), mssql engine (go-mssqldb, sys.* catalog, OFFSET FETCH, GO batches, compose + CI service) (§4, §7.8, §8.1, §8.5, §9, §14, §15, AGENTS.md, plan.md)
lockFile split per GOOS: the flock pair unchanged on unix, LockFileEx on
the file's first byte through golang.org/x/sys/windows on windows (now a
direct dependency), blocking like LOCK_EX. A test holds the lock in a
child process and asserts the parent's take waits it out (the mutation
check: shared flags or no lock make it red); TestStateKilledMidWrite
runs on windows too. The unix-only ssh test is tagged, and the 0o600
assertions skip on windows, which has no group/other bits. The i18n
scan compared internal/i18n prefixes against backslash separators on
windows and flagged the whole table; it slashes the path now.
A command line of the config runs through ShellCommand: sh -c as before
on unix, %COMSPEC% /c on windows (cmd without the variable), at the
three places one runs — password_cmd, the $VISUAL/$EDITOR that opens a
query file (notepad without them on windows, the path quoted into the
line), gq's formatprg. Without XDG_* the directories are
%APPDATA%\sqlmux and %LOCALAPPDATA%\sqlmux on windows
(os.UserConfigDir / os.UserCacheDir). The sqlite DSN takes both
separators after ~ and writes a windows drive as the file: URL path it
is (/C:/x.db); one letter before :// of a command-line target is a
drive, not a scheme. The tests that need sh, a chmod on a directory or
an 0o600 mode get windows shapes: cmd's no-newline echo, a file held
open without FILE_SHARE_DELETE where unix chmods a directory,
runtime.GOOS guards on the permission assertions; the keychain,
exec-engine and fake-ssh suites skip, their fakes being /bin/sh
scripts — the engines and dialers run whatever they are given.
clipTools gains a windows row — clip writing, powershell reading — on
windows only, and the read's \r\n lines are normalized to \n.
… Windows forbids on every platform (F18.2 e, §7.8); sh-script test fakes stay skipped on Windows (task.md)
…F-8 PowerShell both ways, editor path quoting only on Windows (unix keeps "$1"), cmd gets the raw line, PR CI must be green before 送审, GOTOOLCHAIN=go1.26.3 (§7.8, §14, task.md)
…code behind build tags, mssql joins through the existing engine interface (task.md)
TestStateLockExcludes is gone: both mutants (the exclusive flag dropped,
flockExclusive locking nothing) die on TestSnapshotWaitsForTheLock on
windows too — a byte-range lock blocks a second handle of the same
process. The comment no longer calls the lock advisory: windows
byte-range locks are mandatory over other handles.
…hell, export names

ShellCommand hands the whole line to %COMSPEC% /c through
SysProcAttr.CmdLine on windows, in shell_windows.go: os/exec escapes a
" as \", which cmd does not read, so a quoted path broke (a regression
test reads one under a directory with a space). The unix half is
shell_unix.go, the same sh -c line as before. C-o's command is
editorCmd, per platform: unix's sh -c 'ed "$1"' sh path is back as it
was, windows quotes the path into the line, notepad the editor without
$VISUAL/$EDITOR; it is run by tests, cat and type reading the file
back, names with a space, $ and a backtick included. The delete/rename
blocks of the tests are one helper per platform (chmod 0o500/0o555 with
a restoring Cleanup on unix, a handle without FILE_SHARE_DELETE on
windows), no stubs. TempConnection takes no one-letter scheme branch
anymore: C:\ and D:/ never hold ://, and x:// had an answer on unix
that the branch swallowed. sqlite's ~ goes back to home+rest. An
export's file name replaces every character a windows name cannot hold
(< > : " / \ | ? * and the control characters) with an underscore on
every platform, hash:big exporting as hash_big.csv, and the keytab test
of it runs on both. The C:\data\a.db row of TestTempConnection is
windows-only (unix's filepath.Base does not cut at a backslash); the
temp paths of upperPS and the password_cmd of TestSecretCached are
quoted; the justfile's redis note names redis-seed; en.go's alignment
is what go 1.26.3's gofmt writes.
Both clipboard commands are PowerShell with the encoding said out loud,
argv direct: the write sets [Console]::InputEncoding to UTF-8 and
Set-Clipboard's what stdin read; the read sets OutputEncoding and writes
(Get-Clipboard -Raw) itself, no host CRLF of its own — the \r\n
normalization stays for what the clipboard holds. clip reads the
console code page and a bare Get-Clipboard writes OEM, both mangling
中文. TestClipWindowsRow asserts the row's argv is the spec's.
The one function maps a character a windows file name cannot hold, or a
control character — unicode.IsControl, C1 ones included, as the grid's
cells already judge them — to an underscore. The Replacer of the nine
symbols is gone, and the DEL and C1 cases are in the table.
…every platform: hash:big -> hash_big.csv, -2 on the second; C-o on a query named with a space, $ and backticks hands the editor the path as is)
… Windows forbids on every platform (F18.2 e, §7.8); sh-script test fakes stay skipped on Windows (task.md)
…F-8 PowerShell both ways, editor path quoting only on Windows (unix keeps "$1"), cmd gets the raw line, PR CI must be green before 送审, GOTOOLCHAIN=go1.26.3 (§7.8, §14, task.md)
…code behind build tags, mssql joins through the existing engine interface (task.md)
…31ddb9 — Mac regression 4851/0 outside the list, new e2e/f18.2.sh (task.md)
GoReleaser builds the six targets: windows amd64 and arm64 joined, a
windows archive is a zip (format_overrides), the binary's own suffix is
.sqlmux.exe... is goreleaser's doing, the config stays sqlmux. The npm
build makes the two win32 packages (the zip opened with bsdtar, which
reads one), and the shell's runner resolves sqlmux.exe on win32. CI
gains a windows job: vet, build and the unit tests, no integration (no
databases there), no lint (it runs on ubuntu once).
The windows runner checks the repo out with core.autocrlf=true: every
testdata file lands as CRLF, the nvim goldens stop matching (the titles
carry a \r, so does every line the editor is fed) and the stderr of a
formatprg ends in \r. The task.md rule was always LF; now git says so
too.
The windows job on CI fails it and says only the text; a logging twin
runs the same command and prints the toast and the line, the next run
tells why. Not for review: it comes off with the fix.
On the CI runner a powershell's first start takes seconds (Defender
scans it), the default 5s timeout eats the run and the test fails on
the text. The format test relaxes it to 30s for the uppercasing one;
the 200ms timeout test below is its own and keeps its own.
The logging twin told what it had to: with the cold start waited out
the test is green, the toast was never the problem.
A rerun's arrived is time.Now after the snapshot the test took; on the
CI runner's clock the two read equal and After fails. Two milliseconds
between them.
…r header says six, .gitattributes fixes LF at the git layer (§15, task.md)
The goreleaser header still said four: F18.4 added windows amd64/arm64, so the count follows §15 (six targets, six npm packages).
…a SQLite demo file: C-h j j Enter opens a table, a mouse click switches, gt, :qa)
…empty WHERE history, f16.3b the MATCH input row, slowproxy.py + redis_slow); red until F18.8-F18.10 land
…Info row: Draw hands InputRect the whole bar
…ilter changes; db nodes stay with a dim 搜索中… while it runs
… esc cancels, per-window scan ctx (reviewer questions)
… empty; the filter's scan context is each window's and esc cancels it; tests for the error path and the dim colors
… filter scan is out, keys after, a changed pattern cancels the old scan, no match hides the nodes), f18.8 / f18.9 / f16.3b run green on efaad23
…, esc closes it, back on the table / does not)
…s scan survives A's filter change; RTT 500 ms so both fail on efaad23), f18.9 history filtered out by the input (no list, no 'no history', first enter closes, second runs)
…s after confirming, F18.13 the form's mssql DSN uses sqlserver:// and the error row wraps
… reads mssql:// too; the form's error row wraps to the form's width and the box grows with it
…closes, then closes them in every session, the empty panes with them, and starts the sessions on what is left
…er does; its right-click menu gets Edit… and Delete…
…onnection's workers, transaction line in the confirm; F18.14 exec and ad-hoc connections (reviewer questions)
…stion says a transaction going is rolled back (the sentence quit and close use), and a test for two of its tabs in one pane
…n keeps all, y closes its tabs in every pane, empty pane gone, start connection moves on), f18.13 (form mssql DSN to the Windows host, wrapped error row, hand-written mssql://), f18.14 (dd and right-click Edit… / Delete… on connection nodes), f8.16 follows F18.12
…write rolled back; a running pg_sleep is cancelled and the UI does not hang), f18.13 on a 17-row window, f18.14 exec / temporary connections and no D, f16.2 follows the connection menu
… its tabs first' sentence in §7.8; the ≤16-row form as a candidate
… mssql and the Windows paths, CHANGELOG 0.7.0, keys.md from the v0.7.0 build (F18.4 d, F18.7 b)
@kackerx
kackerx merged commit dbfed2b into main Oct 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant