google / promises

Promises is a modern framework that provides a synchronization construct for Swift and Objective-C.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Future versions of Swift reserve the word 'await'; if this name is unavoidable, use backticks to escape it

wilg opened this issue · comments

This warning appears on Xcode 12.5 beta 2.

Great! Many thanks for the heads up, Wil :)
Do you mind to do the change and send us a PR?
Thanks.

More an issue of the API design, since this library exposes a function called await.

Wil, I agree. If we take it in backticks, does it solve the issue?

The warning appears at the call site unfortunately (in user code, not the framework), so I think the only solution is to rename it or require all users of the API to use backticks to call await.

Presumably at some point this promises library will integrate with the official Swift async/await, so probably won't be an issue then, but will be an issue until then.

Gotcha, thanks for the details, Wil!
If we go the rename route, what name would you suggest for that API?

Maybe awaitPromise?

I like it!
Wil, can you make the change?