foxnne / pixi

Pixel art editor made with Zig.
https://foxnne.github.io/pixi/
MIT License
645 stars 20 forks source link

Failing test on macOS #21

Closed kamidev closed 11 months ago

kamidev commented 11 months ago

Steps to reproduce

➜  pixi git:(main) zig build test
zig test Debug native: error: the following command failed with 1 compilation errors:
/Users/jonas/src/zig/zig/build/stage3/bin/zig test /Users/jonas/src/zig/pixi/src/pixi.zig --cache-dir /Users/jonas/src/zig/pixi/zig-cache --global-cache-dir /Users/jonas/.cache/zig --name test --listen=-
Build Summary: 0/3 steps succeeded; 1 failed (disable with --summary none)
test transitive failure
└─ run test transitive failure
   └─ zig test Debug native 1 errors
src/pixi.zig:7:23: error: no package named 'zstbi' available within package 'root'
const zstbi = @import("zstbi");
                      ^~~~~~~
referenced by:
    test_0: src/pixi.zig:39:9
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

Test environement

➜  pixi git:(main) git log -1 | tee
commit 968c7a234bc361d0870bdb12a680700ded8f5e26
Author: foxnne <foxnne@gmail.com>
Date:   Wed Aug 9 15:59:49 2023 -0500

    hotkeys: Fix issue where some hotkeys wouldnt work building release_fast

➜  pixi git:(main) git log -1 | tee
commit 968c7a234bc361d0870bdb12a680700ded8f5e26
Author: foxnne <foxnne@gmail.com>
Date:   Wed Aug 9 15:59:49 2023 -0500

    hotkeys: Fix issue where some hotkeys wouldnt work building release_fast
➜  pixi git:(main) sw_vers; clang --version; zig version
ProductName:        macOS
ProductVersion:     13.5
BuildVersion:       22G74
Homebrew clang version 16.0.6
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin
0.12.0-dev.47+0461a64a9
kamidev commented 11 months ago

I don't think this is a big thing, pixi itself runs and looks good. Can you reproduce this?

foxnne commented 11 months ago

Hey! I haven't even written any tests yet to be honest... But I just pushed a small change to build.zig that resolves the error you had. I do think it would be good to add some tests though.

kamidev commented 10 months ago

Yes, it works like a charm now! What kind of tests do you think would be most useful?