Skip to content

Improve diagnostics for import failures #2919

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

Conversation

adrian-prantl
Copy link

@adrian-prantl adrian-prantl commented May 6, 2021

rdar://76217088

@adrian-prantl adrian-prantl requested a review from kastiglione May 6, 2021 01:48
@adrian-prantl
Copy link
Author

@swift-ci test

… buffers.

Without this, module import failures in the expression evaluator are
completely opaque to the end-user and they need to look at the types
log.

rdar://76217088
@adrian-prantl
Copy link
Author

@swift-ci test

// Append any last remaining text.
if (start_pos < diagnostic.description.size())
if (first_line > 0 && bufferID != UINT32_MAX) {
// Make sure the error line is in range or in another file.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or in another file

maybe I don't know this code, but is this supposed to be "and not in another file"

diagnostic.bufferID == bufferID

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code wants to suppress all errors that are in the main buffer and out of range. It displays all errors that are either

  • in the main buffer inside the range
  • in another file

@adrian-prantl
Copy link
Author

@swift-ci test

1 similar comment
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 2848fe7 into swiftlang:swift/release/5.5 May 7, 2021
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.

2 participants