You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use -solver-memory-threshold as a way to keep compile times low in our large codebase in a consistent manner (as opposed to -warn-long-function-bodies which varies from machine to machine).
With Swift 4.1, we notice the warnings no longer seem to appear. I suspect it's due to the changes introduced in 5f2aeec.
My guess is that this clause:
// If we haven't explored a relatively large number of possibilities// yet, continue.if (CountScopes <= 16 * 1024)
returnfalse;
causes an early exit from the getExpressionTooComplex() and it never gets to the end of the fucntion, where the memory threshold check is done.
It would be good to move the memory check early so that it's still honored for those users who do wish to limit the complexity of expressions allowed in their codebase.
If this is not reasonable, then perhaps we could allow user to tune the hard-coded 16K number in the number of scopes check in the code snippet above.
The text was updated successfully, but these errors were encountered:
Environment
Xcode 9.3 + Swift 4.1
Additional Detail from JIRA
md5: 7784df6ff9a74c6acba95a1b9ce78f77
Issue Description:
We use
-solver-memory-threshold
as a way to keep compile times low in our large codebase in a consistent manner (as opposed to-warn-long-function-bodies
which varies from machine to machine).With Swift 4.1, we notice the warnings no longer seem to appear. I suspect it's due to the changes introduced in 5f2aeec.
My guess is that this clause:
causes an early exit from the
getExpressionTooComplex()
and it never gets to the end of the fucntion, where the memory threshold check is done.It would be good to move the memory check early so that it's still honored for those users who do wish to limit the complexity of expressions allowed in their codebase.
If this is not reasonable, then perhaps we could allow user to tune the hard-coded 16K number in the number of scopes check in the code snippet above.
The text was updated successfully, but these errors were encountered: