Skip to content

Commit 5d33a3f

Browse files
authored
deprecate PkgConfig (#266)
motivation: PkgConfig was moved from SwiftPM into TSC, but really is closer to SwiftPM (not generic enough) and would be easier to maintain within SwiftPM itself changes: mark PkgConfig and related utilities as deprecated
1 parent 5b3f7eb commit 5d33a3f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Sources/TSCUtility/PkgConfig.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import TSCBasic
1212
import Foundation
1313

14+
// deprecated 12/21, moved to SwiftPM
15+
@available(*, deprecated, message: "moved into SwiftPM")
1416
public enum PkgConfigError: Swift.Error, CustomStringConvertible {
1517
case couldNotFindConfigFile(name: String)
1618
case parsingError(String)
@@ -28,6 +30,8 @@ public enum PkgConfigError: Swift.Error, CustomStringConvertible {
2830
}
2931
}
3032

33+
// deprecated 12/21, moved to SwiftPM
34+
@available(*, deprecated, message: "moved into SwiftPM")
3135
public struct PCFileFinder {
3236
/// DiagnosticsEngine to emit warnings
3337
let diagnostics: DiagnosticsEngine
@@ -105,6 +109,8 @@ public struct PCFileFinder {
105109
}
106110

107111
/// Informations to track circular dependencies and other PkgConfig issues
112+
// deprecated 12/21, moved to SwiftPM
113+
@available(*, deprecated, message: "moved into SwiftPM")
108114
public class LoadingContext {
109115
public init() {
110116
pkgConfigStack = [String]()
@@ -114,6 +120,8 @@ public class LoadingContext {
114120
}
115121

116122
/// Information on an individual `pkg-config` supported package.
123+
/// // deprecated 12/21, moved to SwiftPM
124+
@available(*, deprecated, message: "moved into SwiftPM")
117125
public struct PkgConfig {
118126
/// The name of the package.
119127
public let name: String
@@ -218,6 +226,8 @@ public struct PkgConfig {
218226
/// Parser for the `pkg-config` `.pc` file format.
219227
///
220228
/// See: https://www.freedesktop.org/wiki/Software/pkg-config/
229+
// deprecated 12/21, moved to SwiftPM
230+
@available(*, deprecated, message: "moved into SwiftPM")
221231
public struct PkgConfigParser {
222232
public let pcFile: AbsolutePath
223233
private let fileSystem: FileSystem

Tests/TSCUtilityTests/PkgConfigParserTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import TSCTestSupport
1414

1515
@testable import TSCUtility
1616

17+
/// // deprecated 12/21, moved to SwiftPM
18+
@available(*, deprecated, message: "moved into SwiftPM")
1719
final class PkgConfigParserTests: XCTestCase {
1820
func testCircularPCFile() throws {
1921
XCTAssertTrue(try PkgConfig(name: "harfbuzz", additionalSearchPaths: [AbsolutePath(#file).parentDirectory.appending(components: "pkgconfigInputs")], diagnostics: DiagnosticsEngine(), brewPrefix: nil).diagnostics.diagnostics.contains { diagnostic in

0 commit comments

Comments
 (0)