ziglua icon indicating copy to clipboard operation
ziglua copied to clipboard

Should std.log be used in the library?

Open natecraddock opened this issue 1 year ago • 2 comments

See this discussion: https://github.com/natecraddock/ziglua/pull/55#discussion_r1472249622

natecraddock avatar Feb 07 '24 02:02 natecraddock

My motivation for this is I think at a bare minimum we should be able to tell the user why something fails. If parsing fails, I think it should have a way to tell the user where it failed and why.

Relevant https://github.com/ziglang/zig/issues/17995

This is how std.json does this I believe https://ziglang.org/documentation/master/std/#A;std:json.Diagnostics

I added logging as a simple way to achieve this functionality, since I hadn't looked into adding more complete diagnostics functionality yet

Perhaps we could look into replicating some of the functionality from std.json?

VisenDev avatar Feb 07 '24 15:02 VisenDev