Skip to content

Commit 895cd15

Browse files
committed
fix: add missing StructuredQueriesCore symbolic link
Add missing symbolic link directory that was present in upstream but removed during PostgreSQL fork reorganization. Changes: - Create Sources/StructuredQueriesCore/Symbolic Links/ directory - Add symlink to StructuredQueriesPostgresSupport - Add README.md explaining the workaround This ensures StructuredQueriesCore can access shared Support code (Inflection.swift, Quoting.swift) as declared in Package.swift dependencies. Note: This does NOT fix the Swift 6.2.1 debug build linker error with CasePathsMacros. That remains a toolchain issue. Use release builds (swift build -c release) or Xcode for development. ci: improve CI configuration for multi-platform Swift 6.x support Comprehensive CI improvements to ensure compatibility with Swift 6.0-6.2 on both macOS and Linux, matching production Vapor server requirements. **Linux CI improvements:** - Add Swift 6.2 to test matrix (alongside 6.0, 6.1) - Switch to release mode builds (required due to Swift 6.x linker issues) - Add better caching with Swift version-specific keys - Add parallel test execution (--parallel flag) - Add build/test timeouts (20 minutes) - Improve environment logging (Swift version, uname) **macOS CI improvements:** - Test both Swift 6.1 (Xcode 16.2) and 6.2 (Xcode 26.0) - Use macos-15 for 6.1, macos-26 for 6.2 - Better cache keys with Xcode version - Add parallel test execution - Add build/test timeouts - Improved environment logging (xcodebuild, Swift, macOS versions) **Why release mode:** Swift 6.x has a known linker issue in debug mode with CasePathsMacros and SwiftSyntax prebuilt binaries. Release mode builds work correctly on all platforms and Swift versions. **Test coverage:** - macOS: Swift 6.1 (Xcode 16.2), 6.2 (Xcode 26.0) - Linux: Swift 6.0, 6.1, 6.2 - Total: 5 platform/version combinations This ensures the package works on Linux Vapor servers running Swift 6.1. chore: fix symlink imports WIP WIP
1 parent 1b2b627 commit 895cd15

30 files changed

+1916
-187
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,56 +15,82 @@ concurrency:
1515

1616
jobs:
1717
macos:
18-
name: macOS
19-
runs-on: macos-26
18+
name: macOS (Xcode ${{ matrix.xcode }})
19+
runs-on: macos-${{ matrix.os }}
2020
strategy:
21+
fail-fast: false
2122
matrix:
22-
xcode: ['26.0']
23-
config: ['release'] # Release mode for speed; debug adds time with minimal value
23+
include:
24+
- os: '15'
25+
xcode: '16.2'
26+
swift: '6.1'
27+
- os: '26'
28+
xcode: '26.0'
29+
swift: '6.2'
2430
steps:
2531
- uses: actions/checkout@v5
2632

2733
- name: Select Xcode ${{ matrix.xcode }}
28-
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.1.app
34+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
2935

30-
- name: Print Swift version
31-
run: swift --version
36+
- name: Print environment
37+
run: |
38+
xcodebuild -version
39+
swift --version
40+
echo "macOS $(sw_vers -productVersion)"
3241
3342
- name: Cache Swift packages
3443
uses: actions/cache@v4
3544
with:
3645
path: .build
37-
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
46+
key: ${{ runner.os }}-xcode-${{ matrix.xcode }}-spm-${{ hashFiles('Package.resolved') }}
3847
restore-keys: |
48+
${{ runner.os }}-xcode-${{ matrix.xcode }}-spm-
3949
${{ runner.os }}-spm-
4050
41-
- name: Build
42-
run: swift build -c ${{ matrix.config }}
51+
- name: Build (Release)
52+
run: swift build -c release
53+
timeout-minutes: 20
4354

44-
- name: Run tests
45-
run: swift test -c ${{ matrix.config }}
55+
- name: Run tests (Release)
56+
run: swift test -c release --parallel
57+
timeout-minutes: 20
4658

4759
linux:
4860
name: Linux (Swift ${{ matrix.swift }})
61+
runs-on: ubuntu-latest
62+
container: swift:${{ matrix.swift }}
4963
strategy:
5064
fail-fast: false
5165
matrix:
5266
swift:
5367
- '6.0'
5468
- '6.1'
55-
runs-on: ubuntu-latest
56-
container: swift:${{ matrix.swift }}
69+
- '6.2'
5770
steps:
5871
- uses: actions/checkout@v5
5972

60-
- name: Print Swift version
61-
run: swift --version
73+
- name: Print environment
74+
run: |
75+
swift --version
76+
uname -a
77+
78+
- name: Cache Swift packages
79+
uses: actions/cache@v4
80+
with:
81+
path: .build
82+
key: linux-swift-${{ matrix.swift }}-spm-${{ hashFiles('Package.resolved') }}
83+
restore-keys: |
84+
linux-swift-${{ matrix.swift }}-spm-
85+
linux-spm-
6286
63-
- name: Build
64-
run: swift build
87+
- name: Build (Release)
88+
run: swift build -c release
89+
timeout-minutes: 20
6590

66-
- name: Run tests
67-
run: swift test
91+
- name: Run tests (Release)
92+
run: swift test -c release --parallel
93+
timeout-minutes: 20
6894

6995
documentation:
7096
name: Documentation

Package.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import PackageDescription
1212
let package = Package(
1313
name: "swift-structured-queries-postgres",
1414
platforms: [
15-
// .iOS(.v13),
15+
.iOS(.v13),
1616
.macOS(.v13)
1717
// .tvOS(.v13),
1818
// .watchOS(.v6)
@@ -135,6 +135,14 @@ let package = Package(
135135
.product(name: "InlineSnapshotTesting", package: "swift-snapshot-testing"),
136136
]
137137
),
138+
.testTarget(
139+
name: "READMEExamplesTests",
140+
dependencies: [
141+
"StructuredQueriesPostgres",
142+
"StructuredQueriesPostgresTestSupport",
143+
.product(name: "InlineSnapshotTesting", package: "swift-snapshot-testing"),
144+
]
145+
),
138146
],
139147
swiftLanguageModes: [.v6]
140148
)

0 commit comments

Comments
 (0)