Skip to content

fix: no more UUID files in cwd - #45

Open
lejmr wants to merge 1 commit into
zed-extensions:mainfrom
lejmr:fix-test-exe-path
Open

fix: no more UUID files in cwd#45
lejmr wants to merge 1 commit into
zed-extensions:mainfrom
lejmr:fix-test-exe-path

Conversation

@lejmr

@lejmr lejmr commented Aug 9, 2026

Copy link
Copy Markdown

I agree this is up for discussion — I just really didn't like how my cwd got littered with so many ZIG_TEST_EXE_BASENAME_ files! (The extension has no post-session hook, so nothing ever deletes them.)

I wouldn't mind storing them in .zig-cache/ or the system tmp dir where they'd get cleaned up automatically. Two practical catches I ran into: zig won't create a missing output directory (error: unable to open output directory), so .zig-cache/ breaks on a fresh checkout before the first build — and the extension runs in a wasm sandbox, so it can't reliably resolve the host's tmp path.

So I chose the least-magic option that doesn't break anything: a fixed name relative to the task cwd that auto-overwrites, keeping the number of generated files at exactly one.

`std::env::current_dir()` inside the wasm sandbox is not the project directory,
so the absolute path handed to the debug adapter did not match where zig wrote
the binary. Use a path relative to the build task's cwd.

Also drop the UUID from the name. The extension has no post-session hook, so
every debug run left another `zig_test_<uuid>` executable behind in the project
root; a fixed name is overwritten instead of accumulating.
@cla-bot cla-bot Bot added the cla-signed label Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant