authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2019-11-27 10:17:37+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2019-11-27 10:17:37+02:00
log4d8a8e65df79ddd5edf52f961552036ccfca6e8e
treee322c74016e4d9d9d32061f1247de469c35615e5
parent0d55075de44ed037799b088a8e1ecf0783491da6
signaturelock-open Commit is signed but in an unrecognized format.

add more workarounds


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 {
12931293 os.linux.EINVAL => unreachable,
12941294 os.linux.EFAULT => unreachable,
12951295 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);
12971297 },
12981298 else => unreachable,
12991299 }
src-self-hosted/compilation.zig+5-1
......@@ -363,7 +363,11 @@ pub const Compilation = struct {
363363 is_static,
364364 zig_lib_dir,
365365 );
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;
367371 }
368372
369373 async fn createAsync(
src-self-hosted/main.zig+2-1
......@@ -56,7 +56,8 @@ pub fn main() !void {
5656 // This allocator needs to be thread-safe because we use it for the event.Loop
5757 // which multiplexes async functions onto kernel threads.
5858 // 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;
6061
6162 stdout = &std.io.getStdOut().outStream().stream;
6263
src-self-hosted/test.zig+8-7
......@@ -26,7 +26,8 @@ test "stage2" {
2626}
2727
2828const file1 = "1.zig";
29const allocator = std.heap.c_allocator;
29// TODO https://github.com/ziglang/zig/issues/3783
30const allocator = std.heap.page_allocator;
3031
3132pub const TestContext = struct {
3233 zig_compiler: ZigCompiler,
......@@ -94,8 +95,8 @@ pub const TestContext = struct {
9495 &self.zig_compiler,
9596 "test",
9697 file1_path,
97 Target.Native,
98 Compilation.Kind.Obj,
98 .Native,
99 .Obj,
99100 .Debug,
100101 true, // is_static
101102 self.zig_lib_dir,
......@@ -128,8 +129,8 @@ pub const TestContext = struct {
128129 &self.zig_compiler,
129130 "test",
130131 file1_path,
131 Target.Native,
132 Compilation.Kind.Exe,
132 .Native,
133 .Exe,
133134 .Debug,
134135 false,
135136 self.zig_lib_dir,
......@@ -170,13 +171,13 @@ pub const TestContext = struct {
170171 return error.OutputMismatch;
171172 }
172173 },
173 .Error => |err| return err,
174 .Error => @panic("Cannot return error: https://github.com/ziglang/zig/issues/3190"), // |err| return err,
174175 .Fail => |msgs| {
175176 const stderr = std.io.getStdErr();
176177 try stderr.write("build incorrectly failed:\n");
177178 for (msgs) |msg| {
178179 defer msg.destroy();
179 try msg.printToFile(stderr, errmsg.Color.Auto);
180 try msg.printToFile(stderr, .Auto);
180181 }
181182 },
182183 }