Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt swift-toolchain-sqlite to reduce system dependencies #127

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG swift_version
ARG ubuntu_version

# set as UTF-8
RUN apt-get update && apt-get install -y locales locales-all libsqlite3-dev
RUN apt-get update && apt-get install -y locales locales-all
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
Expand Down
9 changes: 9 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@
"revision" : "d2ba781702a1d8285419c15ee62fd734a9437ff5",
"version" : "1.3.2"
}
},
{
"identity" : "swift-toolchain-sqlite",
"kind" : "remoteSourceControl",
"location" : "https://github.com/swiftlang/swift-toolchain-sqlite.git",
"state" : {
"revision" : "aeac03b2b801946afad64bc75989a5d8e8eb47a1",
"version" : "1.0.0"
}
}
],
"version" : 2
Expand Down
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ let package = Package(
.target(
name: "Helpers",
dependencies: [
"SystemSQLite",
.product(name: "SwiftToolchainCSQLite", package: "swift-toolchain-sqlite"),
.product(name: "Crypto", package: "swift-crypto"),
.product(name: "Logging", package: "swift-log"),
.product(name: "SystemPackage", package: "swift-system"),
Expand All @@ -75,7 +75,6 @@ let package = Package(
"Helpers",
]
),
.systemLibrary(name: "SystemSQLite", pkgConfig: "sqlite3"),
.target(
name: "AsyncProcess",
dependencies: [
Expand Down Expand Up @@ -138,6 +137,7 @@ if configuration.useLocalDependencies {
.package(path: "../swift-crypto"),
.package(path: "../swift-nio"),
.package(path: "../swift-log"),
.package(path: "../swift-toolchain-sqlite"),
]
} else {
package.dependencies += [
Expand All @@ -149,5 +149,6 @@ if configuration.useLocalDependencies {
.package(url: "https://github.com/apple/swift-crypto.git", from: "3.1.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.65.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.4"),
.package(url: "https://github.com/swiftlang/swift-toolchain-sqlite.git", from: "1.0.0"),
]
}
2 changes: 1 addition & 1 deletion Sources/Helpers/Vendor/QueryEngine/SQLite.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import struct Foundation.Data
import SystemPackage
import SystemSQLite
import SwiftToolchainCSQLite

extension FilePath: @unchecked Sendable {}
extension FilePath.Component: @unchecked Sendable {}
Expand Down
5 changes: 0 additions & 5 deletions Sources/SystemSQLite/module.modulemap

This file was deleted.

14 changes: 0 additions & 14 deletions Sources/SystemSQLite/sqlite.h

This file was deleted.