-
Notifications
You must be signed in to change notification settings - Fork 314
When sourcekitd crashes, log the file contents with which it crashed and the request #933
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
When sourcekitd crashes, log the file contents with which it crashed and the request #933
Conversation
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.
Should we log similar for clangd?
// FIXME: Ideally we could log the request key here at the info level but the dictionary is | ||
// readonly. | ||
logger.log( | ||
logger.info( |
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.
What's default vs info? The docs weren't particularly illuminating.
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.
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.
Ah, so persisted vs not 👍
6228f3d
to
fb3bc8c
Compare
@swift-ci Please test |
for (index, chunk) in chunks.enumerated() { | ||
logger.fault( | ||
""" | ||
sourcekitd crashed (\(index + 1)/\(chunks.count)) | ||
\(chunk) | ||
""" | ||
) | ||
} |
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.
If OSLog treats this as private (which I believe is the default?), will we just log multiple sourcekitd crashed
lines with redacted chunks?
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.
Yes, we will. It’s a big unfortunate but I don’t have any better idea.
fb3bc8c
to
def98da
Compare
@swift-ci Please test |
def98da
to
4af0f71
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
1 similar comment
@swift-ci Please test Windows |
…and the request This should make it a lot easier to reproduce sourcekitd crashes.
4af0f71
to
1a23153
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
This should make it a lot easier to reproduce sourcekitd crashes.