Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zig build --watch crashes in bun on macos #22800

Open
nektro opened this issue Feb 7, 2025 · 0 comments
Open

zig build --watch crashes in bun on macos #22800

nektro opened this issue Feb 7, 2025 · 0 comments
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@nektro
Copy link
Contributor

nektro commented Feb 7, 2025

Zig Version

0.14.0-dev.2987+183bb8b08

Steps to Reproduce and Observed Behavior

  • clone https://github.com/oven-sh/bun (HEAD is c9709224563e9d7fa9c9e1f957af3f741420fc69 as of writing)
  • run bun run build to bootstrap some generated code
  • run ./vendor/zig/zig build --watch
❯ ./vendor/zig/zig build --watch
info: zig compiler v0.14.0-dev.2987+183bb8b08
Build Summary: 5/5 steps succeeded
install success
└─ check success
   └─ zig build-obj bun-debug Debug native-native.13.0 success 26s MaxRSS:1G
      └─ options success
thread 30516526 panic: reached unreachable code
/Users/meghandenny/src/bun/vendor/zig/lib/std/posix.zig:4499:22: 0x102c300b7 in kevent (build)
            .BADF => unreachable, // Always a race condition.
                     ^
/Users/meghandenny/src/bun/vendor/zig/lib/std/Build/Watch.zig:671:49: 0x102c2ee9f in update (build)
                            _ = try posix.kevent(w.os.kq_fd, &changes, &.{}, null);
                                                ^
/Users/meghandenny/src/bun/vendor/zig/lib/std/Build/Watch.zig:870:21: 0x102c30d23 in update (build)
    return Os.update(w, gpa, steps);
                    ^
/Users/meghandenny/src/bun/vendor/zig/lib/compiler/build_runner.zig:453:21: 0x102c35c57 in main (build)
        try w.update(gpa, run.step_stack.keys());
                    ^
/Users/meghandenny/src/bun/vendor/zig/lib/std/start.zig:656:37: 0x102c3fa73 in main (build)
            const result = root.main() catch |err| {
                                    ^
???:?:?: 0x1803e8273 in ??? (???)
???:?:?: 0x0 in ??? (???)
error: the following build command crashed:
/Users/meghandenny/src/bun/.zig-cache/o/5669840098cf4e8a06f7b6c32dea52bd/build /Users/meghandenny/src/bun/vendor/zig/zig vendor/zig/lib /Users/meghandenny/src/bun /Users/meghandenny/src/bun/.zig-cache /Users/meghandenny/.cache/zig --seed 0xd9205961 -Zf6d23e3e2dbf24db --watch

more environment context is that i'm on a macbook pro m3 running macOS 15.1.1

Expected Behavior

works and recompiles zig object when files change

@nektro nektro added the bug Observed behavior contradicts documented or intended behavior label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

1 participant