You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***Explanation**: <!-- A description of the issue being fixed or enhancement being made. This can be brief, but it should be clear. -->
2
+
***Scope**: <!-- An assessment of the impact/importance of the change. For example, is the change a source-breaking language change, etc. -->
3
+
***Issue**: <!-- The GitHub Issue link if the change fixes/implements an issue/enhancement -->
4
+
***Original PR**: <!-- Pull Request link from main branch -->
5
+
***Risk**: <!-- What is the (specific) risk to the release for taking this change? -->
6
+
***Testing**: <!-- What specific testing has been done or needs to be done to further validate any impact of this change? -->
7
+
***Reviewer**: <!-- One or more code owners for the impacted components should review the change. Technical review can be delegated by a code owner or otherwise requested as deemed appropriate or useful. -->
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ If you want to modify the generated files, open the [CodeGeneration](CodeGenerat
49
49
Alternatively, you can generate the files from the command line by running the following command from the swift-syntax directory
50
50
51
51
```bash
52
-
swift run --package-path CodeGeneration
52
+
./swift-syntax-dev-utils generate-source-code
53
53
```
54
54
55
55
## Running Pre-PR Checks Script
@@ -71,6 +71,42 @@ We prefer to not squash commits when merging a PR because, especially for larger
71
71
- During review, the commits can be reviewed individually, making each review chunk smaller
72
72
- In case this PR introduced a bug that is identified later, it is possible to check if it resulted from the refactoring or the actual change, thereby making it easier find the lines that introduce the issue.
73
73
74
+
## Opening a PR
75
+
76
+
To submit a PR you don't need permissions on this repo, instead you can fork the repo and create a PR through your forked version.
77
+
78
+
For more information and instructions, read the GitHub docs on [forking a repo](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo).
79
+
80
+
Once you've pushed your branch, you should see an option on this repository's page to create a PR from a branch in your fork.
81
+
82
+
## Opening a PR for Release Branch
83
+
84
+
In order for a pull request to be considered for inclusion in a release branch (e.g. `release/6.0`) after it has been cut, it must meet the following requirements:
85
+
86
+
1. The title of the PR should start with the tag `[{swift version number}]`. For example, `[6.0]` for the Swift 6.0 release branch.
87
+
88
+
1. The PR description must include the following information:
89
+
90
+
```md
91
+
* **Explanation**: A description of the issue being fixed or enhancement being made. This can be brief, but it should be clear.
92
+
* **Scope**: An assessment of the impact/importance of the change. For example, is the change a source-breaking language change, etc.
93
+
* **Issue**: The GitHub Issue link if the change fixes/implements an issue/enhancement.
94
+
* **Original PR**: Pull Request link from the `main` branch.
95
+
* **Risk**: What is the (specific) risk to the release for taking this change?
96
+
* **Testing**: What specific testing has been done or needs to be done to further validate any impact of this change?
97
+
* **Reviewer**: One or more code owners for the impacted components should review the change. Technical review can be delegated by a code owner or otherwise requested as deemed appropriate or useful.
98
+
```
99
+
100
+
> [!TIP]
101
+
> The PR description can be generated using the [release_branch.md](https://github.com/apple/swift-syntax/blob/main/.github/PULL_REQUEST_TEMPLATE/release_branch.md) [pull request template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates). To use this template when creating a PR, you need to add the query parameter:
102
+
> ```
103
+
> ?expand=1&template=release_branch.md
104
+
> ```
105
+
> to the PR URL, as described in the [GitHub documentation on using query parameters to create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/using-query-parameters-to-create-a-pull-request).
106
+
> This is necessary because GitHub does not currently provide a UI to choose a PR template.
107
+
108
+
All changes going into a release branch must go through pull requests that are approved and merged by the corresponding release manager.
109
+
74
110
## Review and CI Testing
75
111
76
112
After you opened your PR, a maintainer will review it and test your changes in CI (*Continuous Integration*) by adding a `@swift-ci Please test` comment on the pull request. Once your PR is approved and CI has passed, the maintainer will merge your pull request.
Copy file name to clipboardExpand all lines: CodeGeneration/README.md
+2-8Lines changed: 2 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,8 @@ This directory contains file to generate source code that is part of the SwiftSy
4
4
5
5
Some source code inside SwiftSyntax is generated using [SwiftSyntaxBuilder](../Sources/SwiftSyntaxBuilder), a Swift library whose purpose is to generate Swift code using Swift itself. This kind of code generation is performed by the Swift package defined in this directory.
6
6
7
-
To re-generate the files after changing `CodeGeneration` run the `generate-swift-syntax`
8
-
target of `CodeGeneration` and pass `path/to/swift-syntax/Sources` as the argument.
7
+
To re-generate the files after changing `CodeGeneration` run the following command on the command line.
9
8
10
-
On the command line, this would be
11
9
```bash
12
-
swift run --package-path CodeGeneration generate-swift-syntax Sources
0 commit comments