Zig Version
v0.16.0-dev.3144+ac6fb0b59
Still not working on latest Zig Master after v0.16.0 release
v0.17.0-dev.228+ce198b7c2
Steps to Reproduce and Observed Behavior
Simply try to openDir with an evented io like Uring.
I am on:
This is a minimal reproducer:
conststd=@import("std");pubfnmain(init:std.process.Init)!void{varevented:std.Io.Evented=undefined;tryevented.init(init.gpa,.{});deferevented.deinit();constio=evented.io();constlog_dir=trystd.Io.Dir.cwd().openDir(io,"./logs",.{});deferlog_dir.close(io);}
When trying to compile I have this error:
error: expected type 'error{AccessDenied,AntivirusInterference,BadPathName,Canceled,DeviceBusy,FileBusy,FileNotFound,FileSystem,FileTooBig,InputOutput,IsDir,NameTooLong,NetworkNotFound,NoDevice,NoSpaceLeft,NotDir,OperationUnsupported,PathAlreadyExists,PermissionDenied,PipeBusy,ProcessFdQuotaExceeded,SymLinkLoop,SystemFdQuotaExceeded,SystemResources,Unexpected,UnrecognizedVolume}!usize', found 'error{AccessDenied,BadPathName,Canceled,DeviceBusy,FileBusy,FileNotFound,FileTooBig,IsDir,NameTooLong,NoDevice,NoSpaceLeft,NotDir,PathAlreadyExists,PermissionDenied,ProcessFdQuotaExceeded,ReadOnlyFileSystem,SymLinkLoop,SystemFdQuotaExceeded,SystemResources,Unexpected}'
else => |e| return e,
^
In a zig local version I tried to hardly add the error.ReadOnlyFileSystem in the supported errors and it worked as expected.
Expected Behavior
It should be able to open dir.
### Zig Version
v0.16.0-dev.3144+ac6fb0b59
Still not working on latest Zig Master after v0.16.0 release
v0.17.0-dev.228+ce198b7c2
### Steps to Reproduce and Observed Behavior
Simply try to `openDir` with an evented io like Uring.
I am on:
- OS: Linux (x86_64-linux)
This is a minimal reproducer:
```zig
const std = @import("std");
pub fn main(init: std.process.Init) !void {
var evented: std.Io.Evented = undefined;
try evented.init(init.gpa, .{});
defer evented.deinit();
const io = evented.io();
const log_dir = try std.Io.Dir.cwd().openDir(io, "./logs", .{});
defer log_dir.close(io);
}
```
When trying to compile I have this error:
```
error: expected type 'error{AccessDenied,AntivirusInterference,BadPathName,Canceled,DeviceBusy,FileBusy,FileNotFound,FileSystem,FileTooBig,InputOutput,IsDir,NameTooLong,NetworkNotFound,NoDevice,NoSpaceLeft,NotDir,OperationUnsupported,PathAlreadyExists,PermissionDenied,PipeBusy,ProcessFdQuotaExceeded,SymLinkLoop,SystemFdQuotaExceeded,SystemResources,Unexpected,UnrecognizedVolume}!usize', found 'error{AccessDenied,BadPathName,Canceled,DeviceBusy,FileBusy,FileNotFound,FileTooBig,IsDir,NameTooLong,NoDevice,NoSpaceLeft,NotDir,PathAlreadyExists,PermissionDenied,ProcessFdQuotaExceeded,ReadOnlyFileSystem,SymLinkLoop,SystemFdQuotaExceeded,SystemResources,Unexpected}'
else => |e| return e,
^
```
In a zig local version I tried to hardly add the `error.ReadOnlyFileSystem` in the supported errors and it worked as expected.
### Expected Behavior
It should be able to open dir.