Skip to content

Commit 5e3b857

Browse files
authored
Merge pull request #129 from nkcsgexi/doc-xcode-11
doc: add instruction to build SwiftSyntax with Xcode 11 beta releases
2 parents 084befb + 67e4802 commit 5e3b857

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,34 @@ Replace `<#Specify Release tag#>` by the version of SwiftSyntax that you want to
4040
Then, import `SwiftSyntax` in your Swift code.
4141

4242

43+
### Declare SwiftPM dependency with Xcode 11 beta releases
44+
45+
Add this entry to the `Package.swift` manifest of your project:
46+
47+
```swift
48+
// swift-tools-version:4.2
49+
import PackageDescription
50+
51+
let package = Package(
52+
name: "MyTool",
53+
dependencies: [
54+
.package(url: "https://github.com/apple/swift-syntax.git", .revision("xcode11-beta1")),
55+
],
56+
targets: [
57+
.target(name: "MyTool", dependencies: ["SwiftSyntax"]),
58+
]
59+
)
60+
```
61+
62+
| Xcode Beta Version | SwiftSyntax Revision |
63+
|:-------------------:|:-------------------------:|
64+
| Xcode 11 beta 1 | xcode-11-beta-1 |
65+
66+
67+
Different from building SwiftSyntax from source, declaring SwiftSyntax as a SwiftPM dependency doesn't require
68+
the Swift compiler source because we always push gyb-generated files to a tag.
69+
70+
4371
### Declare SwiftPM dependency with nightly build
4472

4573
1. Download and install the latest Trunk Development (master) [toolchain](https://swift.org/download/#snapshots).

0 commit comments

Comments
 (0)