-
Notifications
You must be signed in to change notification settings - Fork 341
[lldb] Handle diagnostics better around expression evaulation retries #7834
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
[lldb] Handle diagnostics better around expression evaulation retries #7834
Conversation
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm generally fine with the approach, I would just like you to double-check that SwiftASTContext::GetScopedDiagnosticConsumer() isn't better suited for the job.
An maybe the answer is no |
Do you have a testcase? |
As I understand it, SwiftASTContext::GetScopedDiagnosticConsumer is used to capture diagnostics generated by the swift compiler, in this case we're dealing with the more general lldb diagnostics. |
4ab2079
to
f4ad8b3
Compare
In some situations it may be useful to have a separate DiagnosticManager instance, and then later of move the contents of that instance back to the "main" DiagnosticManager. For example, when silently retrying some operation with different parameters, depending on whether the retry succeeded or failed, LLDB may want to present a different set of diagnostics to the user (the ones generated on the first try vs the retry). Implement DiagnosticManager::Consume to allow for this use case.
f4ad8b3
to
2144172
Compare
@swift-ci test |
@adrian-prantl had to change my approach a little, if we decide this is the way to go I'll upstream the patch that adds |
@swift-ci test windows |
2144172
to
98b0457
Compare
@swift-ci test |
lldb/test/API/lang/swift/private_generic_type/TestSwiftPrivateGenericType.py
Outdated
Show resolved
Hide resolved
The error message produced when expression evaluation parsing failed with automatic retries was not great, and would confuse many users. Change the logic around what diagnostics should be displayed to the user if expression evaluation parsing retry also fails to show the original error message. rdar://118057664
98b0457
to
5e4ece7
Compare
@swift-ci test |
@swift-ci test Windows |
@swift-ci test macOS |
@swift-ci test Windows |
@swift-ci test macOS |
@swift-ci test Windows |
@swift-ci test macos |
1 similar comment
@swift-ci test macos |
The error message produced when expression evaluation parsing failed with automatic retries was not great, and would confuse many users. Change the logic around what diagnostics should be displayed to the user if expression evaluation parsing retry also fails to show the original error message.
rdar://118057664