Closed rhues closed 3 months ago
In https://github.com/jetzig-framework/jetzig/blob/main/cli/commands/init.zig, there is this code at line 97 to create the build.zig file in the new project:
try copySourceFile(
allocator,
install_dir,
"demo/build.zig",
"build.zig",
&[_]Replace{.{ .from = "jetzig-demo", .to = project_name }},
);
I think there should be a block of code like this for build.zig.zon
, but there is no reference at all to build.zig.zon
in init.zig
.
@rhues The reason we don't create build.zig.zon
is because running zig fetch ...
automatically creates one, so it is likely that command that is failing.
Could you try running this command directly ?
zig fetch --save=jetzig https://github.com/jetzig-framework/jetzig/archive/a0faada748a99d8665fedbe5a1c1c05e26664d78.tar.gz
After rebuilding, the problem was corrected, and build.zig.zon
was fetched successfully.
Using Zig 0.12.0 on both the latest Ubuntu and Windows 11 and the jetzig downloaded today 2024-05-24.
When running
jetzig init
, the resulting project in Windows is missing the build.zig.zon file, but the Ubuntu project has it.The result is the message in Windows:
error: no module named 'jetzig' available within module root.@build