Skip to content

Commit 9796261

Browse files
committed
Release notes for SPI MacroExpansion/PluginMessageHandling
1 parent 8f1f8ee commit 9796261

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Release Notes/511.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@
116116
- Description: The new property provides the lexical context in which the macro is expanded, and has several paired API changes. Types that conform to `MacroExpansionContext` will need to implement this property. Additionally, the `HostToPluginMessage` cases `expandFreestandingMacro` and `expandAttachedMacro` now include an optional `lexicalContext`. Finally, the `SyntaxProtocol.expand(macros:in:indentationWidth:)` syntactic expansion operation has been deprecated in favor of a new version `expand(macros:contextGenerator:indentationWidth:)` that takes a function produces a new macro expansion context for each expansion.
117117
- Pull request: https://github.com/apple/swift-syntax/pull/1554
118118
- Migration steps: Add the new property `lexicalContext` to any `MacroExpansionContext`-conforming types. If implementing the host-to-plugin message protocol, add support for `lexicalContext`. For macro expansion operations going through `SyntaxProtocol.expand`, provide a context generator that creates a fresh context including the lexical context.
119-
119+
120+
- All symbols in `SwiftSyntaxMacroExpansion` and `SwiftCompilerPluginMessageHandling` are now SPI
121+
- Description: These modules are only intended to be used from some internal components. Any other modules should not use them directly.
122+
- Pull requrest: https://github.com/apple/swift-syntax/pull/2489
123+
- Micration staps: Stop using these modules.
120124

121125
## Template
122126

0 commit comments

Comments
 (0)