Skip to content

Commit a6f1cb3

Browse files
authored
Merge pull request #138 from unsignedapps/bok/multi-subscribers
Fixed support for multi-subscribers
2 parents 58f6b23 + 27f63e1 commit a6f1cb3

File tree

108 files changed

+601
-624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+601
-624
lines changed

.github/workflows/ios-tests.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: iOS Tests
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
86

@@ -30,8 +28,8 @@ jobs:
3028
strategy:
3129
fail-fast: false
3230
matrix:
33-
xcode: [ "16.0", "16.1" ]
34-
os: [ macos-14, macos-15 ]
31+
xcode: [ "16.3", "16.4" ] # "26.0" is broken with xcodebuild test
32+
os: [ macos-15 ]
3533
runs-on: ${{ matrix.os }}
3634

3735
env:
@@ -44,14 +42,14 @@ jobs:
4442
run: |
4543
set -o pipefail && \
4644
NSUnbufferedIO=YES \
47-
xcrun xcodebuild test -workspace . -scheme Vexil -skipMacroValidation -destination "platform=iOS Simulator,name=iPhone 16" \
45+
xcrun xcodebuild test -workspace . -scheme Vexil -skipMacroValidation -destination "platform=iOS Simulator,name=iPhone 16e" \
4846
| xcbeautify --renderer github-actions
4947
5048
build-ios:
5149
runs-on: ubuntu-latest
5250
name: iOS Tests
53-
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
54-
needs: build-ios-matrix
51+
if: ${{ always() && needs.check-changes.outputs.changed == 'true' }}
52+
needs: [ build-ios-matrix, check-changes ]
5553
steps:
5654
- name: Check build matrix status
5755
if: ${{ needs.build-ios-matrix.result != 'success' }}

.github/workflows/linux-tests.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Linux Tests
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
86

@@ -35,8 +33,8 @@ jobs:
3533
strategy:
3634
fail-fast: false
3735
matrix:
38-
swift: [ "swift:6.0.2" ]
39-
os: [ amazonlinux2, focal, jammy, rhel-ubi9, noble ]
36+
swift: [ "swift:6.1", "swift:6.2" ]
37+
os: [ amazonlinux2, jammy, rhel-ubi9, noble ]
4038

4139
container:
4240
image: ${{ matrix.swift }}-${{ matrix.os }}
@@ -50,8 +48,8 @@ jobs:
5048
test:
5149
runs-on: ubuntu-latest
5250
name: Linux Tests
53-
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
54-
needs: matrix
51+
if: ${{ always() && needs.check-changes.outputs.changed == 'true' }}
52+
needs: [ matrix, check-changes ]
5553
steps:
5654
- name: Check build matrix status
5755
if: ${{ needs.matrix.result != 'success' }}

.github/workflows/macos-tests.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: macOS Tests
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
86

@@ -30,8 +28,8 @@ jobs:
3028
strategy:
3129
fail-fast: false
3230
matrix:
33-
xcode: [ "16.0", "16.1" ]
34-
os: [ macos-14, macos-15 ]
31+
xcode: [ "16.3", "16.4", "26.0" ]
32+
os: [ macos-15 ]
3533
runs-on: ${{ matrix.os }}
3634

3735
env:
@@ -50,8 +48,8 @@ jobs:
5048
build-macos:
5149
runs-on: ubuntu-latest
5250
name: macOS Tests
53-
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
54-
needs: build-macos-matrix
51+
if: ${{ always() && needs.check-changes.outputs.changed == 'true' }}
52+
needs: [ build-macos-matrix, check-changes ]
5553
steps:
5654
- name: Check build matrix status
5755
if: ${{ needs.build-macos-matrix.result != 'success' }}

.github/workflows/tvos-tests.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: tvOS Tests
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
86

@@ -30,8 +28,8 @@ jobs:
3028
strategy:
3129
fail-fast: false
3230
matrix:
33-
xcode: [ "16.0", "16.1" ]
34-
os: [ macos-14, macos-15 ]
31+
xcode: [ "16.3", "16.4" ] # "26.0" is broken with xcodebuild test
32+
os: [ macos-15 ]
3533
runs-on: ${{ matrix.os }}
3634

3735
env:
@@ -50,8 +48,8 @@ jobs:
5048
build-tvos:
5149
runs-on: ubuntu-latest
5250
name: tvOS Tests
53-
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
54-
needs: build-tvos-matrix
51+
if: ${{ always() && needs.check-changes.outputs.changed == 'true' }}
52+
needs: [ build-tvos-matrix, check-changes ]
5553
steps:
5654
- name: Check build matrix status
5755
if: ${{ needs.build-tvos-matrix.result != 'success' }}

.github/workflows/visionos-tests.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: visionOS Tests
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
86

@@ -30,8 +28,8 @@ jobs:
3028
strategy:
3129
fail-fast: false
3230
matrix:
33-
xcode: [ "16.0", "16.1" ]
34-
os: [ macos-14, macos-15 ]
31+
xcode: [ "16.3", "16.4" ] # "26.0" is broken with xcodebuild test
32+
os: [ macos-15 ]
3533
runs-on: ${{ matrix.os }}
3634

3735
env:
@@ -44,14 +42,14 @@ jobs:
4442
run: |
4543
set -o pipefail && \
4644
NSUnbufferedIO=YES \
47-
xcrun xcodebuild test -workspace . -scheme Vexil -skipMacroValidation -destination "platform=visionOS Simulator,name=Apple Vision Pro" \
45+
xcrun xcodebuild test -workspace . -scheme Vexil -skipMacroValidation -destination "platform=visionOS Simulator,name=Apple Vision Pro,os=2.5" \
4846
| xcbeautify --renderer github-actions
4947
5048
build-visionos:
5149
runs-on: ubuntu-latest
5250
name: visionOS Tests
53-
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
54-
needs: build-visionos-matrix
51+
if: ${{ always() && needs.check-changes.outputs.changed == 'true' }}
52+
needs: [ build-visionos-matrix, check-changes ]
5553
steps:
5654
- name: Check build matrix status
5755
if: ${{ needs.build-visionos-matrix.result != 'success' }}

.github/workflows/watchos-tests.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: watchOS Build Tests
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
75
branches: [ main ]
86

@@ -30,8 +28,8 @@ jobs:
3028
strategy:
3129
fail-fast: false
3230
matrix:
33-
xcode: [ "16.0", "16.1" ]
34-
os: [ macos-14, macos-15 ]
31+
xcode: [ "16.3", "16.4" ] # "26.0" is broken with xcodebuild test
32+
os: [ macos-15 ]
3533
runs-on: ${{ matrix.os }}
3634

3735
env:
@@ -50,8 +48,8 @@ jobs:
5048
build-watchos:
5149
runs-on: ubuntu-latest
5250
name: watchOS Tests
53-
if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
54-
needs: build-watchos-matrix
51+
if: ${{ always() && needs.check-changes.outputs.changed == 'true' }}
52+
needs: [ build-watchos-matrix, check-changes ]
5553
steps:
5654
- name: Check build matrix status
5755
if: ${{ needs.build-watchos-matrix.result != 'success' }}

Package.swift

Lines changed: 29 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:6.0
1+
// swift-tools-version:6.1
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import CompilerPluginSupport
@@ -20,39 +20,33 @@ let package = Package(
2020
// .library(name: "Vexillographer", targets: [ "Vexillographer" ]),
2121
],
2222

23-
dependencies: .init {
24-
Package.Dependency.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "1.0.0")
25-
Package.Dependency.package(url: "https://github.com/nicklockwood/SwiftFormat.git", from: "0.54.1")
26-
Package.Dependency.package(url: "https://github.com/swiftlang/swift-syntax.git", .upToNextMajor(from: "600.0.1"))
27-
},
23+
dependencies: [
24+
.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "1.0.0"),
25+
.package(url: "https://github.com/nicklockwood/SwiftFormat.git", from: "0.54.1"),
26+
.package(url: "https://github.com/swiftlang/swift-syntax.git", "600.0.0" ..< "603.0.0"),
27+
],
2828

29-
targets: .init {
29+
targets: [
3030

3131
// Vexil
3232

33-
Target.target(
33+
.target(
3434
name: "Vexil",
3535
dependencies: [
3636
.target(name: "VexilMacros"),
3737
.product(name: "AsyncAlgorithms", package: "swift-async-algorithms"),
38-
],
39-
swiftSettings: [
40-
.swiftLanguageMode(.v6),
4138
]
42-
)
43-
Target.testTarget(
39+
),
40+
.testTarget(
4441
name: "VexilTests",
45-
dependencies: .init {
46-
Target.Dependency.target(name: "Vexil")
47-
},
48-
swiftSettings: [
49-
.swiftLanguageMode(.v6),
42+
dependencies: [
43+
.target(name: "Vexil"),
5044
]
51-
)
45+
),
5246

5347
// Vexillographer
5448

55-
// Target.target(
49+
// .target(
5650
// name: "Vexillographer",
5751
// dependencies: [
5852
// .target(name: "Vexil"),
@@ -61,66 +55,36 @@ let package = Package(
6155

6256
// Macros
6357

64-
Target.macro(
58+
.macro(
6559
name: "VexilMacros",
6660
dependencies: [
6761
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
6862
.product(name: "SwiftSyntax", package: "swift-syntax"),
6963
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
7064
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
71-
],
72-
swiftSettings: [
73-
.swiftLanguageMode(.v6),
7465
]
75-
)
66+
),
7667

77-
#if !os(Linux)
78-
79-
// We can't disable macro validation using `swift test` so these are guaranteed to fail on Linux
80-
Target.testTarget(
81-
name: "VexilMacroTests",
82-
dependencies: [
83-
.target(name: "VexilMacros"),
84-
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax"),
85-
],
86-
swiftSettings: [
87-
.swiftLanguageMode(.v6),
88-
]
89-
)
90-
91-
#endif
9268

93-
},
69+
],
9470

9571
swiftLanguageModes: [
9672
.v6,
9773
]
9874

9975
)
10076

101-
// MARK: - Helpers
102-
103-
@resultBuilder
104-
enum CollectionBuilder<Element> {
105-
106-
typealias Component = [Element]
107-
108-
static func buildExpression(_ expression: Element) -> Component {
109-
[expression]
110-
}
111-
112-
static func buildBlock(_ components: Component...) -> Component {
113-
components.flatMap { $0 }
114-
}
115-
116-
static func buildLimitedAvailability(_ components: [Element]) -> Component {
117-
components
118-
}
77+
#if !os(Linux)
11978

120-
}
79+
// We can't disable macro validation using `swift test` so these are guaranteed to fail on Linux
80+
package.targets.append(
81+
.testTarget(
82+
name: "VexilMacroTests",
83+
dependencies: [
84+
.target(name: "VexilMacros"),
85+
.product(name: "SwiftSyntaxMacrosTestSupport", package: "swift-syntax"),
86+
]
87+
)
88+
)
12189

122-
extension Array {
123-
init(@CollectionBuilder<Element> collecting: () -> [Element]) {
124-
self = collecting()
125-
}
126-
}
90+
#endif

Sources/Vexil/Configuration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Vexil open source project
44
//
5-
// Copyright (c) 2024 Unsigned Apps and the open source contributors.
5+
// Copyright (c) 2025 Unsigned Apps and the open source contributors.
66
// Licensed under the MIT license
77
//
88
// See LICENSE for license information

Sources/Vexil/Container.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Vexil open source project
44
//
5-
// Copyright (c) 2024 Unsigned Apps and the open source contributors.
5+
// Copyright (c) 2025 Unsigned Apps and the open source contributors.
66
// Licensed under the MIT license
77
//
88
// See LICENSE for license information

Sources/Vexil/DisplayOptions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Vexil open source project
44
//
5-
// Copyright (c) 2024 Unsigned Apps and the open source contributors.
5+
// Copyright (c) 2025 Unsigned Apps and the open source contributors.
66
// Licensed under the MIT license
77
//
88
// See LICENSE for license information

0 commit comments

Comments
 (0)