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