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

Add -warn-long-expression-type-checking=<limit> frontend option. #10215

Merged
merged 1 commit into from Jun 14, 2017

Conversation

Projects
None yet
4 participants
@rudkx
Member

rudkx commented Jun 13, 2017

Explanation: Add a frontend option to generate a warning for any expression that takes longer than <limit> milliseconds to type check.

Scope: New hidden command-line option & diagnostic that is only enabled under that option.

Radar: rdar://problem/32619658

Risk: Very very small.

Testing: Added a new test case that shows the warning is being emitted. Ran the regression tests.

@rudkx

This comment has been minimized.

Member

rudkx commented Jun 13, 2017

@swift-ci Please test

@rudkx rudkx requested a review from DougGregor Jun 13, 2017

@rudkx rudkx added this to the Swift 4.0 milestone Jun 13, 2017

Add -warn-long-expression-type-checking=<limit> frontend option.
Generates a warning for any expression that takes longer than <limit>
milliseconds to type check. This compliments the existing
-warn-long-function-body=<limit> option.

(cherry picked from commit d26c859)
(cherry picked from commit a0ae313)
@rudkx

This comment has been minimized.

Member

rudkx commented Jun 13, 2017

@swift-ci Please test

@swift-ci

This comment has been minimized.

Contributor

swift-ci commented Jun 13, 2017

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 7f9f1c0aecdf5885aa41f3baa85249b6efdb1c24
Test requested by - @rudkx

@swift-ci

This comment has been minimized.

Contributor

swift-ci commented Jun 13, 2017

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 7f9f1c0aecdf5885aa41f3baa85249b6efdb1c24
Test requested by - @rudkx

@DougGregor

LGTM!

@ematejska ematejska merged commit beaec1b into apple:swift-4.0-branch Jun 14, 2017

4 checks passed

Swift Test Linux Platform 9912 tests run, 0 skipped, 0 failed.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform 49815 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform (smoke test)
Details

@rudkx rudkx deleted the rudkx:warn-long-compile-4.0 branch Jun 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment