This repo looked intriguing and I tested with a simple program. I referenced it in my build.zig.zon like so:
.dependencies = .{
.zluajit = .{
.url = "https://github.com/negrel/zluajit/archive/master.tar.gz",
.hash = "zluajit-0.0.0-uJQ3ftaEAgDULad56s56MBO_eAZtrwqrDLnHIy8OnJGx",
},
},
Building on Windows failed with an error about this function from build/patch.zig:
|
fn getLine(allocator: Allocator, file: File) ?[]u8 { |
|
return file.reader().readUntilDelimiterAlloc(allocator, '\n', std.math.maxInt(usize)) catch |err| switch (err) { |
|
error.EndOfStream => return null, |
|
else => @panic("Error"), |
|
}; |
|
} |
This is the compiler output:
> zig build
install
└─ install repro
└─ compile exe repro Debug native
└─ compile lib lua Debug native
└─ run exe buildvm (lj_bcdef.h)
└─ compile exe buildvm ReleaseSafe native
└─ run exe minilua (buildvm_arch.h)
└─ run exe patch (dynasm-patched.lua)
└─ compile exe patch Debug native 1 errors
C:\Users\nil4\AppData\Local\zig\p\zluajit-0.0.0-uJQ3ftaEAgDULad56s56MBO_eAZtrwqrDLnHIy8OnJGx\build\patch.zig:70:16: error: member function expected 1 argument(s), found 0
return file.reader().readUntilDelimiterAlloc(allocator, '\n', std.math.maxInt(usize)) catch |err| switch (err) {
~~~~^~~~~~~
C:\utils\misc\zig\lib\std\fs\File.zig:2104:5: note: function declared here
pub fn reader(file: File, buffer: []u8) Reader {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
next: C:\Users\nil4\AppData\Local\zig\p\zluajit-0.0.0-uJQ3ftaEAgDULad56s56MBO_eAZtrwqrDLnHIy8OnJGx\build\patch.zig:92:33
main: C:\Users\nil4\AppData\Local\zig\p\zluajit-0.0.0-uJQ3ftaEAgDULad56s56MBO_eAZtrwqrDLnHIy8OnJGx\build\patch.zig:24:37
4 reference(s) hidden; use '-freference-trace=6' to see all references
error: the following command failed with 1 compilation errors:
"C:\\utils\\misc\\zig\\zig.exe" build-exe "-Mroot=C:\\Users\\nil4\\AppData\\Local\\zig\\p\\zluajit-0.0.0-uJQ3ftaEAgDULad56s56MBO_eAZtrwqrDLnHIy8OnJGx\\build\\patch.zig" --cache-dir .zig-cache --global-cache-dir "C:\\Users\\nil4\\AppData\\Local\\zig" --name patch --zig-lib-dir "C:\\utils\\misc\\zig\\lib\\" --listen=-
Am I doing something wrong, or is this code incompatible with Zig 15?
I spotted some changes (e.g. removing this function) in natecraddock/ziglua which were to be related to Zig 15:
natecraddock/ziglua@a501a06#diff-d0e6291f9a4c8d6ba60c3fa96cca00f0f1078cf3e12c6c8061db24ba8bec4a38L88-L95
And I'm wondering if those changes are needed to make this repo compatible?
This repo looked intriguing and I tested with a simple program. I referenced it in my
build.zig.zonlike so:Building on Windows failed with an error about this function from
build/patch.zig:zluajit/build/patch.zig
Lines 69 to 74 in 0b98b58
This is the compiler output:
Am I doing something wrong, or is this code incompatible with Zig 15?
I spotted some changes (e.g. removing this function) in
natecraddock/zigluawhich were to be related to Zig 15:natecraddock/ziglua@a501a06#diff-d0e6291f9a4c8d6ba60c3fa96cca00f0f1078cf3e12c6c8061db24ba8bec4a38L88-L95
And I'm wondering if those changes are needed to make this repo compatible?