Skip to content

Explicitly specify how many last versions of Swift we want to support #1563

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
Apr 21, 2023
Merged
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
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Alternatively you can also build it from the command line using `build-script.py
- (enclosing directory)
- swift-argument-parser
- swift-syntax
```
2. Execute the following command
```bash
swift-syntax/build-script.py build --toolchain /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-<recent date>.xctoolchain/usr
Expand Down Expand Up @@ -62,15 +63,15 @@ Tip: Running SwiftSyntax’s self-parse tests takes the majority of testing time
2. Select the Arguments tab in the Run section
3. Add a `SKIP_LONG_TESTS` environment variable with value `1`

### `lit`-based tests
### `lit`-based Tests

A few tests are based LLVM’s `lit` and `FileCheck` tools.
To run these, build `FileCheck`, e.g. by building the Swift compiler and run the tests using the following command:
```bash
./build-script.py test --toolchain /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-<recent date>.xctoolchain/usr --skip-lit-tests --filecheck-exec /path/to/build/Release+Asserts/llvm-macosx-x86_64/bin/FileCheck
```

## Generating source code
## Generating Source Code

If you want to modify the code-generated files, perform the following steps:

Expand All @@ -86,3 +87,7 @@ If you want to modify the code-generated files, perform the following steps:
swift-syntax/build-script.py generate-source-code --toolchain /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-<recent date>.xctoolchain/usr
```
3. The new source-generated file will be written into your `Sources` directory.

## Swift Version

We require that SwiftSyntax builds with the latest released compiler and the previous major version (e.g. with Swift 5.8 and Swift 5.7).