computeHash gets a free check for the existence of build.zig, but when
not computing a hash, we need to do a syscall to check for it.
fn checkBuildFileExistence(f: *Fetch) RunError!void
fn checkBuildFileExistence(f: *Fetch) RunError!void {
const io = f.job_queue.io;
const eb = &f.error_bundle;
if (f.package_root.access(io, std.zig.build_zig_basename, .{})) |_| {
f.has_build_zig = true;
} else |err| switch (err) {
error.FileNotFound => {},
else => |e| {
try eb.addRootErrorMessage(.{
.msg = try eb.printString("unable to access {f}/{s}: {t}", .{
f.package_root, std.zig.build_zig_basename, e,
}),
});
return error.FetchFailed;
},
}
}