csv2json icon indicating copy to clipboard operation
csv2json copied to clipboard

Build Error [ src/main.zig:66:60: error: unused capture |err| ] with Zig Version 0.9.0

Open ShabbirHasan1 opened this issue 4 years ago • 2 comments

Following the readme instructions to build, Its failing with error: unused capture on Main.zig Line:66

~/ $  zig version
~/ $  0.9.0
~/ $  cd csv2json
~/csv2json $  zig build -Drelease-fast
		    /home/user/csv2json/src/main.zig:66:60: error: unused capture
		            bufSize = std.fmt.parseUnsigned(u32, b, 10) catch |err| {
		                                                               ^
		    csv2json...The following command exited with error code 1:
		    /usr/bin/zig build-exe /home/user/csv2json/src/main.zig -OReleaseFast --cache-dir /home/user/csv2json/zig-cache --global-cache-dir /home/user/.cache/zig --name csv2json --pkg-begin clap /home/user/csv2json/lib/zig-clap/clap.zig --pkg-end --pkg-begin csv /home/user/csv2json/lib/zig-csv/src/main.zig --pkg-end --enable-cache 
		    error: the following build command failed with exit code 1:
		    /home/user/csv2json/zig-cache/o/0cf20af84c42b68b4c79e2a929c982e5/build /usr/bin/zig /home/user/csv2json /home/user/csv2json/zig-cache /home/user/.cache/zig -Drelease-fast

ShabbirHasan1 avatar Jan 16 '22 18:01 ShabbirHasan1

I'd compiled the app with v0.8.1. Looks like the language has changed between that and v0.9.0. Please feel free to send a PR if you're able to fix this, or I'll look into this when I get a chance.

knadh avatar Jan 17 '22 05:01 knadh

I'd compiled the app with v0.8.1. Looks like the language has changed between that and v0.9.0. Please feel free to send a PR if you're able to fix this, or I'll look into this when I get a chance.

Yup, The language has changed a bit, However Since i am new to this language as well, so it took me some time to fix the errors and compile the repo successfully with zig v0.9.0

PR Sent

ShabbirHasan1 avatar Jan 19 '22 14:01 ShabbirHasan1