SwiftSyntax parser library isn't compatible

Using commit: 94482c3e79f97e78575906da55f02e1c04f8e531
Xcode Version: 11.2.1
Swift Version: 5.1.2

1. git clone https://github.com/apple/swift-format.git
2. cd swift-format
3. swift build -c release
4. execute the command ./.build/release/swift-format -i ~/Desktop/Test.swift

Raise Exception: SwiftSyntax parser library isn't compatible

You need to check out the swift-5.1-branch of swift-format if you're using it alongside Swift 5.1.x. master is currently pinned to a development snapshot (unfortunately an older one, but still past where the 5.1.x releases were cut). See Matching swift-format to Your Swift Version in the README for more info.

In the near future, we're going to keep master in sync with the master branches of swift-syntax and swift, so the release branch scheme will still apply.

Terms of Service

Privacy Policy

Cookie Policy