Skip to content

Commit

Permalink
Revert the changed package name in the exports (#174)
Browse files Browse the repository at this point in the history
* Revert the changed package name in the exports, this apparently breaks building against FluentKit when not using any of the driver packages. Add CI to test this scenario.
  • Loading branch information
gwynne committed Apr 15, 2024
1 parent f1263a2 commit cd0c5b7
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ jobs:
unit-tests:
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main

pure-fluent-integration-test:
if: ${{ !(github.event.pull_request.draft || false) }}
runs-on: ubuntu-latest
container: swift:5.10-jammy
steps:
- name: Check out sql-kit
uses: actions/checkout@v4
with: { path: sql-kit, repository: vapor/sql-kit }
- name: Check out fluent-kit
uses: actions/checkout@v4
with: { path: fluent-kit, repository: vapor/fluent-kit }
- name: Set up and run FluentKit tests
run: |
swift package --package-path fluent-kit edit --path sql-kit sql-kit
swift test --package-path fluent-kit --sanitize=thread
integration-tests:
if: ${{ !(github.event.pull_request.draft || false) }}
services:
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ let package = Package(
name: "SQLKit",
dependencies: [
.product(name: "Logging", package: "swift-log"),
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "Collections", package: "swift-collections"),
],
Expand All @@ -48,7 +49,6 @@ let package = Package(
)

var swiftSettings: [SwiftSetting] { [
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("ConciseMagicFile"),
.enableUpcomingFeature("ForwardTrailingClosures"),
.enableUpcomingFeature("ImportObjcForwardDeclarations"),
Expand Down
61 changes: 61 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// swift-tools-version:5.9
import PackageDescription

let package = Package(
name: "sql-kit",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v13),
],
products: [
.library(name: "SQLKit", targets: ["SQLKit"]),
.library(name: "SQLKitBenchmark", targets: ["SQLKitBenchmark"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-nio.git", from: "2.64.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.4"),
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0"),
.package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.3.0"),
],
targets: [
.target(
name: "SQLKit",
dependencies: [
.product(name: "Logging", package: "swift-log"),
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "Collections", package: "swift-collections"),
],
swiftSettings: swiftSettings
),
.target(
name: "SQLKitBenchmark",
dependencies: [
.target(name: "SQLKit"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "SQLKitTests",
dependencies: [
.target(name: "SQLKit"),
.target(name: "SQLKitBenchmark"),
],
swiftSettings: swiftSettings
),
]
)

var swiftSettings: [SwiftSetting] { [
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("ConciseMagicFile"),
.enableUpcomingFeature("ForwardTrailingClosures"),
.enableUpcomingFeature("ImportObjcForwardDeclarations"),
.enableUpcomingFeature("DisableOutwardActorInference"),
.enableUpcomingFeature("IsolatedDefaultValues"),
.enableUpcomingFeature("GlobalConcurrency"),
.enableUpcomingFeature("StrictConcurrency"),
.enableExperimentalFeature("StrictConcurrency=complete"),
] }
4 changes: 2 additions & 2 deletions Sources/SQLKit/Exports.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@_documentation(visibility: internal) @_exported import protocol NIOCore.EventLoop
@_documentation(visibility: internal) @_exported import class NIOCore.EventLoopFuture
@_documentation(visibility: internal) @_exported import protocol NIO.EventLoop
@_documentation(visibility: internal) @_exported import class NIO.EventLoopFuture
@_documentation(visibility: internal) @_exported import struct Logging.Logger

0 comments on commit cd0c5b7

Please sign in to comment.