Skip to content

[CSGen] SR-3668 fix for 3.1 branch #7004

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

Conversation

colinhowell
Copy link
Contributor

Adding the fix for SR-3668 (exponential dictionary literal behavior) to
the Swift 3.1 branch. Patch is identical to that already accepted in
master (cc28774).

This is the same fix for bug SR-3668 already accepted in master. The bug prevents what should be already be valid Swift sources from compiling, because longer dictionary literals can be rejected purely due to expression complexity.

This is potentially a very annoying bug for users; indeed, I stumbled upon it myself while working on a project in Stanford's online iOS programming course, watching it grind my machine to a halt as both the compiler and SourceKitService choked on a similar expression. See SR-2102 for someone else encountering a similar situation; from his example he was clearly working on the same course.

The fix makes no change to the language and should be safe for Swift 3.1 (and perhaps even for Swift 3.0 if any further dot releases from that branch are planned). I have run the test and validation-test targets on my macOS system for the patch on the swift-3.1-branch, and it passes.

As well as referring to the bug report, see my original PR-6973 for master to get a more extended description and further discussion.

@tkremenek: notifying you as 3.1 release manager.
@DougGregor: notifying you again, since you reviewed PR-6973.

Resolves SR-3668.

Adding the fix for SR-3668 (exponential dictionary literal behavior) to
the Swift 3.1 branch. Patch is identical to that already accepted in
master (cc28774).
@colinhowell
Copy link
Contributor Author

@swift-ci Please test

@gottesmm
Copy link
Contributor

drive by test. Not an endorsement.

@gottesmm
Copy link
Contributor

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - e4ae3f0
Test requested by - @gottesmm

@colinhowell
Copy link
Contributor Author

I find the OS X failure rather disappointing and puzzling; from the console output it seems totally unrelated to my patch...

By the way, I'm wondering if I can't actually invoke CI runs because I'm too new. I've seen nothing about this in your CI documentation, but such a policy would make sense to me; you don't want random people spamming the CI setup. Does that mean that for now I should hold off on sending CI messages?

@slavapestov
Copy link
Contributor

The macOS failure is a known issue. We'll look into it.

@slavapestov
Copy link
Contributor

@swift-ci Please test macOS

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - e4ae3f0
Test requested by - @slavapestov

@slavapestov slavapestov self-assigned this Jan 25, 2017
@slavapestov
Copy link
Contributor

The Clang issue should now be resolved.

@slavapestov
Copy link
Contributor

@swift-ci Please test macOS

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - e4ae3f0
Test requested by - @slavapestov

@DougGregor
Copy link
Member

@swift-ci Please test macOS

1 similar comment
@DougGregor
Copy link
Member

@swift-ci Please test macOS

@ematejska ematejska merged commit aad0f8c into swiftlang:swift-3.1-branch Jan 26, 2017
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.

6 participants