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
[SR-12473] ASTScopeImpl: resorting to startingScope hack #54913
Comments
cc davidungar (JIRA User) |
Comment by David Ungar (JIRA) I'm sorry to see that. If you can send me any source code that reproduces the issue, I'll fix it. Sometimes, these errors happen when a lookup is performed in the wrong scope. Other times, they happen because the compiler internally has the wrong source range. |
Comment by David Ungar (JIRA)
|
I'll try to get you some sources. Thanks! |
Comment by David Ungar (JIRA) Wonderful! Thank you. |
> swiftc SR-12473.swift
ASTScopeImpl: resorting to startingScope hack, file: /Users/z002wrr/Desktop/SR-12473.swift
'Message' loc: /Users/z002wrr/Desktop/SR-12473.swift:43:41
starting context:
0x7fde3c808478 Module name=main
0x7fde3c0c6208 FileUnit file="/Users/z002wrr/Desktop/SR-12473.swift"
0x7fde3c0c9e18 ClassDecl name=Manager
0x7fde3c0ca498 AbstractFunctionDecl name=present() : (Manager) -> () -> ()
0x7fde3c0ca758 AbstractClosureExpr line=38 : <null>
0x7fde3c0ca9c0 AbstractClosureExpr line=39 : () -> Void
0x7fde3c0cad70 AbstractClosureExpr line=42 : (Error) -> Void
ASTScopeImpl: resorting to startingScope hack, file: /Users/z002wrr/Desktop/SR-12473.swift
'Message' loc: /Users/z002wrr/Desktop/SR-12473.swift:44:39
starting context:
0x7fde3c808478 Module name=main
0x7fde3c0c6208 FileUnit file="/Users/z002wrr/Desktop/SR-12473.swift"
0x7fde3c0c9e18 ClassDecl name=Manager
0x7fde3c0ca498 AbstractFunctionDecl name=present() : (Manager) -> () -> ()
0x7fde3c0ca758 AbstractClosureExpr line=38 : <null>
0x7fde3c0ca9c0 AbstractClosureExpr line=39 : () -> Void
0x7fde3c0cad70 AbstractClosureExpr line=42 : (Error) -> Void
ASTScopeImpl: resorting to startingScope hack, file: /Users/z002wrr/Desktop/SR-12473.swift
'Message' loc: /Users/z002wrr/Desktop/SR-12473.swift:45:55
starting context:
0x7fde3c808478 Module name=main
0x7fde3c0c6208 FileUnit file="/Users/z002wrr/Desktop/SR-12473.swift"
0x7fde3c0c9e18 ClassDecl name=Manager
0x7fde3c0ca498 AbstractFunctionDecl name=present() : (Manager) -> () -> ()
0x7fde3c0ca758 AbstractClosureExpr line=38 : <null>
0x7fde3c0ca9c0 AbstractClosureExpr line=39 : () -> Void
0x7fde3c0cad70 AbstractClosureExpr line=42 : (Error) -> Void
ASTScopeImpl: resorting to startingScope hack, file: /Users/z002wrr/Desktop/SR-12473.swift
'PresentAlert' loc: /Users/z002wrr/Desktop/SR-12473.swift:47:25
starting context:
0x7fde3c808478 Module name=main
0x7fde3c0c6208 FileUnit file="/Users/z002wrr/Desktop/SR-12473.swift"
0x7fde3c0c9e18 ClassDecl name=Manager
0x7fde3c0ca498 AbstractFunctionDecl name=present() : (Manager) -> () -> ()
0x7fde3c0ca758 AbstractClosureExpr line=38 : <null>
0x7fde3c0ca9c0 AbstractClosureExpr line=39 : () -> Void
0x7fde3c0cad70 AbstractClosureExpr line=42 : (Error) -> Void |
Comment by David Ungar (JIRA) Fantastic! I'll be diving in. Thank you very much. |
I just wanted to chime in that this is still an issue in 5.2.4. |
Also Xcode 12 beta 2. |
This is fixed on master. I'll add a regression test. |
Attachment: Download
Additional Detail from JIRA
md5: 437546ca6ffb8aae48d47691faf5d113
Issue Description:
Compiling our project with Swift 5.2 we get a couple "ASTScopeImpl: resorting to startingScope hack" outputs in our build log:
The text was updated successfully, but these errors were encountered: