capy-ui / capy

💻Build one codebase and get native UI on Windows, Linux and Web
https://capy-ui.org
Mozilla Public License 2.0
1.6k stars 60 forks source link

Broken on newer zig versions (not sure since when) #51

Closed sudokit closed 1 year ago

sudokit commented 1 year ago

At somepoint they changed something that now you cant just pass a string, you need to pass a "LazyPath". Something like:

b.someFunc(.{.path="/file/path"});

and some other changes too.

user@user-NC-A315-51-56HD ~/D/d/zgui (main)> zig build run
/home/user/Documents/dev/zgui/.zigmod/deps/git/github.com/capy-ui/capy/build_capy.zig:147:54: error: expected type 'Build.LazyPath', found '*const [102:0]u8'
                .x86_64 => step.addObjectFile(prefix ++ "/src/backends/win32/res/x86_64.o"),
                                              ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/.local/bin/zig-linux-x86_64-0.12.0-dev.1+a327d8b99/lib/std/Build.zig:1672:22: note: union declared here
pub const LazyPath = union(enum) {
                     ^~~~~
/home/user/.local/bin/zig-linux-x86_64-0.12.0-dev.1+a327d8b99/lib/std/Build/Step/Compile.zig:1013:46: note: parameter type declared here
pub fn addObjectFile(self: *Compile, source: LazyPath) void {
                                             ^~~~~~~~
referenced by:
    build: /home/user/Documents/dev/zgui/build.zig:23:42
    runBuild__anon_7154: /home/user/.local/bin/zig-linux-x86_64-0.12.0-dev.1+a327d8b99/lib/std/Build.zig:1639:37
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

Not really sure.

Tried on 0.12.0-dev.1+a327d8b99 and zig-0.11.0-dev.4408+9e19969e0

zenith391 commented 1 year ago

Fixed by #54