Skip to content

Commit aac9d60

Browse files
authored
Merge pull request #2863 from ahoppen/rfc-process
Describe an RFC process to request feedback for public API changes
2 parents a57f3be + 13d758a commit aac9d60

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

CONTRIBUTING.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ Once you've pushed your branch, you should see an option on this repository's pa
8484
> [!TIP]
8585
> If you are stuck, it’s encouraged to submit a PR that describes the issue you’re having, e.g. if there are tests that are failing, build failures you can’t resolve, or if you have architectural questions. We’re happy to work with you to resolve those issue.
8686
87-
## Opening a PR for Release Branch
87+
### Opening a PR for Release Branch
8888

89-
See the [dedicated section][section] on the Swift project website.
89+
See the [dedicated section](https://www.swift.org/contributing/#release-branch-pull-requests) on the Swift project website.
9090

91-
[section]: https://www.swift.org/contributing/#release-branch-pull-requests
91+
## Changing public API
92+
93+
If you are modifying public API, request feedback for these changes from the community by opening a RFC as described by the [RFC Process](Contributor%20Documentation/RFC%20Process.md).
9294

9395
## Review and CI Testing
9496

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# RFC Process
2+
3+
We gather community feedback for all changes to swift-syntax’s public API to keep it clean and usable. Everybody is encouraged to share their thoughts on the RFC posts.
4+
5+
Public API changes are:
6+
- New APIs
7+
- Changes to API behavior that are not considered bugfixes
8+
- Deprecations of public API
9+
- API-incompatible changes, like changing the type of a public variable
10+
- Declarations marked with `@_spi` are not considered part of the public API and don’t require an RFC.
11+
12+
## The RFC post
13+
14+
The RFC process should contain the following.
15+
- **Summary**: A short summary of the changes. If it is not obvious, what motivated this change?
16+
- **Link to PR**: Link to the pull request that implements the API change.
17+
- **Swift Interface**: The changed API in a Swift Interface style notation.
18+
- For new API this should contain the new API’s signature and its doc comment.
19+
- If the change affects existing API, the old API’s signature should also be included in the RFC post for reference.
20+
- **For new API**: If this is new API, justify why this is this a worthwhile addition to swift-syntax. A good guideline is to answer the following questions.
21+
- **Commonality**: Do you expect this API to be widely used? Is it applicable in a variety of contexts?
22+
- **Discoverability**: Will users of swift-syntax easily find this new API for the operations they want to achieve?
23+
- **Not trivially composable**: Can the desired behavior be achieved using existing public API? If yes, is this new API superior because one of the following reasons?
24+
- **Readability**: Is the proposed new API easier to understand than the composed alternative?
25+
- **Correctness and performance issues**: Does the naive implementation using existing API have any correctness or performance issues that would be covered correctly by the new API.
26+
- **For existing API**: If this is modifying existing API, do you expect many clients to be affected by the change?
27+
- **Migration**: What are the migration steps needed to migrate to the new API?
28+
29+
Make sure to also include the change in `Release Notes/<version>.md`.
30+
31+
## The RFC process
32+
33+
After posting the RFC in the [swift-syntax category on the Swift forums](https://forums.swift.org/c/development/swift-syntax/112), you can merge the PR. You are expected to incorporate any feedback from the RFC in a timely manner.

0 commit comments

Comments
 (0)