Skip to content

Commit

Permalink
address deprecation warnings
Browse files Browse the repository at this point in the history
motivation: less warnings

changes: deprecate Triple and Platform related tests and extensions given Triple and Platform have been deprecated
  • Loading branch information
tomerd committed Apr 18, 2023
1 parent 71c91d0 commit 4483995
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/TSCUtility/Triple.swift
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ public struct Triple: Encodable, Equatable, Sendable {
}
}

@available(*, deprecated)
extension Triple {
/// The file prefix for dynamic libraries
public var dynamicLibraryPrefix: String {
Expand Down Expand Up @@ -290,6 +291,7 @@ extension Triple {
}
}

@available(*, deprecated)
extension Triple.Error: CustomNSError {
public var errorUserInfo: [String : Any] {
return [NSLocalizedDescriptionKey: "\(self)"]
Expand Down
1 change: 1 addition & 0 deletions Tests/TSCUtilityTests/PlatformTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import TSCTestSupport

@testable import TSCUtility

@available(*, deprecated)
final class PlatformTests: XCTestCase {
func testFindCurrentPlatformDebian() {
let fs = InMemoryFileSystem(files: ["/etc/debian_version": "xxx"])
Expand Down
1 change: 1 addition & 0 deletions Tests/TSCUtilityTests/TripleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import TSCUtility
import XCTest

@available(*, deprecated)
class TripleTests : XCTestCase {
func testTriple() {
let linux = try? Triple("x86_64-unknown-linux-gnu")
Expand Down

0 comments on commit 4483995

Please sign in to comment.