fix: restore fresh clone build and unit tests - #866
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Code Review Reviewed the diff between dbdf61b (base) and cbabc97 (head) for PR #866, which closes #863. Summary of the change:
Likely bug -- the new TypeOf(err) == TypeOf(warn) assertion: This lines up with what's currently showing on the PR: both build-test CI checks are failing. Since the whole point of this PR is to make 'zig build test-unit' pass on a fresh clone, this assertion likely reintroduces exactly the kind of failure the PR is trying to fix, just via a different mechanism (a bad assertion instead of a bad log level). Suggested fix: drop the TypeOf equality check. The 'comptime { _ = &err; }' line alone already achieves the stated goal (preserve compile-time coverage for err) by forcing Zig to semantically analyze err's body without invoking it at runtime (recall pub alone doesn't guarantee a declaration gets analyzed under Zig's lazy analysis -- it still needs to be referenced somewhere). The type-equality check doesn't add meaningful coverage (whether two unrelated logging functions have the same type isn't a real invariant worth asserting) and appears to be the actual cause of the current CI failure. Minor notes:
Overall: The Cargo workspace fix looks solid and correctly addresses the root cause described in #863. The log.zig test fix is on the right track (avoid calling err() at runtime) but the added TypeOf equality assertion is almost certainly incorrect for generic (anytype-parameter) functions and is likely why CI is currently red on this PR. Recommend removing that assertion before merging. Note: This review was performed by Claude AI assistant, not @roninjin10 or @fucory |
Summary
Testing
Closes #863
Thanks @vladfdp for the report.
Note: This action was performed by Claude AI assistant, not @roninjin10 or @fucory