Zig Version
0.12.0-dev.278+0e8f130ae
Steps to Reproduce and Observed Behavior
attempt to use std.fs.selfExePath with wasi as the target OS
met with error message std.fs.selfExePath not supported for WASI. Use std.fs.selfExePathAlloc instead.
|
.wasi => @compileError("std.fs.selfExePath not supported for WASI. Use std.fs.selfExePathAlloc instead."), |
use
selfExePathAlloc as suggested but same error
|
return allocator.dupe(u8, try selfExePath(&buf)); |
Expected Behavior
compile error should give a correct message
Zig Version
0.12.0-dev.278+0e8f130ae
Steps to Reproduce and Observed Behavior
attempt to use
std.fs.selfExePathwith wasi as the target OSmet with error message
std.fs.selfExePath not supported for WASI. Use std.fs.selfExePathAlloc instead.zig/lib/std/fs.zig
Line 3072 in b0d9bb0
use
selfExePathAllocas suggested but same errorzig/lib/std/fs.zig
Line 2977 in b0d9bb0
Expected Behavior
compile error should give a correct message