diff --git a/lib/std/event/fs.zig b/lib/std/event/fs.zig index 5d55805e35..346d0f294a 100644 --- a/lib/std/event/fs.zig +++ b/lib/std/event/fs.zig @@ -1293,7 +1293,7 @@ pub fn Watch(comptime V: type) type { os.linux.EINVAL => unreachable, os.linux.EFAULT => unreachable, os.linux.EAGAIN => { - global_event_loop.linuxWaitFd(self.os_data.inotify_fd, os.linux.EPOLLET | os.linux.EPOLLIN); + global_event_loop.linuxWaitFd(self.os_data.inotify_fd, os.linux.EPOLLET | os.linux.EPOLLIN | os.EPOLLONESHOT); }, else => unreachable, } diff --git a/src-self-hosted/compilation.zig b/src-self-hosted/compilation.zig index 259cfd602f..a43d4ebc83 100644 --- a/src-self-hosted/compilation.zig +++ b/src-self-hosted/compilation.zig @@ -363,7 +363,11 @@ pub const Compilation = struct { is_static, zig_lib_dir, ); - return optional_comp orelse if (await frame) |_| unreachable else |err| err; + // TODO causes segfault + // return optional_comp orelse if (await frame) |_| unreachable else |err| err; + if (optional_comp) |comp| { + return comp; + } else if (await frame) |_| unreachable else |err| return err; } async fn createAsync( diff --git a/src-self-hosted/main.zig b/src-self-hosted/main.zig index 7906c9daa7..4288c4ea9a 100644 --- a/src-self-hosted/main.zig +++ b/src-self-hosted/main.zig @@ -56,7 +56,8 @@ pub fn main() !void { // This allocator needs to be thread-safe because we use it for the event.Loop // which multiplexes async functions onto kernel threads. // libc allocator is guaranteed to have this property. - const allocator = std.heap.c_allocator; + // TODO https://github.com/ziglang/zig/issues/3783 + const allocator = std.heap.page_allocator; stdout = &std.io.getStdOut().outStream().stream; diff --git a/src-self-hosted/test.zig b/src-self-hosted/test.zig index 4c1ed6ad45..62b7914dbc 100644 --- a/src-self-hosted/test.zig +++ b/src-self-hosted/test.zig @@ -26,7 +26,8 @@ test "stage2" { } const file1 = "1.zig"; -const allocator = std.heap.c_allocator; +// TODO https://github.com/ziglang/zig/issues/3783 +const allocator = std.heap.page_allocator; pub const TestContext = struct { zig_compiler: ZigCompiler, @@ -94,8 +95,8 @@ pub const TestContext = struct { &self.zig_compiler, "test", file1_path, - Target.Native, - Compilation.Kind.Obj, + .Native, + .Obj, .Debug, true, // is_static self.zig_lib_dir, @@ -128,8 +129,8 @@ pub const TestContext = struct { &self.zig_compiler, "test", file1_path, - Target.Native, - Compilation.Kind.Exe, + .Native, + .Exe, .Debug, false, self.zig_lib_dir, @@ -170,13 +171,13 @@ pub const TestContext = struct { return error.OutputMismatch; } }, - .Error => |err| return err, + .Error => @panic("Cannot return error: https://github.com/ziglang/zig/issues/3190"), // |err| return err, .Fail => |msgs| { const stderr = std.io.getStdErr(); try stderr.write("build incorrectly failed:\n"); for (msgs) |msg| { defer msg.destroy(); - try msg.printToFile(stderr, errmsg.Color.Auto); + try msg.printToFile(stderr, .Auto); } }, }