Skip to content

Add extended logging to SwiftIntefaceTests.testSystemModuleInterface #705

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
Feb 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Tests/SourceKitLSPTests/SwiftInterfaceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import Foundation
import LanguageServerProtocol
import LSPTestSupport
import LSPLogging
import SKTestSupport
import SourceKitLSP
import XCTest
Expand Down Expand Up @@ -55,6 +56,17 @@ final class SwiftInterfaceTests: XCTestCase {
}

func testSystemModuleInterface() throws {
// This test is failing non-deterministically in CI becaue the file contents
// of the generated interface just contain a newline.
// I cannot reproduce the failure locally. Add some logging to determine
// whether the issue is sourcekitd not returning an empty generated
// interface or something around how the file is handled.
// Remove this lowering of the log level once we have determined what the
// issue is (rdar://104871745).
let previousLogLevel = Logger.shared.currentLevel
defer { Logger.shared.setLogLevel(previousLogLevel.description) }
Logger.shared.setLogLevel("debug")

let url = URL(fileURLWithPath: "/\(UUID())/a.swift")
let uri = DocumentURI(url)

Expand Down