|
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 | ## API-Incompatible Changes
|
34 | 36 |
|
35 | 37 | - Effect specifiers:
|
36 | 38 | - Description: The `unexpectedAfterThrowsSpecifier` node of the various effect specifiers has been removed.
|
37 | 39 | - Pull request: https://github.com/apple/swift-syntax/pull/2219
|
| 40 | + - Migration steps: Check `unexpectedBetweenThrowsSpecifierAndThrownError` and `unexpectedAfterThrownError` instead. |
38 | 41 |
|
39 | 42 | - `SyntaxKind` removed conformance to `CaseIterable`
|
40 | 43 | - Description: `SyntaxKind` no longer conforms to `CaseIterable` since there is no good use case to iterate over all syntax kinds.
|
41 |
| - - Pull request: https://github.com/apple/swift-syntax/pull/2292 |
| 44 | + - Pull request: https://github.com/apple/swift-syntax/pull/2292 |
| 45 | + - 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`. |
42 | 46 |
|
43 | 47 | - `IntegerLiteralExprSyntax.Radix` removed conformance to `CaseIterable`
|
44 | 48 | - Description: `IntegerLiteralExprSyntax.Radix` no longer conforms to `CaseIterable` since there is no good use case to iterate over all radix kinds.
|
45 | 49 | - Pull request: https://github.com/apple/swift-syntax/pull/2292
|
| 50 | + - Migration steps: There should be no use case to iterate over all cases in `IntegerLiteralExprSyntax.Radix`. |
46 | 51 |
|
47 | 52 | - `Parser.parseIncrementally(source:parseTransition:)` and `Parser.parseIncrementally(source:maximumNestingLevel:parseTransition:)`:
|
48 | 53 | - 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.
|
49 | 54 | - Issue: https://github.com/apple/swift-syntax/issues/2267
|
50 | 55 | - Pull request: https://github.com/apple/swift-syntax/pull/2272
|
| 56 | + - Migration steps: If necessary, change type annotations from the tuple to the `IncrementalParseResult` type. |
51 | 57 |
|
52 | 58 | ## Template
|
53 | 59 |
|
54 | 60 | - *Affected API or two word description*
|
55 | 61 | - Description: *A 1-2 sentence description of the new/modified API*
|
56 | 62 | - Issue: *If an issue exists for this change, a link to the issue*
|
57 | 63 | - Pull Request: *Link to the pull request(s) that introduces this change*
|
| 64 | + - Migration steps: Steps that adopters of swift-syntax should take to move to the new API (required for deprecations and API-incompatible changes). |
58 | 65 | - Notes: *In case of deprecations or API-incompatible changes, the reason why this change was made and the suggested alternative*
|
59 | 66 |
|
60 | 67 | *Insert entries in chronological order, with newer entries at the bottom*
|
0 commit comments