ReviewOS

also looking at this

craft-native/craft

fix(android): make every Zig decline speak, and prove Zig answers

#205
Merged glennmichael123 wants to merge fix/android-zig-serves into main
8 files +616 -255
packages/zig/build.zigmodified+17-0
Changes to packages/zig/build.zig
@@ -628,6 +628,21 @@ pub fn build(b: *std.Build) void {
628628 });
629629 const run_android_escaping_tests = b.addRunArtifact(android_escaping_tests);
630630
631 // Every way a native gives up has to say so. See the file for why: a
632 // decline to the Kotlin shim is invisible to the page, which made
633 // ~170 silent `catch return null` paths invisible to everyone.
634 const android_declines_tests = b.addTest(.{
635 .root_module = b.createModule(.{
636 .root_source_file = b.path("test/android_declines_test.zig"),
637 .target = target,
638 .optimize = optimize,
639 }),
640 });
641 android_declines_tests.root_module.addAnonymousImport("android_dispatch.zig", .{
642 .root_source_file = b.path("src/android_dispatch.zig"),
643 });
644 const run_android_declines_tests = b.addRunArtifact(android_declines_tests);
645
631646 ios_conformance_tests.root_module.addAnonymousImport("CraftApp.swift", .{
632647 .root_source_file = b.path("../ios/templates/CraftApp.swift"),
633648 });
@@ -1799,6 +1814,7 @@ pub fn build(b: *std.Build) void {
17991814 test_step.dependOn(&run_android_conformance_tests.step);
18001815 test_step.dependOn(&run_android_bridge_tests.step);
18011816 test_step.dependOn(&run_android_escaping_tests.step);
1817 test_step.dependOn(&run_android_declines_tests.step);
18021818 test_step.dependOn(&run_menubar_tests.step);
18031819 test_step.dependOn(&run_components_tests.step);
18041820 test_step.dependOn(&run_gpu_tests.step);
@@ -2562,6 +2578,7 @@ pub fn build(b: *std.Build) void {
25622578 test_android_step.dependOn(&run_android_conformance_tests.step);
25632579 test_android_step.dependOn(&run_android_bridge_tests.step);
25642580 test_android_step.dependOn(&run_android_escaping_tests.step);
2581 test_android_step.dependOn(&run_android_declines_tests.step);
25652582
25662583 // Add Android tests to the main test step
25672584 test_step.dependOn(&run_android_tests.step);