|
24 | 24 | - Description: `is`, `as`, and `cast` methods for types not contained in the choice node are marked as deprecated. The deprecated methods will emit a warning, indicating that the cast will always fail. |
25 | 25 | - Issue: https://github.com/apple/swift-syntax/issues/2092 |
26 | 26 | - Pull Request: https://github.com/apple/swift-syntax/pull/2184 |
| 27 | + - Migration steps: Remove the `is`, `as` or `cast` methods because they will always fail. |
27 | 28 |
|
28 | 29 | - `IncrementalParseTransition`: |
29 | 30 | - Description: The initializer `IncrementalParseTransition.init(previousTree:edits:lookaheadRanges:reusedNodeCallback:)` is marked as deprecated. Use `IncrementalParseTransition.init(previousIncrementalParseResult:edits:reusedNodeCallback:)` instead. |
30 | 31 | - Issue: https://github.com/apple/swift-syntax/issues/2267 |
31 | 32 | - Pull request: https://github.com/apple/swift-syntax/pull/2272 |
| 33 | + - Migration steps: Call `IncrementalParseTransition.init(previousIncrementalParseResult:edits:reusedNodeCallback:)` instead. |
32 | 34 |
|
33 | 35 | - `MacroExpansion{Error|Warning|FixIt}Message` moved to the `SwiftSyntaxMacros` module |
34 | 36 | - Description: Move the `MacroExpansion{Error|Warning|FixIt}Message` types from the `SwiftSyntaxMacroExpansion` module to `SwiftSyntaxMacros`. Deprecated typealiases in `SwiftSyntaxMacroExpansion` forward to `SwiftSyntaxMacros`. |
|
40 | 42 | - Effect specifiers: |
41 | 43 | - Description: The `unexpectedAfterThrowsSpecifier` node of the various effect specifiers has been removed. |
42 | 44 | - Pull request: https://github.com/apple/swift-syntax/pull/2219 |
| 45 | + - Migration steps: Check `unexpectedBetweenThrowsSpecifierAndThrownError` and `unexpectedAfterThrownError` instead. |
43 | 46 |
|
44 | 47 | - `SyntaxKind` removed conformance to `CaseIterable` |
45 | 48 | - Description: `SyntaxKind` no longer conforms to `CaseIterable` since there is no good use case to iterate over all syntax kinds. |
46 | | - - Pull request: https://github.com/apple/swift-syntax/pull/2292 |
| 49 | + - Pull request: https://github.com/apple/swift-syntax/pull/2292 |
| 50 | + - Migration steps: Exhaustively check all the syntax nodes that your program supports. There should be no use case to iterate over all cases in `SyntaxKind`. |
47 | 51 |
|
48 | 52 | - `IntegerLiteralExprSyntax.Radix` removed conformance to `CaseIterable` |
49 | 53 | - Description: `IntegerLiteralExprSyntax.Radix` no longer conforms to `CaseIterable` since there is no good use case to iterate over all radix kinds. |
50 | 54 | - Pull request: https://github.com/apple/swift-syntax/pull/2292 |
| 55 | + - Migration steps: There should be no use case to iterate over all cases in `IntegerLiteralExprSyntax.Radix`. |
51 | 56 |
|
52 | 57 | - `Parser.parseIncrementally(source:parseTransition:)` and `Parser.parseIncrementally(source:maximumNestingLevel:parseTransition:)`: |
53 | 58 | - Description: The default versions of `Parser.parseIncrementally` return a `IncrementalParseResult` instead of a tuple. Access to the struct should be compatible with the tuple in almost all cases unless the tuple is stored into a variable and then destructed or passed to a function that expects a tuple. |
54 | 59 | - Issue: https://github.com/apple/swift-syntax/issues/2267 |
55 | 60 | - Pull request: https://github.com/apple/swift-syntax/pull/2272 |
| 61 | + - Migration steps: If necessary, change type annotations from the tuple to the `IncrementalParseResult` type. |
56 | 62 |
|
57 | 63 | ## Template |
58 | 64 |
|
59 | 65 | - *Affected API or two word description* |
60 | 66 | - Description: *A 1-2 sentence description of the new/modified API* |
61 | 67 | - Issue: *If an issue exists for this change, a link to the issue* |
62 | 68 | - Pull Request: *Link to the pull request(s) that introduces this change* |
| 69 | + - Migration steps: Steps that adopters of swift-syntax should take to move to the new API (required for deprecations and API-incompatible changes). |
63 | 70 | - Notes: *In case of deprecations or API-incompatible changes, the reason why this change was made and the suggested alternative* |
64 | 71 |
|
65 | 72 | *Insert entries in chronological order, with newer entries at the bottom* |
0 commit comments