Skip to content

[Explicit Module Builds] Get source locations from the dependency scanner and emit diagnostics with them #1610

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
merged 1 commit into from
May 14, 2024

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented May 14, 2024

@artemcm artemcm requested review from owenv and nkcsgexi May 14, 2024 16:19
@@ -71,8 +72,18 @@ public enum DependencyScanningError: LocalizedError, DiagnosticData, Equatable {
}

@_spi(Testing) public struct ScannerDiagnosticPayload {
@_spi(Testing) public struct SourceLocation : DiagnosticLocation {
Copy link
Contributor

@owenv owenv May 14, 2024

Choose a reason for hiding this comment

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

Can we promote this type + its members to API so clients can attempt to cast to it / access the fields without parsing the textual representation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course. Done.

…nner and emit diagnostics with them

- Adopt new libSwiftScan API to get source location for each emitted diagnostic: buffer identifier, line number, column number.
@artemcm artemcm force-pushed the DepScanSourceLocs branch from f4e1328 to de435b9 Compare May 14, 2024 16:50
@artemcm
Copy link
Contributor Author

artemcm commented May 14, 2024

@swift-ci test

@artemcm artemcm merged commit 707ce7e into swiftlang:main May 14, 2024
3 checks passed
@artemcm artemcm deleted the DepScanSourceLocs branch May 14, 2024 21:17
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.

3 participants