Skip to content

Rename all references to the master branch to main (or something equivalent) #250

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
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Ignore Data Xcode stores when opening the project directly
/.swiftpm/xcode

# We always build swiftSyntax of master dependencies. Ignore any fixed
# We always build swiftSyntax of trunk dependencies. Ignore any fixed
# dependency versions.
Package.resolved

Expand Down
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Note: This is in reverse chronological order, so newer entries are added to the

## Swift 5.3

* Introduced `FunctionCallExprSyntax.additionalTrailingClosures` property with type `MultipleTrailingClosureElementListSyntax?` for supporting [SE-0279 Multiple Trailing Closures](https://github.com/apple/swift-evolution/blob/master/proposals/0279-multiple-trailing-closures.md).
* Introduced `FunctionCallExprSyntax.additionalTrailingClosures` property with type `MultipleTrailingClosureElementListSyntax?` for supporting [SE-0279 Multiple Trailing Closures](https://github.com/apple/swift-evolution/blob/main/proposals/0279-multiple-trailing-closures.md).

* Introduced `syntaxNodeType` property for all types conforming to `SyntaxProtocol`, which returns the underlying syntax node type. It is primarily intended as a debugging aid during development.

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SwiftSyntax

SwiftSyntax is a set of Swift bindings for the
[libSyntax](https://github.com/apple/swift/tree/master/lib/Syntax) library. It
[libSyntax](https://github.com/apple/swift/tree/main/lib/Syntax) library. It
allows for Swift tools to parse, inspect, generate, and transform Swift source
code.

Expand Down Expand Up @@ -46,7 +46,7 @@ Then, import `SwiftSyntax` in your Swift code.

### Declare SwiftPM dependency with nightly build

1. Download and install the latest Trunk Development (master) [toolchain](https://swift.org/download/#snapshots).
1. Download and install the latest Trunk Development [toolchain](https://swift.org/download/#snapshots).

2. Define the `TOOLCHAINS` environment variable as below to have the `swift` command point inside the toolchain:

Expand Down Expand Up @@ -136,11 +136,11 @@ If you should hit any issues while using SwiftSyntax, we appreciate bug reports

## Contributing

### Building SwiftSyntax from `master`
### Building SwiftSyntax from `main`

Since SwiftSyntax relies on definitions in the main Swift repository to generate the layout of the syntax tree using `gyb`, a checkout of [apple/swift](https://github.com/apple/swift) is still required to build `master` of SwiftSyntax.
Since SwiftSyntax relies on definitions in the main Swift repository to generate the layout of the syntax tree using `gyb`, a checkout of [apple/swift](https://github.com/apple/swift) is still required to build the latest development snapshot of SwiftSyntax.

To build the `master` version of SwiftSyntax, follow the following instructions:
To build the `main` branch of SwiftSyntax, follow the following instructions:

1. Check `swift-syntax` and `swift` out side by side:

Expand All @@ -150,14 +150,14 @@ To build the `master` version of SwiftSyntax, follow the following instructions:
- swift-syntax
```

2. Make sure you have a recent [master Swift toolchain](https://swift.org/download/#snapshots) installed.
2. Make sure you have a recent [Trunk Swift Toolchain](https://swift.org/download/#snapshots) installed.
3. Define the `TOOLCHAINS` environment variable as below to have the `swift` command point inside the toolchain:

```
$ export TOOLCHAINS=swift
```

4. To make sure everything is setup correctly, check the return statement of `xcrun --find swift`. It should point inside the latest installed master toolchain. If it points inside an Xcode toolchain, check that you exported the `TOOLCHAINS` environment variable correctly. If it points inside a version specific toolchain (like Swift 5.0-dev), you'll need to remove that toolchain.
4. To make sure everything is setup correctly, check the return statement of `xcrun --find swift`. It should point inside the latest installed trunk development toolchain. If it points inside an Xcode toolchain, check that you exported the `TOOLCHAINS` environment variable correctly. If it points inside a version specific toolchain (like Swift 5.0-dev), you'll need to remove that toolchain.
5. Run `swift-syntax/build-script.py`.

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:
Expand All @@ -173,7 +173,7 @@ Afterwards, SwiftPM can also generate an Xcode project to develop SwiftSyntax by
If you also want to run tests locally, read the section below as testing has additional requirements.

### Local Testing
SwiftSyntax uses some test utilities that need to be built as part of the Swift compiler project. To build the most recent version of SwiftSyntax and test it, follow the steps in [swift/README.md](https://github.com/apple/swift/blob/master/README.md) and pass `--llbuild --swiftpm --swiftsyntax` to the build script invocation to build SwiftSyntax and all its dependencies using the current `master` compiler.
SwiftSyntax uses some test utilities that need to be built as part of the Swift compiler project. To build the most recent version of SwiftSyntax and test it, follow the steps in [swift/README.md](https://github.com/apple/swift/blob/main/README.md) and pass `--llbuild --swiftpm --swiftsyntax` to the build script invocation to build SwiftSyntax and all its dependencies using the current trunk (`main`) compiler.

SwiftSyntax can then be tested using the build script in `apple/swift` by running
```
Expand Down