zig
zig copied to clipboard
Where is the error?
I have a partial implementation in Zig of a personal finance manager that I abandoned because of issues with Zig (which, by the way, I completely understand; Zig has not been released and is therefore beta-quality software). Periodically, I check in on the project to see how things are going, using my existing code.
I tried compiling the simplest application in the suite with a nightly download from two days ago. I got this error:
zig build-exe --verbose-link --main-pkg-path .. -I/usr/include -lc -lsqlite3 composite_register.zig
/usr/local/bin/lib/std/debug.zig:85:18: error: deprecated; use `std.log` functions for logging or `std.debug.print` for 'printf debugging'
pub const warn = @compileError("deprecated; use `std.log` functions for logging or `std.debug.print` for 'printf debugging'");
^
make: *** [makefile:7: composite_register] Error 1
My issue with this is that it gives no indication as to the location in my source code that provoked this error.
This is caused by #10648, I tried to add a similar trace to stage2 in #11533 but that went nowhere.
My current recommendation is to just comment out that declaration and use the actually useful no member named 'foo' error.
this also affects the new IterableDir changes, no notes
/home/meg/.local/share/zig/lib/std/fs.zig:961:22: error: only 'IterableDir' can be walked; 'IterableDir' can be obtained with 'openIterableDir'
pub const walk = @compileError("only 'IterableDir' can be walked; 'IterableDir' can be obtained with 'openIterableDir'");
^
Related: #7668