From 4273db8a0705429c3bc6f4057c732921e01af36d Mon Sep 17 00:00:00 2001 From: Jan Berkel Date: Wed, 28 Jan 2026 21:13:24 +0100 Subject: [PATCH] Fix compilation on Linux --- .github/workflows/build.yml | 4 +++- CHANGELOG.md | 5 +++++ Documentation/Index.md | 16 ++++++++-------- Documentation/Linux.md | 2 +- Package.swift | 9 ++++++++- README.md | 4 ++-- SQLite.swift.podspec | 2 +- SQLite.xcodeproj/project.pbxproj | 4 ++-- Tests/SPM/Package.swift | 11 ++--------- 9 files changed, 32 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c994aaa7..457cc1be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -82,7 +82,9 @@ jobs: run: | sudo apt-get update -qq sudo apt-get install -y libsqlite3-dev - - name: Test + - name: Test (default trait) + run: swift test + - name: Test (SwiftToolchainCSQLite) run: swift test --traits SwiftToolchainCSQLite - name: "Run tests (SPM integration test)" env: diff --git a/CHANGELOG.md b/CHANGELOG.md index d9908edf..54b74747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +0.15.6 (28-01-2026), [diff][diff-0.15.6] +======================================== +* Revert trait changes for Linux + 0.15.5 (22-01-2026), [diff][diff-0.15.5] ======================================== * Support more package traits ([#1341][]), including FTS5 ([#1343][]) @@ -190,6 +194,7 @@ For breaking changes, see [Upgrading.md](Documentation/Upgrading.md). [diff-0.15.3]: https://github.com/stephencelis/SQLite.swift/compare/0.15.2...0.15.3 [diff-0.15.4]: https://github.com/stephencelis/SQLite.swift/compare/0.15.3...0.15.4 [diff-0.15.5]: https://github.com/stephencelis/SQLite.swift/compare/0.15.4...0.15.5 +[diff-0.15.6]: https://github.com/stephencelis/SQLite.swift/compare/0.15.5...0.15.6 [#30]: https://github.com/stephencelis/SQLite.swift/issues/30 [#142]: https://github.com/stephencelis/SQLite.swift/issues/142 diff --git a/Documentation/Index.md b/Documentation/Index.md index a4eaa0da..e217bfd6 100644 --- a/Documentation/Index.md +++ b/Documentation/Index.md @@ -109,7 +109,7 @@ process of downloading, compiling, and linking dependencies. ```swift dependencies: [ - .package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.15.5") + .package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.15.6") ] ``` @@ -127,7 +127,7 @@ SQLite.swift for different use cases. ```swift dependencies: [ .package(url: "https://github.com/stephencelis/SQLite.swift.git", - from: "0.15.5", + from: "0.15.6", traits: ["XXX"]) ] ``` @@ -151,7 +151,7 @@ If you want to use [SQLCipher][] with SQLite.swift you can specify the `SQLCiphe ```swift depdencies: [ - .package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.15.5", traits: ["SQLCipher"]) + .package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.15.6", traits: ["SQLCipher"]) ] ``` @@ -181,7 +181,7 @@ let package = Package( dependencies: [ .package( url: "https://github.com/stephencelis/SQLite.swift.git", - from: "0.15.5", + from: "0.15.6", traits: ["SQLCipher"]) ], targets: [ @@ -228,7 +228,7 @@ install SQLite.swift with Carthage: 2. Update your Cartfile to include the following: ```ruby - github "stephencelis/SQLite.swift" ~> 0.15.5 + github "stephencelis/SQLite.swift" ~> 0.15.6 ``` 3. Run `carthage update` and [add the appropriate framework][Carthage Usage]. @@ -258,7 +258,7 @@ install SQLite.swift with Carthage: use_frameworks! target 'YourAppTargetName' do - pod 'SQLite.swift', '~> 0.15.5' + pod 'SQLite.swift', '~> 0.15.6' end ``` @@ -272,7 +272,7 @@ with the OS you can require the `standalone` subspec: ```ruby target 'YourAppTargetName' do - pod 'SQLite.swift/standalone', '~> 0.15.5' + pod 'SQLite.swift/standalone', '~> 0.15.6' end ``` @@ -282,7 +282,7 @@ dependency to sqlite3 or one of its subspecs: ```ruby target 'YourAppTargetName' do - pod 'SQLite.swift/standalone', '~> 0.15.5' + pod 'SQLite.swift/standalone', '~> 0.15.6' pod 'sqlite3/fts5', '= 3.15.0' # SQLite 3.15.0 with FTS5 enabled end ``` diff --git a/Documentation/Linux.md b/Documentation/Linux.md index f748097c..82fe0af5 100644 --- a/Documentation/Linux.md +++ b/Documentation/Linux.md @@ -13,7 +13,7 @@ embed SQLite: ```swift dependencies: [ .package(url: "https://github.com/stephencelis/SQLite.swift.git", - from: "0.15.5", + from: "0.15.6", traits: ["SwiftToolchainCSQLite"]) ] ``` diff --git a/Package.swift b/Package.swift index 80a55259..8dfd4618 100644 --- a/Package.swift +++ b/Package.swift @@ -29,6 +29,13 @@ let testTarget: Target = .testTarget( resources: [.copy("Resources")] ) +let defaultTraits: Set +#if os(Linux) +defaultTraits = ["SwiftToolchainCSQLite"] +#else +defaultTraits = ["SystemSQLite"] +#endif + let package = Package( name: "SQLite.swift", platforms: [ @@ -56,7 +63,7 @@ let package = Package( description: "Enables SQLCipher encryption when a key is supplied to Connection"), .trait(name: "FTS5", description: "Enables FTS5 in the embedded SQLite (only supported by SQLiteSwiftCSQLite)"), - .default(enabledTraits: ["SystemSQLite"]) + .default(enabledTraits: defaultTraits) ], dependencies: [ .package(url: "https://github.com/swiftlang/swift-toolchain-sqlite", from: "1.0.7"), diff --git a/README.md b/README.md index 2fb0174d..0fac8d91 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ Swift code. ```swift dependencies: [ - .package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.15.5") + .package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.15.6") ] ``` @@ -155,7 +155,7 @@ install SQLite.swift with Carthage: 2. Update your Cartfile to include the following: ```ruby - github "stephencelis/SQLite.swift" ~> 0.15.5 + github "stephencelis/SQLite.swift" ~> 0.15.6 ``` 3. Run `carthage update` and diff --git a/SQLite.swift.podspec b/SQLite.swift.podspec index 829e092d..aa0cc390 100644 --- a/SQLite.swift.podspec +++ b/SQLite.swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "SQLite.swift" - s.version = "0.15.5" + s.version = "0.15.6" s.summary = "A type-safe, Swift-language layer over SQLite3." s.description = <<-DESC diff --git a/SQLite.xcodeproj/project.pbxproj b/SQLite.xcodeproj/project.pbxproj index 248c70a2..9da1f77a 100644 --- a/SQLite.xcodeproj/project.pbxproj +++ b/SQLite.xcodeproj/project.pbxproj @@ -1772,7 +1772,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 10.13; - MARKETING_VERSION = 0.15.5; + MARKETING_VERSION = 0.15.6; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = ""; @@ -1832,7 +1832,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 10.13; - MARKETING_VERSION = 0.15.5; + MARKETING_VERSION = 0.15.6; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = ""; SDKROOT = iphoneos; diff --git a/Tests/SPM/Package.swift b/Tests/SPM/Package.swift index a635d3ad..87858081 100644 --- a/Tests/SPM/Package.swift +++ b/Tests/SPM/Package.swift @@ -3,13 +3,6 @@ import PackageDescription -let traits: Set -#if os(Linux) -traits = ["SwiftToolchainCSQLite"] -#else -traits = [.defaults] -#endif - let package = Package( name: "test", platforms: [ @@ -20,9 +13,9 @@ let package = Package( ], dependencies: [ // for testing from same repository - .package(path: "../..", traits: traits) + .package(path: "../..") // normally this would be: - // .package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.15.5") + // .package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.15.6") ], targets: [ .executableTarget(name: "test", dependencies: [.product(name: "SQLite", package: "SQLite.swift")])