Skip to content

Commit b35fb59

Browse files
committed
Prepare to use our CSQLite fork
1 parent 6913958 commit b35fb59

File tree

2 files changed

+10
-38
lines changed

2 files changed

+10
-38
lines changed

Package.resolved

Lines changed: 3 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,7 @@ let localCoreExtension: String? = nil
1818
// a binary target.
1919
// With a local SDK, we point to a `Package.swift` within the Kotlin SDK containing a target pointing
2020
// towards a local framework build
21-
var conditionalDependencies: [Package.Dependency] = [
22-
.package(
23-
url: "https://github.com/sbooth/CSQLite.git",
24-
from: "3.50.4",
25-
traits: [
26-
.defaults,
27-
// CSQLite uses THREADSAFE=0 by default, which breaks PowerSync because we're using SQLite on
28-
// multiple threads (it can lead to race conditions when closing connections sharing resources
29-
// like shared memory, causing crashes).
30-
// THREADSAFE=2 overrides the default, and is safe to use as long as a single SQLite connection
31-
// is not shared between threads.
32-
// TODO: Technically, we should not use .defaults because there's a logical conflict between
33-
// the threadsafe options. Instead, we should spell out all defaults again and remove that
34-
// thread-safety option.
35-
// However, despite the docs explicitly saying something else, it looks like there's no way to
36-
// disable default traits anyway (XCode compiles sqlite3.c with the default option even without
37-
// .defaults being included here).
38-
"THREADSAFE_2",
39-
"ENABLE_SESSION"
40-
]
41-
)
42-
]
21+
var conditionalDependencies: [Package.Dependency] = []
4322
var conditionalTargets: [Target] = []
4423
var kotlinTargetDependency = Target.Dependency.target(name: "PowerSyncKotlin")
4524

@@ -53,8 +32,8 @@ if let kotlinSdkPath = localKotlinSdkOverride {
5332
// Not using a local build, so download from releases
5433
conditionalTargets.append(.binaryTarget(
5534
name: "PowerSyncKotlin",
56-
url: "https://github.com/powersync-ja/powersync-kotlin/releases/download/v1.8.0/PowersyncKotlinRelease.zip",
57-
checksum: "31ac7c5e11d747e11bceb0b34f30438d37033e700c621b0a468aa308d887587f"
35+
url: "https://github.com/powersync-ja/powersync-kotlin/releases/download/v1.9.0/PowersyncKotlinRelease.zip",
36+
checksum: "6d9847391ab2bbbca1f6a7abe163f0682ddca4a559ef5a1d2567b3e62e7d9979"
5837
))
5938
}
6039

@@ -66,7 +45,7 @@ if let corePath = localCoreExtension {
6645
// Not using a local build, so download from releases
6746
conditionalDependencies.append(.package(
6847
url: "https://github.com/powersync-ja/powersync-sqlite-core-swift.git",
69-
exact: "0.4.8"
48+
exact: "0.4.10"
7049
))
7150
}
7251

@@ -94,7 +73,9 @@ let package = Package(
9473
targets: ["PowerSync"]
9574
)
9675
],
97-
dependencies: conditionalDependencies,
76+
dependencies: conditionalDependencies + [
77+
.package(path: "/Users/simon/src/CSQLite")
78+
],
9879
targets: [
9980
// Targets are the basic building blocks of a package, defining a module or a test suite.
10081
// Targets can depend on other targets in this package and products from dependencies.

0 commit comments

Comments
 (0)