Skip to content

Changing Void() default parameters to avoid a recent compiler crasher #88

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

Merged
merged 1 commit into from
Oct 3, 2021

Conversation

BradLarson
Copy link
Contributor

Starting with the August 28, 2021 Swift.org nightly development snapshot, there is currently a compiler crasher when building Swift code that contains a default parameter of Void() with debug symbols enabled. This has been reported as SR-15181 and the Swift team is aware of it.

An easy way to work around this is to make the stylistic change from = Void() to = () in these default parameters. That no longer triggers the compiler crasher. I've done that here, because GraphQL was the only project in our dependencies that had an example of this specific crasher.

This crasher did not make its way into the 5.5 release, and most likely will be fixed before the next stable release, so I understand if you're hesitant to make this stylistic change based on what's probably a temporary crasher. We use compiler toolchains based on Swift head in order to employ the latest experimental differentiable Swift capabilities, and rely on GraphQL within our project, so we're a bit of a special case. This crasher is preventing us from stepping up our Swift toolchains to use Swift head, however.

Again, I understand if you don't want to make this change while this crasher is being looked into. The true fix is to address it at the source in the compiler, but I'm unsure how long that will take.

@paulofaria
Copy link
Member

I'm OK with this change.

@BradLarson
Copy link
Contributor Author

This is getting fixed at the source in the compiler: swiftlang/swift#39522 , so if that can be confirmed to address the issue I'll close this out.

@paulofaria
Copy link
Member

@NeedleInAJayStack Do you reckon this can be merged and added to the next release?

@NeedleInAJayStack
Copy link
Member

@paulofaria Sure!

@NeedleInAJayStack NeedleInAJayStack merged commit 15073b4 into GraphQLSwift:master Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants