Skip to content

Commit e0d014c

Browse files
authored
Merge pull request #506 from allevato/prep-5.8-release
Prepare 508.0.0 release.
2 parents 8fe7a2a + eae9b78 commit e0d014c

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,25 @@ invoked via an [API](#api-usage).
1313
> and the code is provided so that it can be tested on real-world code and
1414
> experiments can be made by modifying it.
1515
16-
## Matching swift-format to Your Swift Version (Swift 5.7 and earlier)
16+
## Matching swift-format to Your Swift Version
1717

18-
> NOTE: `swift-format` on the `main` branch now uses a version of
19-
> [SwiftSyntax](https://github.com/apple/swift-syntax) whose parser has been
20-
> rewritten in Swift and no longer has dependencies on libraries in the
21-
> Swift toolchain. This allows `swift-format` to be built, developed, and
22-
> run using any version of Swift that can compile it, decoupling it from
23-
> the version that supported a particular syntax.
18+
### Swift 5.8 and later
19+
20+
As of Swift 5.8, swift-format depends on the version of
21+
[SwiftSyntax](https://github.com/apple/swift-syntax) whose parser has been
22+
rewritten in Swift and no longer has dependencies on libraries in the
23+
Swift toolchain.
24+
25+
This change allows `swift-format` to be built, developed, and run using
26+
any version of Swift that can compile it, decoupling it from the version
27+
that supported a particular syntax. However, earlier versions of swift-format
28+
will still not be able to recognize new syntax added in later versions of the
29+
language and parser.
30+
31+
Note also that the version numbering scheme has changed to match
32+
SwiftSyntax; the 5.8 release of swift-format is `508.0.0`, not `0.50800.0`.
33+
34+
### Swift 5.7 and earlier
2435

2536
`swift-format` versions 0.50700.0 and earlier depend on versions of
2637
[SwiftSyntax](https://github.com/apple/swift-syntax) that used a standalone
@@ -54,7 +65,7 @@ then once you have identified the version you need, you can check out the
5465
source and build it using the following commands:
5566

5667
```sh
57-
VERSION=0.50700.0 # replace this with the version you need
68+
VERSION=508.0.0 # replace this with the version you need
5869
git clone https://github.com/apple/swift-format.git
5970
cd swift-format
6071
git checkout "tags/$VERSION"

Sources/swift-format/VersionOptions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct VersionOptions: ParsableArguments {
2020
func validate() throws {
2121
if version {
2222
// TODO: Automate updates to this somehow.
23-
print("0.50500.0")
23+
print("508.0.0")
2424
throw ExitCode.success
2525
}
2626
}

0 commit comments

Comments
 (0)