Skip to content

[6.2] Sema: Fix -warn-long-expression-type-checking when expression timer is disabled #82508

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

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Jun 25, 2025

6.2 cherry-pick of #82506

  • Description: The 600-second expression timeout was a source of overhead so it was turned off in 6.2 (Basic: Turn off solver expression time threshold by default #78975) but this regressed the -warn-long-expression-type-checking flag. We need to start the timer if either the global timeout is enabled, or the warning is on.

  • Reviewed by: @xedin

  • Risk: Very low.

  • Radar: rdar://152998878

@slavapestov slavapestov requested a review from a team as a code owner June 25, 2025 22:58
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov changed the title Sema: Fix -warn-long-expression-type-checking when expression timer is disabled [6.2] Sema: Fix -warn-long-expression-type-checking when expression timer is disabled Jun 26, 2025
…s turned off

My change 983b75e broke
-warn-long-expression-type-checking because now the
ExpressionTimer is not instantiated by default and that
entire code path is skipped.

Change it so that if -warn-long-expression-type-checking
is passed in, we still start the timer, we just don't
ever consider it to have 'expired'.

Fixes rdar://problem/152998878.
@slavapestov slavapestov force-pushed the warn-long-expression-type-checking-6.2 branch from 54e436f to 017be57 Compare June 26, 2025 02:08
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@slavapestov slavapestov enabled auto-merge June 27, 2025 15:01
@slavapestov
Copy link
Contributor Author

@swift-ci Please test macOS

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please test macOS

@slavapestov slavapestov merged commit 68b9a52 into swiftlang:release/6.2 Jun 28, 2025
5 checks passed
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.

2 participants