From 448399599e1145e6a7f0082b90f84e0ee7e55664 Mon Sep 17 00:00:00 2001 From: tom doron Date: Tue, 18 Apr 2023 15:21:08 -0700 Subject: [PATCH] address deprecation warnings motivation: less warnings changes: deprecate Triple and Platform related tests and extensions given Triple and Platform have been deprecated --- Sources/TSCUtility/Triple.swift | 2 ++ Tests/TSCUtilityTests/PlatformTests.swift | 1 + Tests/TSCUtilityTests/TripleTests.swift | 1 + 3 files changed, 4 insertions(+) diff --git a/Sources/TSCUtility/Triple.swift b/Sources/TSCUtility/Triple.swift index 4f08d35b..b1880c14 100644 --- a/Sources/TSCUtility/Triple.swift +++ b/Sources/TSCUtility/Triple.swift @@ -235,6 +235,7 @@ public struct Triple: Encodable, Equatable, Sendable { } } +@available(*, deprecated) extension Triple { /// The file prefix for dynamic libraries public var dynamicLibraryPrefix: String { @@ -290,6 +291,7 @@ extension Triple { } } +@available(*, deprecated) extension Triple.Error: CustomNSError { public var errorUserInfo: [String : Any] { return [NSLocalizedDescriptionKey: "\(self)"] diff --git a/Tests/TSCUtilityTests/PlatformTests.swift b/Tests/TSCUtilityTests/PlatformTests.swift index d995943c..72abeb06 100644 --- a/Tests/TSCUtilityTests/PlatformTests.swift +++ b/Tests/TSCUtilityTests/PlatformTests.swift @@ -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"]) diff --git a/Tests/TSCUtilityTests/TripleTests.swift b/Tests/TSCUtilityTests/TripleTests.swift index a9c2c3df..68caa7c8 100644 --- a/Tests/TSCUtilityTests/TripleTests.swift +++ b/Tests/TSCUtilityTests/TripleTests.swift @@ -11,6 +11,7 @@ import TSCUtility import XCTest +@available(*, deprecated) class TripleTests : XCTestCase { func testTriple() { let linux = try? Triple("x86_64-unknown-linux-gnu")