ReviewOS

also looking at this

craft-native/craft

fix(ci): build the SDK types with the repo's own tsc (and pin the pantry action)

#104
Merged glennmichael123 wants to merge fix/pin-pantry-action into main
29 files +85 -56
.github/workflows/benchmarks.ymlmodified+1-1
Changes to .github/workflows/benchmarks.yml
@@ -35,7 +35,7 @@ jobs:
3535 fetch-depth: 0
3636
3737 - name: Setup Zig
38 uses: pantry-pm/pantry/packages/action@main
38 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
3939 - name: Install Linux dependencies
4040 run: |
4141 sudo apt-get update
.github/workflows/binary-size.ymlmodified+1-1
Changes to .github/workflows/binary-size.yml
@@ -49,7 +49,7 @@ jobs:
4949 fetch-depth: 0
5050
5151 - name: Setup Zig
52 uses: pantry-pm/pantry/packages/action@main
52 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
5353 - name: Install Linux dependencies
5454 run: |
5555 sudo apt-get update
.github/workflows/ci.ymlmodified+7-7
Changes to .github/workflows/ci.yml
@@ -32,7 +32,7 @@ jobs:
3232 - uses: actions/checkout@v6
3333
3434 - name: Setup Pantry (provides Bun, Zig, etc.)
35 uses: pantry-pm/pantry/packages/action@main
35 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
3636
3737 - name: Verify Zig installation
3838 run: eval "$(pantry env | sed -n '/^export /,$p')" && zig version
@@ -80,7 +80,7 @@ jobs:
8080 - uses: actions/checkout@v6
8181
8282 - name: Setup Pantry (provides Bun, Zig, etc.)
83 uses: pantry-pm/pantry/packages/action@main
83 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
8484
8585 - name: Install dependencies
8686 run: bun install
@@ -116,7 +116,7 @@ jobs:
116116 - uses: actions/checkout@v6
117117
118118 - name: Setup Pantry (provides Bun, Zig, etc.)
119 uses: pantry-pm/pantry/packages/action@main
119 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
120120
121121 - name: Install dependencies
122122 run: bun install
@@ -132,7 +132,7 @@ jobs:
132132 - uses: actions/checkout@v6
133133
134134 - name: Setup Pantry (provides Bun, Zig, etc.)
135 uses: pantry-pm/pantry/packages/action@main
135 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
136136
137137 - name: Install dependencies
138138 run: bun install
@@ -156,7 +156,7 @@ jobs:
156156 - uses: actions/checkout@v6
157157
158158 - name: Setup Pantry (provides Bun, Zig, etc.)
159 uses: pantry-pm/pantry/packages/action@main
159 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
160160
161161 - name: Install dependencies
162162 run: bun install
@@ -179,7 +179,7 @@ jobs:
179179 - uses: actions/checkout@v6
180180
181181 - name: Setup Pantry (provides Bun, Zig, etc.)
182 uses: pantry-pm/pantry/packages/action@main
182 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
183183
184184 - name: Install dependencies
185185 run: bun install
@@ -228,7 +228,7 @@ jobs:
228228 fetch-depth: 0
229229
230230 - name: Setup Pantry (provides Bun, Zig, etc.)
231 uses: pantry-pm/pantry/packages/action@main
231 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
232232
233233 - name: Install Dependencies
234234 run: bun install
.github/workflows/mobile-e2e.ymlmodified+2-2
Changes to .github/workflows/mobile-e2e.yml
@@ -29,7 +29,7 @@ jobs:
2929 - uses: actions/checkout@v6
3030
3131 - name: Setup Zig
32 uses: pantry-pm/pantry/packages/action@main
32 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
3333 - name: Setup Xcode
3434 uses: maxim-lobanov/setup-xcode@v1
3535 with:
@@ -142,7 +142,7 @@ jobs:
142142 - uses: actions/checkout@v6
143143
144144 - name: Setup Zig
145 uses: pantry-pm/pantry/packages/action@main
145 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
146146 - name: Setup Java
147147 uses: actions/setup-java@v4
148148 with:
.github/workflows/native-lifecycle.ymlmodified+1-1
Changes to .github/workflows/native-lifecycle.yml
@@ -52,7 +52,7 @@ jobs:
5252 - uses: actions/checkout@v6
5353
5454 - name: Setup Pantry (provides Bun)
55 uses: pantry-pm/pantry/packages/action@main
55 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
5656
5757 - name: Install dependencies
5858 run: bun install --frozen-lockfile
.github/workflows/release.ymlmodified+3-3
Changes to .github/workflows/release.yml
@@ -42,7 +42,7 @@ jobs:
4242 fetch-depth: 0
4343
4444 - name: Setup Pantry (provides Bun, Zig, etc.)
45 uses: pantry-pm/pantry/packages/action@main
45 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
4646
4747 - name: Install System Dependencies
4848 if: matrix.platform.deps != ''
@@ -290,7 +290,7 @@ jobs:
290290 # 2. Auto-packages binaries from zig-out/ into platform-named zips
291291 # 3. Creates/updates GitHub release with all artifacts + changelog
292292 - name: Publish & Release
293 uses: pantry-pm/pantry/packages/action@main
293 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
294294 with:
295295 install: 'false'
296296 publish: 'zig'
@@ -427,7 +427,7 @@ jobs:
427427 fetch-depth: 0
428428
429429 - name: Setup Pantry (provides Bun, Zig, etc.)
430 uses: pantry-pm/pantry/packages/action@main
430 uses: pantry-pm/pantry/packages/action@235036fa0f48bae99b2293df5a3dc35c809b1777 # pinned: last SHA whose bundled typescript resolves on linux-x64
431431 - name: Install Dependencies
432432 run: bun install
433433
deps.yamlmodified+10-3
Changes to deps.yaml
@@ -5,6 +5,13 @@ dependencies:
55 bun.sh: 1.3.14
66 # Also pinned exactly. `^0.17.0-dev` floats on Zig's *dev* channel, so any
77 # `pantry install` can swap the compiler out from under a build — observed
8 # jumping 1509 -> 1606 unprompted. This is the version v0.0.58 was released
9 # with. Bump deliberately, and rebuild when you do.
10 ziglang.org: 0.17.0-dev.1509_bb296ab9b
8 # jumping 1509 -> 1606 unprompted. Bump deliberately, and rebuild when you do.
9 #
10 # The pin has a shelf life, which 1509 is how we found out. ziglang.org
11 # serves exactly one dev build — whatever master is now — plus the tagged
12 # releases, and prunes the rest. Every platform tarball for 1509 returned
13 # 404, so CI was running on cached toolchains and any uncached runner failed
14 # to provision at all: `darwin-x64` went red on a lockfile-free PR, and the
15 # next tagged release would have failed the same way. A pinned dev build is
16 # reproducible only for as long as it is master.
17 ziglang.org: 0.17.0-dev.1963_e00c6c439
docs/android-development.mdmodified+1-1
Changes to docs/android-development.md
@@ -488,7 +488,7 @@ Per `CLAUDE.md`'s distribution rule, the `.so` resolution lives here in the Andr
488488| Phase A0 | pinned Zig only | ✅ works today |
489489| Phase A1+ | Android SDK, NDK (pinned `26.1.10909125`), `adb`, `gradle` | ❌ none present |
490490
491Zig is pinned at `0.17.0-dev.1509+bb296ab9b`.
491Zig is pinned at `0.17.0-dev.1963+e00c6c439`.
492492
493493---
494494
docs/ios-development.mdmodified+1-1
Changes to docs/ios-development.md
@@ -385,7 +385,7 @@ gated on `hashFiles('packages/ios/TestApp/TestApp.xcodeproj')`, which has never
385385| Phase 0 | nothing beyond the pinned Zig | ✅ works today on Command Line Tools |
386386| Phase 1+ | full Xcode — SDK, simulator runtime | ❌ install required |
387387
388Zig is pinned at `0.17.0-dev.1509+bb296ab9b`. Clear `.zig-cache` between heavy rounds.
388Zig is pinned at `0.17.0-dev.1963+e00c6c439`. Clear `.zig-cache` between heavy rounds.
389389
390390---
391391
packages/ios/fixtures/zig-slice/build-and-run.shmodified+1-1
Changes to packages/ios/fixtures/zig-slice/build-and-run.sh
@@ -7,7 +7,7 @@
77set -euo pipefail
88
99ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../.." && pwd)"
10ZIG="${CRAFT_ZIG:-$HOME/.cache/craft-ci-local/zig-aarch64-macos-0.17.0-dev.1509+bb296ab9b/zig}"
10ZIG="${CRAFT_ZIG:-$HOME/.cache/craft-ci-local/zig-aarch64-macos-0.17.0-dev.1963+e00c6c439/zig}"
1111FIXTURE="$ROOT/packages/ios/fixtures/zig-slice"
1212OUT="${1:-$FIXTURE/build}"
1313BUNDLE_ID="app.craft.slice"
packages/typescript/build.tsmodified+3-2
Changes to packages/typescript/build.ts
@@ -25,8 +25,9 @@ async function build(entrypoints: string[], outdir: string): Promise<void> {
2525// their implementation and templates instead of importing unpublished peers.
2626await build(['../ios/src/index.ts'], 'dist/ios/src')
2727await build(['../android/src/index.ts'], 'dist/android/src')
28await Bun.$`bunx tsc ${resolve(root, '../ios/src/index.ts')} --declaration --emitDeclarationOnly --module esnext --target esnext --moduleResolution bundler --types bun --skipLibCheck --ignoreConfig --outDir ${resolve(dist, 'ios/src')}`
29await Bun.$`bunx tsc ${resolve(root, '../android/src/index.ts')} --declaration --emitDeclarationOnly --module esnext --target esnext --moduleResolution bundler --types bun --skipLibCheck --ignoreConfig --outDir ${resolve(dist, 'android/src')}`
28// scripts/tsc.ts, not `bunx tsc`: PATH is not trustworthy in CI. See that file.
29await Bun.$`bun ${resolve(root, "scripts/tsc.ts")} ${resolve(root, '../ios/src/index.ts')} --declaration --emitDeclarationOnly --module esnext --target esnext --moduleResolution bundler --types bun --skipLibCheck --ignoreConfig --outDir ${resolve(dist, 'ios/src')}`
30await Bun.$`bun ${resolve(root, "scripts/tsc.ts")} ${resolve(root, '../android/src/index.ts')} --declaration --emitDeclarationOnly --module esnext --target esnext --moduleResolution bundler --types bun --skipLibCheck --ignoreConfig --outDir ${resolve(dist, 'android/src')}`
3031await cp(resolve(root, '../ios/templates'), resolve(dist, 'ios/templates'), { recursive: true })
3132await cp(resolve(root, '../android/templates'), resolve(dist, 'android/templates'), { recursive: true })
3233
packages/typescript/package.jsonmodified+1-1
Changes to packages/typescript/package.json
@@ -81,7 +81,7 @@
8181 "scripts": {
8282 "build": "bun build.ts && bun run build:types",
8383 "build:lib": "bun build src/index.ts --outdir dist --format esm --target bun && bun build src/index.ts --outfile dist/index.cjs --format cjs --target node",
84 "build:types": "bun run tsc -p tsconfig.build.json && cp dist/index.d.ts dist/index.d.cts",
84 "build:types": "bun scripts/tsc.ts -p tsconfig.build.json && cp dist/index.d.ts dist/index.d.cts",
8585 "dev": "bun --watch src/index.ts",
8686 "lint": "bunx --bun pickier lint . --config ../../pickier.config.ts --max-warnings 9999",
8787 "lint:fix": "bunx --bun pickier lint . --fix --config ../../pickier.config.ts --max-warnings 9999",
packages/typescript/scripts/tsc.tsadded+21-0
Changes to packages/typescript/scripts/tsc.ts
@@ -0,0 +1,21 @@
1/**
2 * Run the `tsc` this package declares, not the one on PATH.
3 *
4 * `bunx tsc` resolves through PATH. In CI the pantry action provisions its own
5 * typescript into `<repo>/pantry` and puts it ahead of `node_modules/.bin`, so
6 * the same command silently ran a different compiler — a dev build the
7 * lockfile never pinned, and one whose linux-x64 platform binary is missing:
8 *
9 * Error: Unable to resolve @typescript/typescript-linux-x64.
10 *
11 * Locally nothing shadows `node_modules/.bin`, which is why the break only
12 * ever showed up in one CI job. Resolving through the module graph instead of
13 * PATH makes both places run the version `bun.lock` says.
14 */
15import { dirname, join } from 'node:path'
16
17const pkgRoot = dirname(dirname(Bun.resolveSync('typescript', import.meta.dir)))
18const tsc = join(pkgRoot, 'bin', 'tsc')
19
20const proc = Bun.spawn(['bun', tsc, ...Bun.argv.slice(2)], { stdio: ['inherit', 'inherit', 'inherit'] })
21process.exit(await proc.exited)
packages/zig/src/benchmark.zigmodified+3-3
Changes to packages/zig/src/benchmark.zig
@@ -276,7 +276,7 @@ pub const BenchmarkSuite = struct {
276276 }
277277
278278 pub fn generateReport(self: *const BenchmarkSuite, allocator: std.mem.Allocator) ![]const u8 {
279 var buf = std.ArrayList(u8){ .items = &.{}, .capacity = 0 };
279 var buf = std.ArrayList(u8).empty;
280280 errdefer buf.deinit(allocator);
281281
282282 const header = try std.fmt.allocPrint(allocator, "Benchmark Suite: {s}\n", .{self.name});
@@ -301,7 +301,7 @@ pub const BenchmarkSuite = struct {
301301 }
302302
303303 pub fn generateJSON(self: *const BenchmarkSuite, allocator: std.mem.Allocator) ![]const u8 {
304 var buf = std.ArrayList(u8){ .items = &.{}, .capacity = 0 };
304 var buf = std.ArrayList(u8).empty;
305305 errdefer buf.deinit(allocator);
306306
307307 try buf.appendSlice(allocator, "{");
@@ -422,7 +422,7 @@ pub fn benchmarkArrayListOperations(allocator: std.mem.Allocator, operations: us
422422}
423423
424424fn arrayListOps(allocator: std.mem.Allocator, ops: usize) !void {
425 var list = std.ArrayList(usize){ .items = &.{}, .capacity = 0 };
425 var list = std.ArrayList(usize).empty;
426426 defer list.deinit(allocator);
427427
428428 var i: usize = 0;
packages/zig/src/bridge_clipboard.zigmodified+2-2
Changes to packages/zig/src/bridge_clipboard.zig
@@ -193,7 +193,7 @@ pub const ClipboardBridge = struct {
193193 log.debug("Read text from clipboard: {s}", .{text_str});
194194
195195 // Escape backslashes and quotes for safe JSON embedding
196 var buf: std.ArrayList(u8) = .{ .items = &.{}, .capacity = 0 };
196 var buf: std.ArrayList(u8) = .empty;
197197 defer buf.deinit(self.allocator);
198198
199199 try buf.appendSlice(self.allocator, "{\"text\":\"");
@@ -306,7 +306,7 @@ pub const ClipboardBridge = struct {
306306 const html_str = std.mem.span(@as([*:0]const u8, @ptrCast(html_cstr)));
307307 log.debug("Read HTML from clipboard: {s}", .{html_str});
308308
309 var buf: std.ArrayList(u8) = .{ .items = &.{}, .capacity = 0 };
309 var buf: std.ArrayList(u8) = .empty;
310310 defer buf.deinit(self.allocator);
311311
312312 try buf.appendSlice(self.allocator, "{\"html\":\"");
packages/zig/src/bridge_dialog.zigmodified+4-4
Changes to packages/zig/src/bridge_dialog.zig
@@ -432,7 +432,7 @@ pub const DialogBridge = struct {
432432 if (comptime builtin.mode == .debug)
433433 std.debug.print("[DialogBridge] Selected file: {s}\n", .{path_str});
434434
435 var buf: std.ArrayList(u8) = .{ .items = &.{}, .capacity = 0 };
435 var buf: std.ArrayList(u8) = .empty;
436436 defer buf.deinit(self.allocator);
437437
438438 try buf.appendSlice(self.allocator, "{\"canceled\":false,\"filePaths\":[\"");
@@ -502,7 +502,7 @@ pub const DialogBridge = struct {
502502 if (comptime builtin.mode == .debug)
503503 std.debug.print("[DialogBridge] Selected {d} files\n", .{count});
504504
505 var buf: std.ArrayList(u8) = .{ .items = &.{}, .capacity = 0 };
505 var buf: std.ArrayList(u8) = .empty;
506506 defer buf.deinit(self.allocator);
507507
508508 try buf.appendSlice(self.allocator, "{\"canceled\":false,\"filePaths\":[");
@@ -581,7 +581,7 @@ pub const DialogBridge = struct {
581581 if (comptime builtin.mode == .debug)
582582 std.debug.print("[DialogBridge] Selected folder: {s}\n", .{path_str});
583583
584 var buf: std.ArrayList(u8) = .{ .items = &.{}, .capacity = 0 };
584 var buf: std.ArrayList(u8) = .empty;
585585 defer buf.deinit(self.allocator);
586586
587587 try buf.appendSlice(self.allocator, "{\"canceled\":false,\"filePaths\":[\"");
@@ -645,7 +645,7 @@ pub const DialogBridge = struct {
645645 if (comptime builtin.mode == .debug)
646646 std.debug.print("[DialogBridge] Save path: {s}\n", .{path_str});
647647
648 var buf: std.ArrayList(u8) = .{ .items = &.{}, .capacity = 0 };
648 var buf: std.ArrayList(u8) = .empty;
649649 defer buf.deinit(self.allocator);
650650
651651 try buf.appendSlice(self.allocator, "{\"canceled\":false,\"filePath\":\"");
packages/zig/src/bridge_native_ui.zigmodified+7-7
Changes to packages/zig/src/bridge_native_ui.zig
@@ -228,7 +228,7 @@ pub const NativeUIBridge = struct {
228228 /// The returned slice borrows every string from `parsed`, so it must be
229229 /// consumed before the parse arena is freed — `SpaceList.append` copies.
230230 fn parseSpaces(allocator: std.mem.Allocator, value: std.json.Value) !std.ArrayList(space_switcher.Space) {
231 var spaces: std.ArrayList(space_switcher.Space) = .{ .items = &.{}, .capacity = 0 };
231 var spaces: std.ArrayList(space_switcher.Space) = .empty;
232232 errdefer spaces.deinit(allocator);
233233
234234 for (value.array.items) |entry| {
@@ -270,7 +270,7 @@ pub const NativeUIBridge = struct {
270270 var spaces = if (root.get("spaces")) |v|
271271 try parseSpaces(self.allocator, v)
272272 else
273 std.ArrayList(space_switcher.Space){ .items = &.{}, .capacity = 0 };
273 std.ArrayList(space_switcher.Space).empty;
274274 defer spaces.deinit(self.allocator);
275275
276276 const active = if (root.get("activeSpace")) |v| switch (v) {
@@ -366,7 +366,7 @@ pub const NativeUIBridge = struct {
366366 const section_label = if (section_obj.get("label")) |v| v.string else if (section_obj.get("title")) |v| v.string else section_id;
367367 const items_value = section_obj.get("items") orelse continue;
368368
369 var items: std.ArrayList(NativeSidebar.SidebarItem) = .{ .items = &.{}, .capacity = 0 };
369 var items: std.ArrayList(NativeSidebar.SidebarItem) = .empty;
370370 defer items.deinit(self.allocator);
371371
372372 for (items_value.array.items) |item_value| {
@@ -481,7 +481,7 @@ pub const NativeUIBridge = struct {
481481 const items_json = section_data.get("items").?.array;
482482
483483 // Build items array
484 var items: std.ArrayList(NativeSidebar.SidebarItem) = .{ .items = &.{}, .capacity = 0 };
484 var items: std.ArrayList(NativeSidebar.SidebarItem) = .empty;
485485 defer items.deinit(self.allocator);
486486
487487 for (items_json.items) |item_json| {
@@ -596,7 +596,7 @@ pub const NativeUIBridge = struct {
596596
597597 const browser = self.file_browsers.get(browser_id) orelse return error.BrowserNotFound;
598598
599 var files: std.ArrayList(NativeFileBrowser.FileItem) = .{ .items = &.{}, .capacity = 0 };
599 var files: std.ArrayList(NativeFileBrowser.FileItem) = .empty;
600600 defer files.deinit(self.allocator);
601601
602602 for (files_json.items) |file_json| {
@@ -766,7 +766,7 @@ pub const NativeUIBridge = struct {
766766
767767 // Parse menu items
768768 const items_json = root.get("items").?.array;
769 var items: std.ArrayList(context_menu.MenuItem) = .{ .items = &.{}, .capacity = 0 };
769 var items: std.ArrayList(context_menu.MenuItem) = .empty;
770770 defer items.deinit(self.allocator);
771771
772772 for (items_json.items) |item_json| {
@@ -785,7 +785,7 @@ pub const NativeUIBridge = struct {
785785 if (item_type == .submenu) {
786786 if (item_obj.get("submenu")) |submenu_json| {
787787 if (submenu_json == .array) {
788 var submenu_list: std.ArrayList(context_menu.MenuItem) = .{ .items = &.{}, .capacity = 0 };
788 var submenu_list: std.ArrayList(context_menu.MenuItem) = .empty;
789789 for (submenu_json.array.items) |sub_item_json| {
790790 if (sub_item_json == .object) {
791791 const sub_obj = sub_item_json.object;
packages/zig/src/components/context_menu.zigmodified+1-1
Changes to packages/zig/src/components/context_menu.zig
@@ -42,7 +42,7 @@ pub const MenuCallbackData = struct {
4242 data.* = .{
4343 .target_id = try allocator.dupe(u8, target_id),
4444 .target_type = try allocator.dupe(u8, target_type),
45 .item_ids = .{ .items = &.{}, .capacity = 0 },
45 .item_ids = .empty,
4646 .allocator = allocator,
4747 };
4848 return data;
packages/zig/src/components/native_sidebar.zigmodified+1-1
Changes to packages/zig/src/components/native_sidebar.zig
@@ -151,7 +151,7 @@ pub const NativeSidebar = struct {
151151 var new_section = OutlineViewDataSource.DataStore.Section{
152152 .id = try self.allocator.dupe(u8, section.id),
153153 .header = if (section.header) |h| try self.allocator.dupe(u8, h) else null,
154 .items = .{ .items = &.{}, .capacity = 0 },
154 .items = .empty,
155155 .is_expanded = true,
156156 };
157157
packages/zig/src/components/outline_view_datasource.zigmodified+1-1
Changes to packages/zig/src/components/outline_view_datasource.zig
@@ -30,7 +30,7 @@ pub const OutlineViewDataSource = struct {
3030
3131 pub fn init(allocator: std.mem.Allocator) DataStore {
3232 return .{
33 .sections = .{ .items = &.{}, .capacity = 0 },
33 .sections = .empty,
3434 .allocator = allocator,
3535 };
3636 }
packages/zig/src/components/quick_look.zigmodified+1-1
Changes to packages/zig/src/components/quick_look.zig
@@ -22,7 +22,7 @@ pub const QuickLookCallbackData = struct {
2222 pub fn init(allocator: std.mem.Allocator) !*QuickLookCallbackData {
2323 const data = try allocator.create(QuickLookCallbackData);
2424 data.* = .{
25 .preview_items = .{ .items = &.{}, .capacity = 0 },
25 .preview_items = .empty,
2626 .current_index = 0,
2727 .allocator = allocator,
2828 };
packages/zig/src/components/space_list.zigmodified+1-1
Changes to packages/zig/src/components/space_list.zig
@@ -22,7 +22,7 @@ pub const SpaceList = struct {
2222 active: ?usize = null,
2323
2424 pub fn init(allocator: std.mem.Allocator) SpaceList {
25 return .{ .allocator = allocator, .spaces = .{ .items = &.{}, .capacity = 0 } };
25 return .{ .allocator = allocator, .spaces = .empty };
2626 }
2727
2828 pub fn deinit(self: *SpaceList) void {
packages/zig/src/components/table_view_datasource.zigmodified+1-1
Changes to packages/zig/src/components/table_view_datasource.zig
@@ -25,7 +25,7 @@ pub const TableViewDataSource = struct {
2525
2626 pub fn init(allocator: std.mem.Allocator) DataStore {
2727 return .{
28 .files = .{ .items = &.{}, .capacity = 0 },
28 .files = .empty,
2929 .allocator = allocator,
3030 };
3131 }
packages/zig/src/devmode.zigmodified+1-1
Changes to packages/zig/src/devmode.zig
@@ -210,7 +210,7 @@ pub const ErrorDisplay = struct {
210210 color_output: bool = true,
211211
212212 pub fn formatError(self: ErrorDisplay, allocator: std.mem.Allocator, err: anyerror, context: []const u8, file: []const u8, line: u32) ![]const u8 {
213 var buf = std.ArrayList(u8){ .items = &.{}, .capacity = 0 };
213 var buf = std.ArrayList(u8).empty;
214214 const writer = buf.writer(allocator);
215215
216216 // Header with emoji for visibility
packages/zig/src/hotreload.zigmodified+1-1
Changes to packages/zig/src/hotreload.zig
@@ -454,7 +454,7 @@ pub const ReloadServer = struct {
454454 pub fn broadcast(self: *Self, message: []const u8) !void {
455455 if (!self.running) return;
456456
457 var disconnected: std.ArrayList(usize) = .{ .items = &.{}, .capacity = 0 };
457 var disconnected: std.ArrayList(usize) = .empty;
458458 defer disconnected.deinit(self.allocator);
459459
460460 // Send to all clients
packages/zig/src/macos.zigmodified+1-1
Changes to packages/zig/src/macos.zig
@@ -5003,7 +5003,7 @@ pub fn tryEvalJS(js_code: []const u8) !void {
50035003/// Handle incoming messages from JavaScript bridge
50045004/// Convert a JSON Value to string
50055005fn jsonValueToString(allocator: std.mem.Allocator, value: std.json.Value) ![]const u8 {
5006 var buf: std.ArrayListUnmanaged(u8) = .{ .items = &.{}, .capacity = 0 };
5006 var buf: std.ArrayListUnmanaged(u8) = .empty;
50075007 errdefer buf.deinit(allocator);
50085008
50095009 switch (value) {
packages/zig/src/main.zigmodified+2-2
Changes to packages/zig/src/main.zig
@@ -209,8 +209,8 @@ pub const App = struct {
209209 pub fn init(allocator: std.mem.Allocator) Self {
210210 return .{
211211 .allocator = allocator,
212 .windows = .{ .items = &.{}, .capacity = 0 },
213 .system_trays = .{ .items = &.{}, .capacity = 0 },
212 .windows = .empty,
213 .system_trays = .empty,
214214 .bridge = null,
215215 .notifications = null,
216216 };
pantry.jsoncmodified+1-1
Changes to pantry.jsonc
@@ -7,6 +7,6 @@
77 "bun.sh": "1.3.14",
88 // Pinned exactly — `^0.17.0-dev` floats on Zig's dev channel and swaps the
99 // compiler out from under a build. Keep in step with deps.yaml.
10 "ziglang.org": "0.17.0-dev.1509_bb296ab9b"
10 "ziglang.org": "0.17.0-dev.1963_e00c6c439"
1111 }
1212}
pantry.lockmodified+4-4
Changes to pantry.lock
@@ -13,7 +13,7 @@
1313 },
1414 "system": {
1515 "bun.sh": "1.3.14",
16 "ziglang.org": "0.17.0-dev.1509_bb296ab9b"
16 "ziglang.org": "0.17.0-dev.1963_e00c6c439"
1717 }
1818 },
1919 "benchmarks": {
@@ -418,11 +418,11 @@
418418 "typescript"
419419 ]
420420 },
421 "ziglang.org@0.17.0-dev.1509_bb296ab9b": {
421 "ziglang.org@0.17.0-dev.1963_e00c6c439": {
422422 "name": "ziglang.org",
423 "version": "0.17.0-dev.1509_bb296ab9b",
423 "version": "0.17.0-dev.1963_e00c6c439",
424424 "source": "pantry",
425 "resolved": "registry:ziglang.org@0.17.0-dev.1509_bb296ab9b"
425 "resolved": "registry:ziglang.org@0.17.0-dev.1963_e00c6c439"
426426 }
427427 }
428428}