ReviewOS

also looking at this

craft-native/craft

fix(build): select the core Zig project explicitly

#383
Merged chris wants to merge codex/zig-core-build-root into main
4 files +44 -2

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

scripts/verify-zig-core-project.tsmodified+3-2
Changes to scripts/verify-zig-core-project.ts
@@ -1,12 +1,13 @@
11import { existsSync, mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
2import { tmpdir } from 'node:os'
32import { join, resolve } from 'node:path'
43import { resolveZig } from './zig'
54
65const source = resolve(import.meta.dir, '..')
76const zig = resolveZig(source)
87console.log('Tracked core project:', JSON.stringify({ file: join(source, 'packages/zig/build.zig'), exists: existsSync(join(source, 'packages/zig/build.zig')) }))
9const root = mkdtempSync(join(tmpdir(), 'craft-core-project-'))
8// Keep the fixture on the checkout's volume. Hosted Windows keeps the
9// checkout on D: and the system temporary directory/compiler cache on C:.
10const root = mkdtempSync(join(source, '.zig-core-project-'))
1011const core = join(root, 'packages', 'zig')
1112try {
1213 mkdirSync(core, { recursive: true })