Skip to content

Allow clients of Driver to pass DiagnosticsHandler #1317

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 2 commits into from
Mar 27, 2023

Conversation

MaxDesiatov
Copy link
Contributor

Uses of DiagnosticsEngine are deprecated in SwiftPM, since it uses a different logging infrastructure based on its own ObservabilityScope type. Resolving that deprecation warning is possible if Driver.init is able to take a diagnostics handler directly.

Uses of `DiagnosticsEngine` are deprecated in SwiftPM, since it uses a different logging infrastructure based on `ObservabilityScope` type. Resolving that deprecation warning is possible if `Driver.init` is able to take a diagnostics handler directly.
@MaxDesiatov MaxDesiatov requested review from tomerd and artemcm March 26, 2023 19:31
@MaxDesiatov MaxDesiatov self-assigned this Mar 26, 2023
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

MaxDesiatov added a commit to swiftlang/swift-package-manager that referenced this pull request Mar 26, 2023
Since uses of `DiagnosticsEngine` are deprecated in SwiftPM, with swiftlang/swift-driver#1317 we can remove any traces of it from `Basics/Observability.swift` to clean that up.
@MaxDesiatov MaxDesiatov requested a review from owenv March 26, 2023 21:03
@MaxDesiatov
Copy link
Contributor Author

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov MaxDesiatov merged commit a7104aa into main Mar 27, 2023
@MaxDesiatov MaxDesiatov deleted the maxd/diagnostics-handler branch March 27, 2023 16:01
MaxDesiatov added a commit to swiftlang/swift-package-manager that referenced this pull request Mar 27, 2023
Since uses of `DiagnosticsEngine` are deprecated in SwiftPM, with swiftlang/swift-driver#1317 we can remove any traces of it from `Basics/Observability.swift` to clean that up. 

Removed unused deprecated function that returned an instance of `DiagnosticsEngine`. Also broke up `import TSCBasic` into separate type imports to make clear what dependencies on TSC are there remaining.

`TSCBasic.Diagnostic` still remains, but I think long-term we can move that to Swift Driver codebase to reduce dependencies on TSC.
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