Skip to content

Commit b323a50

Browse files
committed
Testing...
1 parent b54ac5c commit b323a50

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Sources/Workspace/DefaultPluginScriptRunner.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ public struct DefaultPluginScriptRunner: PluginScriptRunner, Cancellable {
121121

122122
// We use the toolchain's Swift compiler for compiling the plugin.
123123
var commandLine = [self.toolchain.swiftCompilerPathForManifests.pathString]
124+
125+
observabilityScope.emit(debug: "Using compiler \(self.toolchain.swiftCompilerPathForManifests.pathString)")
124126

125127
// Get access to the path containing the PackagePlugin module and library.
126128
let pluginLibraryPath = self.toolchain.swiftPMLibrariesLocation.pluginLibraryPath
@@ -208,6 +210,8 @@ public struct DefaultPluginScriptRunner: PluginScriptRunner, Cancellable {
208210
if (verboseOutput) {
209211
commandLine.append("-v")
210212
}
213+
214+
observabilityScope.emit(debug: "Using command line \(commandLine)")
211215

212216
// Pass through the compilation environment.
213217
let environment = toolchain.swiftCompilerEnvironment

Tests/SPMBuildCoreTests/PluginInvocationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ class PluginInvocationTests: XCTestCase {
413413
// Check the serialized diagnostics. We should no longer have an error but now have a warning.
414414
let diaFileContents = try localFileSystem.readFileContents(result.diagnosticsFile)
415415
let diagnosticsSet = try SerializedDiagnostics(bytes: diaFileContents)
416-
XCTAssertEqual(diagnosticsSet.diagnostics.count, 1)
416+
XCTAssertEqual(diagnosticsSet.diagnostics.count, 1, "unexpected diagnostics count in \(diagnosticsSet.diagnostics) from \(result.diagnosticsFile.pathString)")
417417
let warningDiagnostic = try XCTUnwrap(diagnosticsSet.diagnostics.first)
418418
XCTAssertTrue(warningDiagnostic.text.hasPrefix("variable \'unused\' was never used"), "\(warningDiagnostic)")
419419

0 commit comments

Comments
 (0)