Skip to content

Commit 008adcb

Browse files
authored
TSCUtility: deprecate SQLite, PersistenceCache (#350)
The single use of `SQLite` was SwiftPM which now homes the interface. Mark the two interfaces as being deprecated now as the consumer has taken ownership. This progresses towards hollowing out tools-support-core.
1 parent 0220fc3 commit 008adcb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Sources/TSCUtility/PersistenceCache.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ import TSCBasic
1212
import Foundation
1313

1414
/// A protocol for Data -> Data cache.
15+
@available(*, deprecated, message: "Unused")
1516
public protocol PersistentCacheProtocol {
1617
func get(key: Data) throws -> Data?
1718
func put(key: Data, value: Data) throws
1819
func delete(key: Data) throws
1920
}
2021

2122
/// SQLite backed persistent cache.
23+
@available(*, deprecated, message: "Unused")
2224
public final class SQLiteBackedPersistentCache: PersistentCacheProtocol, Closable {
2325
let db: SQLite
2426

Sources/TSCUtility/SQLite.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import TSCBasic
1414
@_implementationOnly import CSQLite3
1515

1616
/// A minimal SQLite wrapper.
17+
@available(*, deprecated, message: "moved to SwiftPM")
1718
public struct SQLite {
1819
/// The location of the database.
1920
public let location: Location
@@ -291,6 +292,7 @@ public struct SQLite {
291292
}
292293
}
293294

295+
@available(*, deprecated, message: "Moved to SwiftPM")
294296
private func sqlite_callback(
295297
_ ctx: UnsafeMutableRawPointer?,
296298
_ numColumns: Int32,

0 commit comments

Comments
 (0)