-
Notifications
You must be signed in to change notification settings - Fork 441
Improve the documentation for building master #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
If, despite following those instructions, you get compiler errors, the Swift toolchain might be too old to contain recent changes in Swift's SwiftSyntaxParser C library. In that case, you'll have to build the compiler and SwiftSyntax together with the following command: | ||
|
||
``` | ||
$ swift/utils/build-script --swiftsyntax --swiftpm --llbuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can only be used to build a .dylib
, right? Not a .framework
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only way that I've been able to successfully build a recent version of SwiftSyntax—but it's still not in a usable form. 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember what it builds: I've only used it for development.
README.md
Outdated
``` | ||
- (enclosing directory) | ||
- swift | ||
- swift-syntax | ||
``` | ||
|
||
And run `swift-syntax/build-script.py`. SwiftSyntax is now being built with the Swift compiler installed on the system. | ||
2. Make sure you have a recent master Swift toolchain installed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you also add a download link here for master toolchain? like https://swift.org/download/#snapshots
3. Define the `TOOLCHAINS` environment variable as below to have the `swift` command point inside the toolchain: | ||
|
||
``` | ||
$ export TOOLCHAINS=swift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if we have multiple OSS toolchain in the dir. Will this select the latest master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed if any swift-5.0-development snapshots are present, these toolchains will take precedence over the master ones. Could you mention this caveat?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the documentation to warn against version specific toolchains. Let me know if you think this is enough.
Looking good! Merging |
Various fixes for `NoCasesWithOnlyFallthrough`.
I had trouble building SwiftSyntax because I wasn't sure how important it was to build it with a recent toolchain (very :p), and then because there were changes in the SwiftSyntaxParser C library which had been done after the latest toolchain. I modified the README to help future contributors.