-
Notifications
You must be signed in to change notification settings - Fork 18
zig 0.15.1 #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zig 0.15.1 #235
Conversation
|
Thanks for pulling this together @dasimmet! Looking good so far, but I have a question on the |
|
Ah yeah thanks for clarifying, I suppose we can also switch on the compiler backend instead of build mode, so debug builds with llvm can still use tail calls. The remaining errors in the test seems like a bug in zig's json parser in the 0.15.1 release... |
The testsuite was failing with:
```
zig-aarch64-macos-0.15.1/lib/std/json/static.zig:572:44: error: type 'f64' cannot represent integer value '18446744073709551615'
if (f > std.math.maxInt(T)) return error.Overflow;
```
Interestingly in an example .wast (e.g. test-token's token.wast) the
line numbers are 4 and 8:
```
{"source_filename": "/Users/malcolm/.cache/zig/p/N-V-__8AAKtbtgBFkB_BMIKSUqC-temKvHmuqBSvjBlf4hD6/token.wast",
"commands": [
{"type": "assert_malformed", "line": 4, "filename": "token.0.wat", "text": "unknown operator", "module_type": "text"},
{"type": "assert_malformed", "line": 8, "filename": "token.1.wat", "text": "unknown operator", "module_type": "text"}]}
```
which is hinting at maybe the json parser code running on
uninitialised data? Not sure.
Anyway, usize is way larger than we need anyway so dropping down to
u32 (say) is totally fine.
I've fixed the json parser issue by reducing the width of the integer for the The
index e1c8e46..974992d 100644
--- i/build.zig
+++ w/build.zig
@@ -34,14 +34,15 @@ pub fn build(b: *Build) !void {
const testrunner = b.addExecutable(.{
.name = "testrunner",
.root_module = b.addModule("testrunner", .{
.root_source_file = b.path("test/testrunner/src/testrunner.zig"),
.target = target,
.optimize = optimize,
}),
+ .use_llvm = true,
});
testrunner.root_module.addImport("zware", zware_module);
const testsuite_dep = b.dependency("testsuite", .{});
const testsuite_step = b.step("testsuite", "Run all the testsuite tests");
for (test_names) |test_name| { |
|
Thanks @dasimmet and @marler8997! |
No description provided.