Skip to content

Conversation

@andrewrk
Copy link
Member

@andrewrk andrewrk commented Jul 7, 2025

async and await keyword removal

Also remove @frameSize, closing #3654.

While the other machinery might remain depending on #23446, it is settled that there will not be async/ await keywords in the language.

usingnamespace removal

closes #20663

Comment on lines 248 to +249
/// 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,
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member Author

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.

@andrewrk andrewrk force-pushed the async-await-keywords branch from df4a0e2 to be1223c Compare July 7, 2025 19:29
.expected_pub_item,
.expected_param_list,
});
try testError(
Copy link
Contributor

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.

Copy link
Member Author

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

Copy link
Contributor

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.

Copy link
Member Author

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

andrewrk added 5 commits July 7, 2025 13:39
Also remove `@frameSize`, closing #3654.

While the other machinery might remain depending on #23446, it is
settled that there will not be `async`/ `await` keywords in the
language.
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.
@andrewrk andrewrk force-pushed the async-await-keywords branch from be1223c to 4ba0e7d Compare July 7, 2025 20:40
@andrewrk andrewrk changed the title remove async and await keywords remove async and await keywords; remove usingnamespace Jul 7, 2025
@andrewrk andrewrk added breaking Implementing this issue could cause existing code to no longer compile or have different behavior. release notes This PR should be mentioned in the release notes. labels Jul 7, 2025
@andrewrk andrewrk requested a review from mlugg July 7, 2025 20:42
@andrewrk andrewrk enabled auto-merge July 8, 2025 00:43
@andrewrk andrewrk merged commit fc2c188 into master Jul 8, 2025
10 checks passed
@andrewrk andrewrk deleted the async-await-keywords branch July 8, 2025 05:41
gwenzek added a commit to zml/zml that referenced this pull request Jul 21, 2025
Small PR to remove our last usingnamespace. 

Also usingnamespace will be out in 0.15.0:
ziglang/zig#24362
gwenzek added a commit to zml/zml that referenced this pull request Jul 23, 2025
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
steeve pushed a commit to zml/zml that referenced this pull request Aug 26, 2025
Small PR to remove our last usingnamespace.

Also usingnamespace will be out in 0.15.0:
ziglang/zig#24362
steeve pushed a commit to zml/zml that referenced this pull request Aug 27, 2025
Small PR to remove our last usingnamespace.

Also usingnamespace will be out in 0.15.0:
ziglang/zig#24362
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Implementing this issue could cause existing code to no longer compile or have different behavior. release notes This PR should be mentioned in the release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove usingnamespace

3 participants