jetzig-framework / jetzig

Jetzig is a web framework written in Zig
MIT License
572 stars 25 forks source link

quickstart fails on macos M2 #110

Closed Tenari closed 2 weeks ago

Tenari commented 2 weeks ago

following https://www.jetzig.dev/documentation.html and it fails on zig build run with:

tenari@dzs-MacBook-Pro zig_app % zig build run
warning: [zmpl] Templates path not found: `src/app/mailers` - skipping.
run
└─ run zig_app
   └─ install
      └─ install zig_app
         └─ zig build-exe zig_app Debug native
            └─ run manifest (zmpl.manifest.zig)
               └─ zig build-exe manifest Debug native 1 errors
/Users/tenari/zig/0.14.0-dev.2164+6b2c8fc68/lib/std/static_string_map.zig:163:59: error: expected type 'zmd.tokens.Element', found 'zmd.tokens.toggles__struct_7224'
                sorted_vals[i] = if (V == void) {} else kv.@"1";
                                                        ~~^~~~~
/Users/tenari/.cache/zig/p/12208a01a7c10d0583f253787cf7271587d9509862f34e2b6d754cade7bc08500ef6/src/zmd/tokens.zig:80:25: note: struct declared here
            .{ "code", .{ .type = .code_close, .syntax = "`" } },
                       ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tenari/.cache/zig/p/12208a01a7c10d0583f253787cf7271587d9509862f34e2b6d754cade7bc08500ef6/src/zmd/tokens.zig:39:21: note: struct declared here
pub const Element = struct {
                    ^~~~~~
/Users/tenari/zig/0.14.0-dev.2164+6b2c8fc68/lib/std/static_string_map.zig:85:35: note: called from here
                self.initSortedKVs(kvs_list, &sorted_keys, &sorted_vals);
                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tenari/.cache/zig/p/12208a01a7c10d0583f253787cf7271587d9509862f34e2b6d754cade7bc08500ef6/src/zmd/tokens.zig:78:46: note: called from here
    std.StaticStringMap(Element).initComptime(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
referenced by:
    firstToken: /Users/tenari/.cache/zig/p/12208a01a7c10d0583f253787cf7271587d9509862f34e2b6d754cade7bc08500ef6/src/zmd/Ast.zig:136:19
    tokenize: /Users/tenari/.cache/zig/p/12208a01a7c10d0583f253787cf7271587d9509862f34e2b6d754cade7bc08500ef6/src/zmd/Ast.zig:67:28
    12 reference(s) hidden; use '-freference-trace=14' to see all references
error: the following command failed with 1 compilation errors:
/Users/tenari/zig/0.14.0-dev.2164+6b2c8fc68/zig build-exe -ODebug --dep zmpl_options --dep zmd -Mroot=/Users/tenari/.cache/zig/p/1220e1e95a5479b24e1c5448c5dc4ad283a01050617d0e5d9ff1c7e7283c639df24a/src/manifest/main.zig --dep zmd -Mzmpl_options=/Users/tenari/code/galactic_conquest/zig_app/.zig-cache/o/d8e84659c582a6eecb744b495cd3f5f6/zmpl_options.zig -Mzmd=/Users/tenari/.cache/zig/p/12208a01a7c10d0583f253787cf7271587d9509862f34e2b6d754cade7bc08500ef6/src/zmd.zig --cache-dir /Users/tenari/code/galactic_conquest/zig_app/.zig-cache --global-cache-dir /Users/tenari/.cache/zig --name manifest --zig-lib-dir /Users/tenari/zig/0.14.0-dev.2164+6b2c8fc68/lib/ --listen=-
Build Summary: 5/16 steps succeeded; 1 failed
run transitive failure
└─ run zig_app transitive failure
   ├─ zig build-exe zig_app Debug native transitive failure
   │  ├─ run manifest (zmpl.manifest.zig) transitive failure
   │  │  └─ zig build-exe manifest Debug native 1 errors
   │  ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  ├─ run routes (routes.zig) transitive failure
   │  │  └─ zig build-exe routes Debug native transitive failure
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     └─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  ├─ run static (static.zig) transitive failure
   │  │  └─ zig build-exe static Debug native transitive failure
   │  │     ├─ run routes (routes.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run routes (routes.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run routes (routes.zig) (+1 more reused dependencies)
   │  │     ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  │     ├─ run routes (routes.zig) (+1 more reused dependencies)
   │  │     └─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  ├─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   │  ├─ run routes (routes.zig) (+1 more reused dependencies)
   │  └─ run manifest (zmpl.manifest.zig) (+1 more reused dependencies)
   └─ install transitive failure
      └─ install zig_app transitive failure
         └─ zig build-exe zig_app Debug native (+21 more reused dependencies)
error: the following build command failed with exit code 1:
/Users/tenari/code/galactic_conquest/zig_app/.zig-cache/o/e7c2f60b6a649b6d26b5e8b9d3b2a795/build /Users/tenari/zig/0.14.0-dev.2164+6b2c8fc68/zig /Users/tenari/zig/0.14.0-dev.2164+6b2c8fc68/lib /Users/tenari/code/galactic_conquest/zig_app /Users/tenari/code/galactic_conquest/zig_app/.zig-cache /Users/tenari/.cache/zig --seed 0x2da71e6e -Z53981de1f8f3f31d run
bobf commented 2 weeks ago

@Tenari This is fixed on main - run jetzig update to update your repository.

The issues were introduced by this change in Zig: https://github.com/ziglang/zig/pull/21817

All tests are passing after my changes but if you see anything still broken let me know and I'll fix this evening.

Tenari commented 2 weeks ago

thanks, works