buzz-language / buzz

👨‍🚀 buzz, A small/lightweight statically typed scripting language
https://buzz-lang.dev
MIT License
1.15k stars 31 forks source link

fix: zig 0.13.0-dev.46+3648d7df1 #276

Closed WriteNaN closed 1 month ago

WriteNaN commented 2 months ago

Minor change to work with zig v13

giann commented 2 months ago

Thanks.

It would be easier to review without all the reformatting. Can you try and remove those?

WriteNaN commented 2 months ago

sure, also tests were passing for me. i'll try debugging to see what caused the workflow to fail

WriteNaN commented 2 months ago

sorry for so many commits,

this commit has most of the changes which is very minor (switching from std.ComptimeStringMap).

that should be good now. lmk! 🙂

giann commented 2 months ago

No worries I'll squash all that :)

WriteNaN commented 2 months ago

that should be good?

giann commented 2 months ago

Almost: you should not have a else in the error switch. The new case should be the new zig error

WriteNaN commented 2 months ago

oh oops! haha sorry

WriteNaN commented 2 months ago

that should be it! :D

giann commented 2 months ago

The error must also exists on the buzz side. You can add it under here:

https://github.com/buzz-language/buzz/blob/main/src/lib/errors.buzz#L3

The following means we're going to push on the stack the error errors.FileSystemError.InvalidBatchScriptArg.

ctx.vm.pushErrorEnum("errors.FileSystemError", @errorName(err))

Right now zig errors have their counterpart on the buzz side but I plan on simplifying those a little on the buzz side (https://github.com/buzz-language/buzz/issues/157)

WriteNaN commented 2 months ago

The error must also exists on the buzz side. You can add it under here:

https://github.com/buzz-language/buzz/blob/main/src/lib/errors.buzz#L3

The following means we're going to push on the stack the error errors.FileSystemError.InvalidBatchScriptArg.

ctx.vm.pushErrorEnum("errors.FileSystemError", @errorName(err))

Right now zig errors have their counterpart on the buzz side but I plan on simplifying those a little on the buzz side (#157)

sorry I missed that, added now. Yes that is true. but I think the access to know what the error exactly is on buzz is also great.

giann commented 1 month ago

Huh. I'm not reproducing the CI error on my mac. Seems like the mir building step is doing it on a different cpu from the following steps.

giann commented 1 month ago

Merging anyway, i'll temporarily disable the macos test if this persists