Why does Zig not compile some files

It looks like you have some sufficiently deep nesting to exceed the branch quota. This may be due to some comptime if or while loop, or deeply nested structs.
I believe this is in place to limit the compiler from getting stuck in loops or going too deep. Without having an idea of what all foo.zig imports, it is hard to tell.
You can read more about it in What is the eval branch quota?
You can do what it says to raise that limit by the following:

comptime {
    @setEvalBranchQuota(2000);
    std.testing.refAllDeclsRecursive(@import("foo.zig"));
}
1 Like