ziglings
ziglings copied to clipboard
Exercise 84 fails to compile with Zig 0.11 (dev)
I realize this is not a fault of exercise 84 itself, as the issue is with the compiler changes.
Anyway, with zig 0.11.0-dev.1390+74b72a766 , zig build 84
prints out the following error:
error: unrecognized parameter: '-fstage1'
084_async.zig: The following command exited with error code 1:
/usr/lib/zig/zig build-exe -fstage1 /home/archie/projects/ziglings/exercises/084_async.zig --cache-dir /home/archie/projects/ziglings/zig-cache --enable-cache
If I remove -fstage1
and run
/usr/lib/zig/zig build-exe /home/archie/projects/ziglings/exercises/084_async.zig --cache-dir /home/archie/projects/ziglings/zig-cache --enable-cache
I get:
exercises/084_async.zig:51:30: error: async has not been implemented in the self-hosted compiler yet
var foo_frame = async foo();
~~~~~~~~~^~
With Zig 0.10.1 zig build 84
works fine.
Thank you, I will take a look at it. Maybe stage 1 is no longer necessary for compile async. After all, that was an auxiliary construct because of the constant developing in zig.
Indeed, Andrew removed the async feature with the stage 1 dependency in 0.11: langref: eliminate dependencies on stage1. It seems that we need to disable these exercises as long as they cannot be compiled with the current Zig version.
Well, async exercises do work with current stable Zig (0.10.1), so maybe just mention that in their comment sections, at the top of their source files.
I don't think that would be helpful at this point. First, 'ziglings' no longer builds on zig 0.10, and second, we don't know how the asynchronous functions will work in the future. We don't want to convey anything wrong if possible. As soon as they are available again, I will look at them again. I have set the flag for that.
Is this related to that steps 84-91 is missing from build?
yes
Unfortunately the async functions will not be included again in release 0.11: The Upcoming Release Postponed Two More Weeks and Lacks Async Functions
Is there any prediction on when the feature will be included again?
Is there any prediction on when the feature will be included again?
I suspect that it will take some time, since async requires Result Location Semantics but currently this feature is broken. See https://www.youtube.com/watch?v=dEIsJPpCZYg&t=1267s; async is cited at around https://youtu.be/dEIsJPpCZYg?t=1313s.
Thanks, @perillo