Skip to content

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

Merged
merged 1 commit into from
Mar 4, 2019

Conversation

hartbit
Copy link
Contributor

@hartbit hartbit commented Feb 16, 2019

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.

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
Copy link

@mdiep mdiep Feb 22, 2019

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?

Copy link

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. 😞

Copy link
Contributor Author

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.
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Copy link
Contributor Author

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.

@nkcsgexi
Copy link
Contributor

nkcsgexi commented Mar 4, 2019

Looking good! Merging

@nkcsgexi nkcsgexi merged commit 98f7682 into swiftlang:master Mar 4, 2019
@hartbit hartbit deleted the build-doc branch March 12, 2019 07:16
adevress pushed a commit to adevress/swift-syntax that referenced this pull request Jan 14, 2024
Various fixes for `NoCasesWithOnlyFallthrough`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants