-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
remove async and await keywords; remove usingnamespace
#24362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| /// The calling convention of a function that can be called with `async` syntax. An `async` call | ||
| /// of a runtime-known function must target a function with this calling convention. | ||
| /// Comptime-known functions with other calling conventions may be coerced to this one. | ||
| @"async", | ||
| async, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're doing a zig1.wasm update anyway, maybe worth taking the opportunity to remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That very likely will need to stay no matter how #23446 is resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That proposal says:
An async function must have
callconv(.auto).
That's what made me think that CallingConvention.async would go away, since this is explicitly unlike inline and callconv(.@"inline") which are both allowed and equivalent. cc @mlugg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt that proposal will be accepted as-is.
df4a0e2 to
be1223c
Compare
| .expected_pub_item, | ||
| .expected_param_list, | ||
| }); | ||
| try testError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this test remain? Doesn't seem like it is affected by this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async keyword used.
but also the recovery tests are all garbage, they should be positively testing for getting results, not only checking the error list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean it isn't used in:
threadlocal test "" {
@a & b;
}but noted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also error.ParseError should be removed from std.zig.Parse
necessary because to pass `zig fmt --check` we need to use the canonical identifier syntax, which means changing `.@"async"` to `.async` which previous zig1 is unable to parse.
be1223c to
4ba0e7d
Compare
async and await keywordsasync and await keywords; remove usingnamespace
Small PR to remove our last usingnamespace. Also usingnamespace will be out in 0.15.0: ziglang/zig#24362
Small PR to remove our last usingnamespace. Also usingnamespace will be out in 0.15.0: ziglang/zig#24362 # Conflicts: # .github/workflows/commit-framework.yaml # .github/workflows/commit.yaml
Small PR to remove our last usingnamespace. Also usingnamespace will be out in 0.15.0: ziglang/zig#24362
Small PR to remove our last usingnamespace. Also usingnamespace will be out in 0.15.0: ziglang/zig#24362
asyncandawaitkeyword removalAlso remove
@frameSize, closing #3654.While the other machinery might remain depending on #23446, it is settled that there will not be
async/awaitkeywords in the language.usingnamespaceremovalcloses #20663