<div dir="ltr"><div>I&#39;d like to try the Swift libSyntax API.</div><div><br></div>I did a fresh clone and compiled with<div>$ ./utils/build-script --release-debuginfo --xcode<br></div><div>using Xcode 9 beta 2 (9B46).</div><div><br></div><div>Now I&#39;d like to try SwiftSyntax so I created a new Xcode project (TestLibSyntax) and copied these three files to a project folder (/Users/mmg/src/TestLibSyntax/Libraries)</div><div>~/swift-source/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64/RelWithDebInfo/lib/swift/macosx/libswiftSwiftSyntax.dylib<br></div><div>~/swift-source/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64/RelWithDebInfo/lib/swift/macosx/x86_64/SwiftSyntax.swiftmodule<br></div><div>~/swift-source/build/Xcode-RelWithDebInfoAssert/swift-macosx-x86_64/RelWithDebInfo/lib/swift/macosx/x86_64/SwiftSyntax.swiftdoc<br></div><div><br></div><div>Then in the Build Settings I set</div><div>SWIFT_INCLUDE_PATHS = /Users/mmg/src/TestLibSyntax/Libraries<br></div><div><br></div><div>And add a build phase to copy the .dylib to the Frameworks directory.</div><div><br></div><div>Upon building this project the compiler now complains that</div><div>Module compiled with Swift 4.1 cannot be imported in Swift 4.0.1: /Users/mmg/src/TestLibSyntax/Libraries/SwiftSyntax.swiftmodule<br></div><div><br></div><div>Is there a way to tell the compiler to build everything in this example project with Swift 4.1?</div><div><br></div><div>Or, how to use the SwiftSyntax swiftmodule and dylib in a regular Xcode project?</div><div><br></div><div><br></div><div>Best,</div><div>Michael</div></div>