Skip to content

Commit c6758c2

Browse files
triage: add TASK-107 zig build transient alignment
1 parent 8c4a23b commit c6758c2

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# TASK-XXX: Zig build fails on SQLITE_TRANSIENT alignment (Zig 0.15)
2+
3+
## Status
4+
- [ ] Planned
5+
- [ ] Assigned
6+
- [ ] In Progress
7+
- [x] Blocked (reason: Zig build failure)
8+
- [ ] Complete
9+
10+
## Priority
11+
medium
12+
13+
## Assigned To
14+
(unassigned)
15+
16+
## Parent Docs / Cross-links
17+
- Triggered by: `.tasks/done/TASK-097-zig-extdata-lifecycle-test.md`
18+
- Related file: `zig/src/ffi/api.zig`
19+
20+
## Description
21+
Running `nix run nixpkgs#zig -- build` intermittently fails (or fails on some machines/configs) on Zig 0.15 with an alignment error for the `SQLITE_TRANSIENT` constant:
22+
23+
```
24+
src/ffi/api.zig:68:56: error: pointer type '?*const fn (?*anyopaque) callconv(.c) void' requires aligned address
25+
pub const SQLITE_TRANSIENT: DestructorFn = @ptrFromInt(@as(usize, @bitCast(@as(isize, -1))));
26+
```
27+
28+
This blocks relying on a fresh Zig build inside harness scripts (though prebuilt `lib/crsqlite-zig-*` can be used as a fallback).
29+
30+
## Files to Modify
31+
- `zig/src/ffi/api.zig`
32+
- (maybe) `zig/build.zig` (if a version-gated workaround is required)
33+
34+
## Acceptance Criteria
35+
- [ ] `nix run nixpkgs#zig -- build` succeeds on Zig 0.15
36+
- [ ] `SQLITE_TRANSIENT` (and related sqlite destructor pointer constants) compile cleanly
37+
- [ ] Harness scripts no longer need a prebuilt fallback for local builds
38+
39+
## Reproducible Command
40+
```bash
41+
cd /Users/tom/Developer/effect-native/cr-sqlite/zig
42+
nix run nixpkgs#zig -- build
43+
```
44+
45+
## Progress Log
46+
### 2025-12-20
47+
- Observed build failure while running `bash zig/harness/test-extdata.sh`
48+
49+
## Completion Notes

0 commit comments

Comments
 (0)