Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
713ee63
test(rust): pin MS C-runtime quoting for Windows argv
thekevinbot Oct 2, 2026
8ce8d1e
test(rust): hooks receive non-verbatim {path} and {root}
thekevinbot Oct 2, 2026
009c015
fix(rust): MS-quote every on-file argv element on Windows
thekevinbot Oct 2, 2026
64a48bb
fix(rust): hand on-file hooks non-verbatim Windows paths
thekevinbot Oct 2, 2026
d2e6cb0
e2e attestation for claude/1207-win-argv-quote
thekevinbot Oct 2, 2026
a0f297e
e2e attestation for claude/1207-win-argv-quote
thekevinbot Oct 2, 2026
094015d
refactor(rust): fold the Windows argv wiring into one fn
thekevinbot Oct 2, 2026
b44665e
e2e attestation for claude/1208-win-nonverbatim-paths
thekevinbot Oct 2, 2026
8eeee89
e2e attestation for claude/1208-win-nonverbatim-paths
thekevinbot Oct 2, 2026
3c8e88c
docs(rust): name the table in the migration example
thekevinbot Oct 2, 2026
d4bdc55
docs(rust): migration fragment for Windows on-file argv quoting
thekevinbot Oct 2, 2026
386b888
test(rust): use platform-native paths in two Unix-assuming unit tests
thekevinbot Oct 2, 2026
eecb2d4
ci(rust): run unit and integration tests on a Windows runner
thekevinbot Sep 24, 2026
08f5e30
test(rust): compile the integration suite on Windows
thekevinbot Sep 24, 2026
e004ed5
e2e attestation for claude/1213-win-test-fixtures
thekevinbot Oct 2, 2026
fe8dcba
test(rust): drive the sh hook test with drive-letter verbatim paths only
thekevinbot Oct 2, 2026
462b478
Merge remote-tracking branches 'origin/claude/1207-win-argv-quote', '…
thekevinbot Oct 2, 2026
afec18a
docs: state platform support in the README
thekevinbot Oct 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/dirsql-rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,27 @@ jobs:
- name: Run integration tests
run: cargo test --manifest-path packages/rust/Cargo.toml --features cli --tests

windows:
name: Windows tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v6

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-stable-${{ hashFiles('Cargo.lock') }}

- name: Run unit and integration tests
run: cargo test --manifest-path packages/rust/Cargo.toml --features cli --tests --no-fail-fast

coverage:
name: Rust unit coverage floor
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ cargo install dirsql --features cli
```

> The npm CLI requires **Node ≥ 20.11**.
>
> Supported on Linux, macOS, and Windows (x64). CI runs the Rust test suite on Linux and Windows; the macOS artifacts are built but not tested in CI.

## Quick start

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"command": "just test-e2e",
"ran_at": 1790939617,
"exit_code": 0,
"commit": "009c015ffa36453da6d92ddec17b5b655b51372f",
"branch": "claude/1207-win-argv-quote"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"command": "just test-e2e",
"ran_at": 1790939958,
"exit_code": 0,
"commit": "64a48bb1eff07865a52fc25e1ad50722aced9e45",
"branch": "claude/1208-win-nonverbatim-paths"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**Fixed** On Windows, `on-file` hooks and `parsed()` parsers receive `{path}` and `{root}` in plain form (`C:\data\a.txt`, `\\server\share\a.txt`) instead of the verbatim `\\?\C:\...` / `\\?\UNC\...` form, which MSYS tools mangle and many Windows tools reject. Verbatim paths with no plain equivalent are passed through unchanged.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**Fixed** On Windows, every argument of an `on-file` command is now passed double-quoted by the MS C-runtime rules, so an MSYS/Cygwin child (Git for Windows' `sh`, `printf`, `cat`) no longer glob- or brace-expands it. `on-file = "printf '[{}]'"` now yields its rows instead of none.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
### Hooks receive non-verbatim paths on Windows

**Summary**

On Windows, the `{path}` and `{root}` values substituted into `on-file` and
`parsed()` commands could carry the verbatim prefix (`\\?\C:\...`,
`\\?\UNC\server\share\...`). They are now the plain form. No signature
changed. Output on Unix is unchanged.

**Required changes**

_None._

**Deprecations removed**

_None._

**Behavior changes without code changes**

| Surface (Windows only) | Before | After |
|---|---|---|
| `{path}` / `{root}` on a drive | `\\?\C:\data\a.txt` | `C:\data\a.txt` |
| `{path}` / `{root}` on a share | `\\?\UNC\server\share\a.txt` | `\\server\share\a.txt` |

A verbatim path whose plain spelling would name a different file (a reserved
device name, a trailing dot or space, a path of 260 or more UTF-16 units, or a
`\\?\GLOBALROOT` / `\\?\Volume{...}` form) is still passed verbatim.

**Verification**

```toml
[[table]]
name = "seen"
ddl = "CREATE TABLE seen (n INTEGER)"
glob = "*.txt"
on-file = "sh -c 'printf \"%s\\n\" \"$1\" >> seen.log; echo []' sh {path}"
```

```bash
dirsql "SELECT count(*) FROM seen"
type seen.log
# each line starts with C:\, not \\?\
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
### Windows on-file arguments reach MSYS children unexpanded

**Summary**

On Windows, every argument of an `on-file` command is now passed double-quoted
by the MS C-runtime rules. An MSYS/Cygwin child (Git for Windows' `sh`,
`printf`, `cat`) previously glob- and brace-expanded any argument without a
space or tab; it now receives the argument as written. MSVCRT children parse
the same values as before. No signature changed, and Unix is unchanged.

**Required changes**

_None._

**Deprecations removed**

_None._

**Behavior changes without code changes**

| Surface (Windows, MSYS child) | Before | After |
|---|---|---|
| `on-file = "printf '[{}]'"` | child prints `[]`, zero rows | child prints `[{}]`, one row |
| an argument `*.txt` | expanded to matching files | the literal `*.txt` |

A config that relied on an MSYS child expanding a glob in its argv must ask
for a shell explicitly: `sh -c 'cat *.txt'`.

**Verification**

```toml
[[table]]
name = "t"
ddl = "CREATE TABLE t (n INTEGER)"
glob = "*.txt"
on-file = "printf '[{\"n\":1}]'"
```

```bash
dirsql query "SELECT n FROM t LIMIT 1" -c .dirsql.toml
# [{"n":1}]
```
Loading
Loading