| author | |
| committer | |
| log | 4d8a8e65df79ddd5edf52f961552036ccfca6e8e |
| tree | e322c74016e4d9d9d32061f1247de469c35615e5 |
| parent | 0d55075de44ed037799b088a8e1ecf0783491da6 |
| signature |
4 files changed, 16 insertions(+), 10 deletions(-)
lib/std/event/fs.zig+1-1| ... | @@ -1293,7 +1293,7 @@ pub fn Watch(comptime V: type) type { | ... | @@ -1293,7 +1293,7 @@ pub fn Watch(comptime V: type) type { |
| 1293 | os.linux.EINVAL => unreachable, | 1293 | os.linux.EINVAL => unreachable, |
| 1294 | os.linux.EFAULT => unreachable, | 1294 | os.linux.EFAULT => unreachable, |
| 1295 | os.linux.EAGAIN => { | 1295 | os.linux.EAGAIN => { |
| 1296 | global_event_loop.linuxWaitFd(self.os_data.inotify_fd, os.linux.EPOLLET | os.linux.EPOLLIN); | 1296 | global_event_loop.linuxWaitFd(self.os_data.inotify_fd, os.linux.EPOLLET | os.linux.EPOLLIN | os.EPOLLONESHOT); |
| 1297 | }, | 1297 | }, |
| 1298 | else => unreachable, | 1298 | else => unreachable, |
| 1299 | } | 1299 | } |
src-self-hosted/compilation.zig+5-1| ... | @@ -363,7 +363,11 @@ pub const Compilation = struct { | ... | @@ -363,7 +363,11 @@ pub const Compilation = struct { |
| 363 | is_static, | 363 | is_static, |
| 364 | zig_lib_dir, | 364 | zig_lib_dir, |
| 365 | ); | 365 | ); |
| 366 | return optional_comp orelse if (await frame) |_| unreachable else |err| err; | 366 | // TODO causes segfault |
| 367 | // return optional_comp orelse if (await frame) |_| unreachable else |err| err; | ||
| 368 | if (optional_comp) |comp| { | ||
| 369 | return comp; | ||
| 370 | } else if (await frame) |_| unreachable else |err| return err; | ||
| 367 | } | 371 | } |
| 368 | 372 | ||
| 369 | async fn createAsync( | 373 | async fn createAsync( |
src-self-hosted/main.zig+2-1| ... | @@ -56,7 +56,8 @@ pub fn main() !void { | ... | @@ -56,7 +56,8 @@ pub fn main() !void { |
| 56 | // This allocator needs to be thread-safe because we use it for the event.Loop | 56 | // This allocator needs to be thread-safe because we use it for the event.Loop |
| 57 | // which multiplexes async functions onto kernel threads. | 57 | // which multiplexes async functions onto kernel threads. |
| 58 | // libc allocator is guaranteed to have this property. | 58 | // libc allocator is guaranteed to have this property. |
| 59 | const allocator = std.heap.c_allocator; | 59 | // TODO https://github.com/ziglang/zig/issues/3783 |
| 60 | const allocator = std.heap.page_allocator; | ||
| 60 | 61 | ||
| 61 | stdout = &std.io.getStdOut().outStream().stream; | 62 | stdout = &std.io.getStdOut().outStream().stream; |
| 62 | 63 |
src-self-hosted/test.zig+8-7| ... | @@ -26,7 +26,8 @@ test "stage2" { | ... | @@ -26,7 +26,8 @@ test "stage2" { |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | const file1 = "1.zig"; | 28 | const file1 = "1.zig"; |
| 29 | const allocator = std.heap.c_allocator; | 29 | // TODO https://github.com/ziglang/zig/issues/3783 |
| 30 | const allocator = std.heap.page_allocator; | ||
| 30 | 31 | ||
| 31 | pub const TestContext = struct { | 32 | pub const TestContext = struct { |
| 32 | zig_compiler: ZigCompiler, | 33 | zig_compiler: ZigCompiler, |
| ... | @@ -94,8 +95,8 @@ pub const TestContext = struct { | ... | @@ -94,8 +95,8 @@ pub const TestContext = struct { |
| 94 | &self.zig_compiler, | 95 | &self.zig_compiler, |
| 95 | "test", | 96 | "test", |
| 96 | file1_path, | 97 | file1_path, |
| 97 | Target.Native, | 98 | .Native, |
| 98 | Compilation.Kind.Obj, | 99 | .Obj, |
| 99 | .Debug, | 100 | .Debug, |
| 100 | true, // is_static | 101 | true, // is_static |
| 101 | self.zig_lib_dir, | 102 | self.zig_lib_dir, |
| ... | @@ -128,8 +129,8 @@ pub const TestContext = struct { | ... | @@ -128,8 +129,8 @@ pub const TestContext = struct { |
| 128 | &self.zig_compiler, | 129 | &self.zig_compiler, |
| 129 | "test", | 130 | "test", |
| 130 | file1_path, | 131 | file1_path, |
| 131 | Target.Native, | 132 | .Native, |
| 132 | Compilation.Kind.Exe, | 133 | .Exe, |
| 133 | .Debug, | 134 | .Debug, |
| 134 | false, | 135 | false, |
| 135 | self.zig_lib_dir, | 136 | self.zig_lib_dir, |
| ... | @@ -170,13 +171,13 @@ pub const TestContext = struct { | ... | @@ -170,13 +171,13 @@ pub const TestContext = struct { |
| 170 | return error.OutputMismatch; | 171 | return error.OutputMismatch; |
| 171 | } | 172 | } |
| 172 | }, | 173 | }, |
| 173 | .Error => |err| return err, | 174 | .Error => @panic("Cannot return error: https://github.com/ziglang/zig/issues/3190"), // |err| return err, |
| 174 | .Fail => |msgs| { | 175 | .Fail => |msgs| { |
| 175 | const stderr = std.io.getStdErr(); | 176 | const stderr = std.io.getStdErr(); |
| 176 | try stderr.write("build incorrectly failed:\n"); | 177 | try stderr.write("build incorrectly failed:\n"); |
| 177 | for (msgs) |msg| { | 178 | for (msgs) |msg| { |
| 178 | defer msg.destroy(); | 179 | defer msg.destroy(); |
| 179 | try msg.printToFile(stderr, errmsg.Color.Auto); | 180 | try msg.printToFile(stderr, .Auto); |
| 180 | } | 181 | } |
| 181 | }, | 182 | }, |
| 182 | } | 183 | } |