Skip to content

[ConstraintSystem] Adjust expression complexity computation to account for multi-statement closures #41282

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 5 commits into from
Feb 10, 2022

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Feb 8, 2022

Each conjunction element should get their own number of scopes and time slice,
otherwise the larger the closure the sooner constraint solver would trigger
'too complex' incorrectly.

xedin added 5 commits February 8, 2022 14:33
Each conjunction step should be executed in isolation from outer
constraint system state, which should also include scope counter
because otherwise, e.g. for large closures, solver might stop
prematurely since all of the previous statements/expressions would
contribute to the scope total.
Instead of asking callers of `isExpired` to provide the threshold,
let's ask for that upfront. This change also allows us to check how
much time remains in the timer and build timers with different
thresholds without having to safe that information somewhere else.
Original timer cannot be used each expression in the multi-statement
closure is type-checked independently.
@xedin xedin requested a review from hborla February 8, 2022 23:27
@xedin
Copy link
Contributor Author

xedin commented Feb 9, 2022

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 9, 2022

Build failed
Swift Test OS X Platform
Git Sha - 1636ee8

@xedin
Copy link
Contributor Author

xedin commented Feb 9, 2022

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

swift-ci commented Feb 9, 2022

Build failed
Swift Test OS X Platform
Git Sha - 1636ee8

@xedin
Copy link
Contributor Author

xedin commented Feb 9, 2022

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

swift-ci commented Feb 9, 2022

Build failed
Swift Test OS X Platform
Git Sha - 1636ee8

@xedin
Copy link
Contributor Author

xedin commented Feb 9, 2022

@swift-ci please test macOS platform

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