Skip to content

Commit b146792

Browse files
CrownedPhoenixJairon Terrero
andauthored
Rename CSQLite target to VaporCSQLite to avoid downstream conflicts (#99)
* refactor: Rename CSQLite target to VaporCSQLite to avoid downstream conflicts Due to an issue with SPM and the relative prevalence of C wrappers for SQLite being named `CSQLite`, it seems prudent/friendly to namespace this target under `Vapor` to reduce the likelihood of target name conflicts with downstream packages. See: swiftlang/swift-package-manager#8482 * chore: Rename `Sources/CSQLite` to `Sources/VaporCSQLite` --------- Co-authored-by: Jairon Terrero <[email protected]>
1 parent 2ab6138 commit b146792

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ let package = Package(
2929
exclude: ["001-warnings-and-data-race.patch"]
3030
),
3131
.target(
32-
name: "CSQLite",
32+
name: "VaporCSQLite",
3333
cSettings: sqliteCSettings
3434
),
3535
.target(
3636
name: "SQLiteNIO",
3737
dependencies: [
38-
.target(name: "CSQLite"),
38+
.target(name: "VaporCSQLite"),
3939
.product(name: "Logging", package: "swift-log"),
4040
.product(name: "NIOCore", package: "swift-nio"),
4141
.product(name: "NIOPosix", package: "swift-nio"),

Plugins/VendorSQLite/VendorSQLite3.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ struct VendorSQLite: CommandPlugin {
4848
}
4949

5050
// Find C target
51-
guard let target = try context.package.targets(named: ["CSQLite"]).first.flatMap({ $0 as? ClangSourceModuleTarget }) else {
52-
throw VendoringError("Unable to find the CSQLite target in package.")
51+
guard let target = try context.package.targets(named: ["VaporCSQLite"]).first.flatMap({ $0 as? ClangSourceModuleTarget }) else {
52+
throw VendoringError("Unable to find the VaporCSQLite target in package.")
5353
}
54-
if self.verbose { Diagnostics.progress("Found CSQLite target with path \(target.directory)") }
54+
if self.verbose { Diagnostics.progress("Found VaporCSQLite target with path \(target.directory)") }
5555

5656
// Load current version
5757
guard let line = try await target.directory.appending("version.txt").fileUrl.lines.first(where: { !$0.starts(with: "//") }),

Sources/SQLiteNIO/SQLiteConnection+Hooks.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Foundation
22
import NIOConcurrencyHelpers
33
import NIOCore
4-
import CSQLite
4+
import VaporCSQLite
55

66
// MARK: - Hook Types and Events
77

Sources/SQLiteNIO/SQLiteConnection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import NIOConcurrencyHelpers
22
import NIOCore
33
import NIOPosix
4-
import CSQLite
4+
import VaporCSQLite
55
import Logging
66

77
/// A wrapper for the `OpaquePointer` used to represent an open `sqlite3` handle.

Sources/SQLiteNIO/SQLiteCustomFunction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The above copyright notice and this permission notice shall be included in all c
1212

1313
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1414
*/
15-
import CSQLite
15+
import VaporCSQLite
1616

1717
/// An SQL function or aggregate.
1818
public final class SQLiteCustomFunction: Hashable {

Sources/SQLiteNIO/SQLiteData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import CSQLite
1+
import VaporCSQLite
22
import NIOCore
33

44
/// Encapsulates a single data item provided by or to SQLite.

Sources/SQLiteNIO/SQLiteDatabase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import NIOCore
22
import NIOPosix
3-
import CSQLite
3+
import VaporCSQLite
44
import Logging
55

66
/// A protocol describing the minimum requirements for an object allowing access to a generic SQLite database.

Sources/SQLiteNIO/SQLiteError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import CSQLite
1+
import VaporCSQLite
22
import Foundation
33

44
public struct SQLiteError: Error, CustomStringConvertible, LocalizedError {

Sources/SQLiteNIO/SQLiteStatement.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import NIOCore
2-
import CSQLite
2+
import VaporCSQLite
33

44
struct SQLiteStatement {
55
private var handle: OpaquePointer?
File renamed without changes.

0 commit comments

Comments
 (0)