Skip to content

Commit a1d4cd7

Browse files
committed
SwiftFixIt: make some of the private API more public
This extends the visibility of some of the private implementation to the package level to allow use for testing without `@testable` imports.
1 parent 5b58dc6 commit a1d4cd7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/SwiftFixIt/SwiftFixIt.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ private enum Error: Swift.Error {
4343
}
4444

4545
// FIXME: An abstraction for tests to work around missing memberwise initializers in `TSCUtility.SerializedDiagnostics`.
46-
protocol AnySourceLocation {
46+
package protocol AnySourceLocation {
4747
var filename: String { get }
4848
var line: UInt64 { get }
4949
var column: UInt64 { get }
5050
var offset: UInt64 { get }
5151
}
5252

5353
// FIXME: An abstraction for tests to work around missing memberwise initializers in `TSCUtility.SerializedDiagnostics`.
54-
protocol AnyFixIt {
54+
package protocol AnyFixIt {
5555
associatedtype SourceLocation: AnySourceLocation
5656

5757
var start: SourceLocation { get }
@@ -60,7 +60,7 @@ protocol AnyFixIt {
6060
}
6161

6262
// FIXME: An abstraction for tests to work around missing memberwise initializers in `TSCUtility.SerializedDiagnostics`.
63-
protocol AnyDiagnostic {
63+
package protocol AnyDiagnostic {
6464
associatedtype SourceLocation: AnySourceLocation
6565
associatedtype FixIt: AnyFixIt where FixIt.SourceLocation == SourceLocation
6666

@@ -216,7 +216,7 @@ package struct SwiftFixIt /*: ~Copyable */ { // TODO: Crashes with ~Copyable
216216
)
217217
}
218218

219-
init<Diagnostic: AnyDiagnostic>(
219+
package init<Diagnostic: AnyDiagnostic>(
220220
diagnostics: some Collection<Diagnostic>,
221221
categories: Set<String>,
222222
fileSystem: any FileSystem

0 commit comments

Comments
 (0)