Closed devara-gheist closed 2 months ago
@devara-gheist The issues you have been having were due to compatibility with different Zig versions (as it looks like you guessed by trying different versions).
Unfortunately a recent change to Zig master broke a lot of code (changes to Type
), including in some of Jetzig's dependencies. Luckily those dependencies have all been fixed and I've just pushed a commit to Jetzig's main
branch to include all the fixed dependencies plus a number of fixes to Jetzig and some other components of the framework (Zmpl, JetKV, Zmd).
All tests are passing for me on main
using latest Zig nightly (0.14.0-dev.1366+d997ddaa1
) and I'm able to run a server.
Using a pre-1.0 language can be quite interesting at times. :-)
Let me know if you're still having issues using latest Zig master.
hi thanks for the reply. I have installed Zig nightly and cloned the latest jetzig. Below is my zig version (same version as yours) :
On zig build install the jetzig cli I'm still encountering errors:
~/Downloads/jetzig/cli | main
> zig build install
install
└─ install jetzig
└─ zig build-exe jetzig Debug native 1 errors
commands/generate/view.zig:104:35: error: no field named 'Enum' in union 'builtin.Type'
inline for (@typeInfo(Method).Enum.fields) |tag| {
^~~~
/home/aabbcc/.zvm/master/lib/std/builtin.zig:259:18: note: union declared here
pub const Type = union(enum) {
^~~~~
referenced by:
run: commands/generate/view.zig:55:24
run__anon_3552: commands/generate.zig:94:30
7 reference(s) hidden; use '-freference-trace=9' to see all references
error: the following command failed with 1 compilation errors:
/home/aabbcc/.zvm/master/zig build-exe -ODebug --dep args --dep init_data -Mroot=/home/aabbcc/Downloads/jetzig/cli/cli.zig -Margs=/home/aabbcc/.cache/zig/p/1220411a8c46d95bbf3b6e2059854bcb3c5159d428814099df5294232b9980517e9c/args.zig -Minit_data=/home/aabbcc/Downloads/jetzig/cli/.zig-cache/o/cd7c89230911e4949d77db55abab12d2/init_data.zig --cache-dir /home/aabbcc/Downloads/jetzig/cli/.zig-cache --global-cache-dir /home/aabbcc/.cache/zig --name jetzig --zig-lib-dir /home/aabbcc/.zvm/master/lib/ --listen=-
Build Summary: 1/4 steps succeeded; 1 failed
install transitive failure
└─ install jetzig transitive failure
└─ zig build-exe jetzig Debug native 1 errors
error: the following build command failed with exit code 1:
/home/aabbcc/Downloads/jetzig/cli/.zig-cache/o/cb1f1fa5ddcc209121e250bad1bc1791/build /home/aabbcc/.zvm/master/zig /home/aabbcc/.zvm/master/lib /home/aabbcc/Downloads/jetzig/cli /home/aabbcc/Downloads/jetzig/cli/.zig-cache /home/aabbcc/.cache/zig --seed 0x71d457a -Z78dfbb728d2f17de install
yeah got stuck on: no field named 'Enum' in union 'builtin.Type'. Again thanks for the help, appreciate it!
Ah, I missed one ! I just pushed a fix to main
.
I created a new project using jetzig init
(after compiling the CLI tool described here) and was able to launch the project successfully.
Thanks for your patience on this, hopefully everything will work for you now.
it's working!
Thanks for this, I've been looking to rewrite my Python webapps using Zig and now I'm one step closer via Jetzig. Cheers!
@devara-gheist Nice ! Feel free free to swing by our discord if you need help with anything, or just create issues here.
I'm using Zig version 0.12 and I followed the instruction both from Jetzig's youtube and website. Everything went fine until i execute: zig build run.
Got these error messages:
using ZVM i've tried zig build run using version 0.13.0 and master. The 0.13.0 got similar error messages to the 0.12.0 above, while master still encountering error:
Please advise.