Skip to content

Commit

Permalink
Fix package manifest (#262)
Browse files Browse the repository at this point in the history
* ExistentialAny should not be used in a Package.swift before 5.9
* Minor tidy of CI and DocC catalog
  • Loading branch information
gwynne authored Apr 26, 2024
1 parent 9d12f46 commit 3d34228
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 22 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ env:
POSTGRES_PASSWORD_B: 'test_password'

jobs:
# Check for API breakage versus main
api-breakage:
if: ${{ github.event_name == 'pull_request' && !(github.event.pull_request.draft || false) }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -76,26 +75,26 @@ jobs:
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}

gh-codeql:
if: ${{ false && !(github.event.pull_request.draft || false) }}
runs-on: ubuntu-latest
container:
image: swift:5.10-jammy
permissions: { actions: write, contents: read, security-events: write }
timeout-minutes: 60
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Mark repo safe in non-fake global config
run: |
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with: { languages: swift }
- name: Perform build
run: swift build
- name: Run CodeQL analyze
uses: github/codeql-action/analyze@v3
# gh-codeql:
# if: ${{ !(github.event.pull_request.draft || false) }}
# runs-on: ubuntu-latest
# container:
# image: swift:5.10-jammy
# permissions: { actions: write, contents: read, security-events: write }
# timeout-minutes: 60
# steps:
# - name: Check out code
# uses: actions/checkout@v4
# - name: Mark repo safe in non-fake global config
# run: |
# git config --global --add safe.directory "${GITHUB_WORKSPACE}"
# - name: Initialize CodeQL
# uses: github/codeql-action/init@v3
# with: { languages: swift }
# - name: Perform build
# run: swift build
# - name: Run CodeQL analyze
# uses: github/codeql-action/analyze@v3

linux-unit:
if: ${{ !(github.event.pull_request.draft || false) }}
Expand Down
1 change: 0 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ let package = Package(
)

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

let package = Package(
name: "postgres-kit",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v13),
],
products: [
.library(name: "PostgresKit", targets: ["PostgresKit"]),
],
dependencies: [
.package(url: "https://github.com/vapor/postgres-nio.git", from: "1.20.2"),
.package(url: "https://github.com/vapor/sql-kit.git", from: "3.28.0"),
.package(url: "https://github.com/vapor/async-kit.git", from: "1.19.0"),
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.2.0")
],
targets: [
.target(
name: "PostgresKit",
dependencies: [
.product(name: "AsyncKit", package: "async-kit"),
.product(name: "PostgresNIO", package: "postgres-nio"),
.product(name: "SQLKit", package: "sql-kit"),
.product(name: "Atomics", package: "swift-atomics"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "PostgresKitTests",
dependencies: [
.target(name: "PostgresKit"),
.product(name: "SQLKitBenchmark", package: "sql-kit"),
],
swiftSettings: swiftSettings
),
]
)

var swiftSettings: [SwiftSetting] { [
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("ConciseMagicFile"),
.enableUpcomingFeature("ForwardTrailingClosures"),
.enableUpcomingFeature("DisableOutwardActorInference"),
.enableUpcomingFeature("StrictConcurrency"),
.enableExperimentalFeature("StrictConcurrency=complete"),
] }

0 comments on commit 3d34228

Please sign in to comment.