I upgraded my Mac and Xcode yesterday and now I can't seem to use swift-format. The project is still on 5.7 and 0.50700.1 for swift-format, I did try 5.8 to see if that would help. Could someone explain what _InternalSwiftSyntaxParser is and how I can update it or not use it?

Thanks in advance,

➜  CS4470 git:(hw11) ✗ swift package --allow-writing-to-package-directory format-source-code
Building for debugging...
error: emit-module command failed with exit code 1 (use -v to see invocation)
/Users/zane/Developer/CS4470/.build/checkouts/swift-syntax/Sources/SwiftSyntaxParser/CNodes.swift:13:29: error: no such module '_InternalSwiftSyntaxParser'
@_implementationOnly import _InternalSwiftSyntaxParser
1 Like

Fixed this by switching swift-format to the main branch. Though it is annoying that doing so automatically opt in to there format plugin implementation.


Could you elaborate on how to switch the swift-format? Was this package listed among your package dependencies? I don't see it among mine.

This library used to be a dependency of swift-syntax, but since Swift 5.8 it has been replaced by a Swift rewrite that is part of swift-syntax. So you shouldn't have to worry about it going forward

I'm not able to build my project with Xcode 14.3. And there is no clue why. Your thread was the only one with somewhat relevant information.With Xcode 14.2 is builds ok.

1 Like