Building SwiftSyntax and missing _InternalSwiftSyntaxParser

(Marcin Krzyzanowski) #1

Hi,

Not sure if that's the right place to ask, but didn't find any better. I'm trying to build SwiftSyntax along the swift build (--swiftsyntax) but encounter a problem. When build swift with this command:

swift/utils/build-script --release-debuginfo --swiftpm --llbuild --build-swift-static-stdlib --swiftsyntax --skip-ios --skip-tvos --skip-watchos --skip-test-cmark --skip-test-swift --skip-test-llbuild --skip-test-swiftpm

it ends with

swift-source/swift-syntax/Sources/SwiftSyntax/SyntaxParser.swift:17:8: error: no such module '_InternalSwiftSyntaxParser'
import _InternalSwiftSyntaxParser
       ^

Error: Building SwiftSyntax failed

Swift source tag swift-5.0-DEVELOPMENT-SNAPSHOT-2019-01-23-a

Am I doing something wrong here? I guess my question is how to build swift-syntax master?

(Brent Royal-Gordon) #2

SwiftSyntax's master branch uses a new, much faster interface to the compiler that isn't available in Swift's 5.0 branch—it's only in Swift's master branch. (Yes, there's already stuff in master that isn't in the beta—there wasn't enough time to thoroughly test such a large change.)

Make sure that your compiler and SwiftSyntax repos are on matching branches. The easiest way to do this is by running utils/update-checkout --scheme swift-5.0-branch or utils/update-checkout --scheme master, depending on which one you want to build.

1 Like
(Marcin Krzyzanowski) #3

Great. thanks. Will build master then.

(Argyrios Kyrtzidis) #4

You can also use the master development snapshots if you'd prefer not to build the swift compiler.

1 Like