10000 Update README · SwiftDocOrg/SwiftSemantics@e7e86b4 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Commit e7e86b4

Browse files
committed
Update README
Add instructions for including SwiftSyntax as a direct dependency
1 parent 9959408 commit e7e86b4

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,34 @@ let package = Package(
9090
name: "SwiftSemantics",
9191
url: "https://github.com/SwiftDocOrg/SwiftSemantics",
9292
from: "0.3.0"
93-
),
94-
.package(
95-
name: "SwiftSyntax",
96-
url: "https://github.com/apple/swift-syntax.git",
97-
from: "0.50300.0"
98-
),
93+
)
9994
]
10095
)
10196
```
10297

103-
Then run the `swift build` command to build your project.
98+
If your project has a direct dependency `SwiftSyntax`,
99+
use the declaration below that corresponds to your Swift language version:
100+
101+
```swift
102+
// Swift 5.2
103+
.package(url: "https://github.com/apple/swift-syntax.git",
104+
.exact("0.50200.0")),
105+
106+
// Swift 5.3
107+
.package(name: "SwiftSyntax",
108+
url: "https://github.com/apple/swift-syntax.git",
109+
.exact("0.50300.0")),
110+
111+
// Swift 5.4
112+
.package(name: "SwiftSyntax",
113+
url: "https://github.com/apple/swift-syntax.git",
114+
.revision("release/5.4")),
115+
116+
// Swift 5.5
117+
.package(name: "SwiftSyntax",
118+
url: "https://github.com/apple/swift-syntax.git",
119+
.revision("4ae758ab85ed2a5d3e3e8b5050a8ce52179bd102")),
120+
```
104121

105122
## Detailed Design
106123

0 commit comments

Comments
 (0)
0