kubkon / zig-yaml

YAML parser for Zig
MIT License
139 stars 37 forks source link

Tests fail on zig 0.8.1 #4

Closed kilgariff closed 1 year ago

kilgariff commented 3 years ago

When running zig build test using zig 0.8.1 on Windows, the following test fails: test "double quoted string"... FAIL (TestUnexpectedResult)

The stack trace is long and I wasn't able to follow it, but it starts like this:


C:\Users\ross\Desktop\zig\lib\std\fmt\parse_float.zig:360:20: 0x7ff78749ca3b in std.fmt.parse_float.parseFloat (test.obj)
    return switch (try parseRepr(s, &r)) {
                   ^
C:\Users\ross_nk\Desktop\k8s_explorer\libs\zig-yaml\src\main.zig:59:28: 0x7ff7874ac396 in Value::Value.asList (test.obj)
        if (self != .list) return error.TypeMismatch;
                           ^
C:\Users\ross_nk\Desktop\k8s_explorer\libs\zig-yaml\src\main.zig:59:28: 0x7ff7874ac396 in Value::Value.asList (test.obj)
        if (self != .list) return error.TypeMismatch;
                           ^
C:\Users\ross_nk\Desktop\k8s_explorer\libs\zig-yaml\src\main.zig:59:28: 0x7ff7874ac396 in Value::Value.asList (test.obj)
        if (self != .list) return error.TypeMismatch;
                           ^
C:\Users\ross\Desktop\zig\lib\std\heap\arena_allocator.zig:115:13: 0x7ff7874a30a0 in std.heap.arena_allocator.ArenaAllocator::std.heap.arena_allocator.ArenaAllocator.resize (test.obj)
            return error.OutOfMemory;
            ^
C:\Users\ross\Desktop\zig\lib\std\heap\general_purpose_allocator.zig:618:13: 0x7ff787482313 in std.heap.general_purpose_allocator.GeneralPurposeAllocator((struct std.heap.general_purpose_allocator.Config constant))::std.heap.general_purpose_allocator.GeneralPurposeAllocator((struct std.heap.general_purpose_allocator.Config constant)).resize (test.obj)
            return error.OutOfMemory;
            ^
C:\Users\ross\Desktop\zig\lib\std\mem\Allocator.zig:315:16: 0x7ff7874cea87 in std.mem.Allocator.resize (test.obj)
    const rc = try self.resizeFn(self, old_byte_slice, Slice.alignment, new_byte_count, 0, @returnAddress());
               ^
C:\Users\ross\Desktop\zig\lib\std\fmt.zig:1655:25: 0x7ff7874d1c9a in std.fmt.charToDigit (test.obj)
    if (value >= radix) return error.InvalidCharacter;
nektro commented 2 years ago

does it produce the same results if you try master?

kubkon commented 2 years ago

Hi @kilgariff. Without the full stack trace I won't be able to help you debug it I'm afraid. Anyhow, in 424bef4 I've pushed changes that update the codebase to the latest breaking changes in Zig upstream before the upcoming 0.9.0 release. Would you mind trying it out again with the latest Zig nightly? You can download a prebuilt binary from here.

kubkon commented 1 year ago

Since there has been no activity with this since my last comment almost a year ago, I am closing the issue. Please feel free to reopen if you feel otherwise.