Skip to content

Commit 00d9afa

Browse files
authored
Fix the Samples project so that it compiles and runs. (#1205)
### Motivation: Currently, the sample project doesn't compile because `swift-cluster-membership` requires macos 14.0. ```console error: the executable 'SampleDiningPhilosophers' requires macos 13.0, but depends on the product 'DistributedCluster' which requires macos 14.0; consider changing the executable 'SampleDiningPhilosophers' to require macos 14.0 or later, or the product 'DistributedCluster' to require macos 13.0 or earlier. ``` ### Modifications: Update the `Package.swift` file in `/Samples` to require macos 14 and bump to Swift 5.9 to support running in distributed mode. Updated README to include `swift` in the run commands. ### Result: `Samples` project now compiles and runs.
1 parent c2169dc commit 00d9afa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ You can refer to the `Samples/` directory to view a number of more realistic sam
4141

4242
The most "classical" example of distributed actors is the [`SampleDiningPhilosophers`](Samples/Sources/SampleDiningPhilosophers/DistributedDiningPhilosophers.swift).
4343

44-
You can run it all in a single node (`run --package-path Samples/ SampleDiningPhilosophers`), or in 3 cluster nodes hosted on the same physical machine: `run --package-path Samples/ SampleDiningPhilosophers distributed`. Notice how one does not need to change implementation of the distributed actors to run them in either "local" or "distributed" mode.
44+
You can run it all in a single node (`swift run --package-path Samples/ SampleDiningPhilosophers`), or in 3 cluster nodes hosted on the same physical machine: `swift run --package-path Samples/ SampleDiningPhilosophers distributed`. Notice how one does not need to change implementation of the distributed actors to run them in either "local" or "distributed" mode.
4545

4646
## Documentation
4747

Samples/Package.swift

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

44
import PackageDescription
@@ -51,7 +51,7 @@ let package = Package(
5151
platforms: [
5252
// we require the 'distributed actor' language and runtime feature:
5353
.iOS(.v16),
54-
.macOS(.v13),
54+
.macOS(.v14),
5555
.tvOS(.v16),
5656
.watchOS(.v9),
5757
],

0 commit comments

Comments
 (0)