How do I get an error return trace on the build script?

I’ve got an error: IsDir coming out of by build script right now, how do I get an error return trace for it?

Errors in the build.zig file can beva little opaque. If it is a compiler bug, then you will need a debug build of the compiler to track it down. It it is somethign wrong with your build script, then you will need to find where it is expecting a file but you are passing in a directory. This is either from a dependency or a b.path() call.

Does your build function use !void as return type and return the error?
If I do that I get an error return trace.

It’s ended up being a build system bug: std.Build.Cache.addDepFile fails if the dep file contains directories · Issue #23055 · ziglang/zig · GitHub

1 Like