chore(deps): update dependency apple/swift-syntax to v600 #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.50100.0
->600.0.1
Release Notes
apple/swift-syntax (apple/swift-syntax)
v600.0.1
Compare Source
Compared to 600.0.0 this release fixes a compilation issue when building swift-syntax in C++ interop mode (https://github.com/swiftlang/swift-syntax/pull/2861).
It also contains the following changes from 600.0.0.
New APIs
FixIt now has a new computed property named
edits
edits
represent the non-overlapping textualedits
that need to be performed when the Fix-It is applied.SourceEdit
SourceEdit
has been moved from SwiftRefactor to SwiftSyntaxassertMacroExpansion
now have new parameters namedapplyFixIts
andfixedSource
applyFixIts
andfixedSource
are used to assert so ensure that the source code after applying Fix-Its matches this string.DeclSyntaxEnum
,StmtSyntaxEnum
,ExprSyntaxEnum
,TypeSyntaxEnum
, andPatternSyntaxEnum
WithOptionalCodeBlock
FunctionDeclSyntax
andInitializerDeclSyntax
.CodeBlockSyntax
CodeBlockSyntax
is nowSyntaxParseable
, so it can be used with string interpolations.ThrowsClause
throwsSpecifier
for the effects nodes (AccessorEffectSpecifiers
,FunctionEffectSpecifiers
,TypeEffectSpecifiers
,EffectSpecifiers
) has been replaced withthrowsClause
, which captures both the throws specifier and the (optional) thrown error type, as introduced by SE-0413.String.isValidSwiftIdentifier(for:)
SwiftParser
adds an extension onString
to check if it can be used as an identifier in a given context.MacroDeclSyntax.expand
expand(argumentList:definition:replacements:)
method gains a new parameter 'genericReplacements:' that is defaulted to an empty array.expand(argumentList:definition:replacements:genericReplacements:)
SyntaxProtocol.asMacroLexicalContext()
andallMacroLexicalContexts(enclosingSyntax:)
TriviaPiece.isComment
TriviaPiece
now has a computed propertyisComment
that returnstrue
if the trivia piece is a comment.New
assertMacroExpansion
API with option to specify macro specifications withmacroSpecs
argumentmacroSpecs
can have additional specifications like conformances provided by member or extension macro that can be used for macro expansion.BasicFormat.inferIndentation(of:)
IncrementalEdit
stores replacement textIncrementalEdit
used to store the range that was replaced and the length of the replacement but not the replacement bytes by itself.IncrementalEdit
now has areplacement
property that contains the replacement bytes.Type specifiers
AttributedTypeSyntax
can now contain multiple specifiers and these types are used to model the list of specifiers. Additionally, type specifiers can now contain arguments, likeborrow(data)
. To facilitate this, the following new types were introduces:LifetimeSpecifierArgumentListSyntax
,LifetimeSpecifierArgumentSyntax
,LifetimeSpecifierArgumentsSyntax
,LifetimeTypeSpecifierSyntax
,SimpleTypeSpecifierSyntax
,TypeSpecifierListSyntax
DeclGroupSyntax.introducer
DeclGroupSyntax
trait has an extraintroducer
property, ie. the keyword that introduces the declaration.ExprSyntax.interpretedAsVersionTuple
#if canImport(MyModule, _version: 1.2.3)
as a function call instead of a dedicated syntax node,1.2.3
natively gets parsed as a member access3
to the1.2
float literal. This property allows the reinterpretation of such an expression as a version tuple.SyntaxProtocol.node(at:)
SyntaxIdentifier
, returns theSyntax
node with that identifierSyntaxIdentifier.IndexInTree
SyntaxIdentifier
but does not store the root ID of the tree. It can thus be transferred across trees that are structurally equivalent, for example two copies of the same tree that live in different processes. The only public functions on this type aretoOpaque
andinit(fromOpaque:)
, which allow serialization of theIndexInTree
.SyntaxIdentifier
conformance toComparable
:SyntaxIdentifier
compares less than anotherSyntaxIdentifier
if the node at that identifier occurs first during a depth-first traversal of the tree.SyntaxIdentifier.indexInTree
andSyntaxIdentifier.fromIndexInTree
SyntaxIdentifier.indexInTree
allows the retrieval of aSyntaxIdentifier
that identifies the syntax node independent of the syntax tree.SyntaxIdentifier.fromIndexInTree
allows the creation for aSyntaxIdentifier
from a tree-agnosticSyntaxIdentifier.IndexInTree
and the tree's root node.SwiftSyntaxMacrosGenericTestSupport
SwiftSyntaxMacrosTestSupport
module that doesn't depend onFoundation
orXCTest
and can thus be used to write macro tests usingswift-testing
. Since swift-syntax can't depend on swift-testing (which would incur a circular dependency since swift-testing depends on swift-syntax), users need to manually specify a failure handler like the following, that fails the swift-testing test:Issue.record("\($0.message)", fileID: $0.location.fileID, filePath: $0.location.filePath, line: $0.location.line, column: $0.location.column)
TokenSyntax.identifier
identifier
property toTokenSyntax
which returns a canonicalized representation of an identifier that strips away backticks.Deprecations
Child Choice Node Casts
is
,as
, andcast
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.is
,as
orcast
methods because they will always fail.IncrementalParseTransition
:IncrementalParseTransition.init(previousTree:edits:lookaheadRanges:reusedNodeCallback:)
is marked as deprecated. UseIncrementalParseTransition.init(previousIncrementalParseResult:edits:reusedNodeCallback:)
instead.IncrementalParseTransition.init(previousIncrementalParseResult:edits:reusedNodeCallback:)
instead.MacroExpansion{Error|Warning|FixIt}Message
moved to theSwiftSyntaxMacros
moduleMacroExpansion{Error|Warning|FixIt}Message
types from theSwiftSyntaxMacroExpansion
module toSwiftSyntaxMacros
. Deprecated typealiases inSwiftSyntaxMacroExpansion
forward toSwiftSyntaxMacros
.SwiftSyntaxMacroExpansion
, which is intended as an implementation detail of the plugin server and should not need to be imported by macros.EditorPlaceholderDeclSyntax
andEditorPlaceholderExprSyntax
:EditorPlaceholderDeclSyntax
andEditorPlaceholderExprSyntax
are now deprecated and placeholders are instead parsed as identifiers within aMissingDeclSyntax
orDeclReferenceExprSyntax
.AttributedTypeSyntax.specifier
has renamed tospecifiers
and changed to be a collectionCanImportExprSyntax
andCanImportVersionInfoSyntax
canImport
inside#if
directives as a special expression node, parse it as a functionc call expression. This is in-line with how theswift(>=6.0)
andcompiler(>=6.0)
directives are parsed.API-Incompatible Changes
MacroDefinition
used for expanding macros:MacroDefinition/expansion
enum case used to have two values ((MacroExpansionExprSyntax, replacements: [Replacement])
), has now gained another value in order to support generic argument replacements in macro expansions:(MacroExpansionExprSyntax, replacements: [Replacement], genericReplacements: [GenericArgumentReplacement])
case .expansion(let node, let replacements, let genericReplacements):
. Creating the.extension
gained a compatibility shim, retaining the previous syntax source compatible (return .expansion(node, replacements: [])
).Effect specifiers:
unexpectedAfterThrowsSpecifier
node of the various effect specifiers has been removed.unexpectedBetweenThrowsSpecifierAndThrownError
andunexpectedAfterThrownError
instead.SyntaxKind
removed conformance toCaseIterable
SyntaxKind
no longer conforms toCaseIterable
since there is no good use case to iterate over all syntax kinds.SyntaxKind
.IntegerLiteralExprSyntax.Radix
removed conformance toCaseIterable
IntegerLiteralExprSyntax.Radix
no longer conforms toCaseIterable
since there is no good use case to iterate over all radix kinds.IntegerLiteralExprSyntax.Radix
.Parser.parseIncrementally(source:parseTransition:)
andParser.parseIncrementally(source:maximumNestingLevel:parseTransition:)
:Parser.parseIncrementally
return aIncrementalParseResult
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.IncrementalParseResult
type.SyntaxClassification
gained a new case:argumentLabel
SyntaxClassification
, cover the new case.SyntaxEnum
andSyntaxKind
gained new cases:throwsClause
ThrowsClauseSyntax
SyntaxEnum
andSyntaxKind
, cover the new case.MacroExpansionContext
now requires a propertylexicalContext
:MacroExpansionContext
will need to implement this property. Additionally, theHostToPluginMessage
casesexpandFreestandingMacro
andexpandAttachedMacro
now include an optionallexicalContext
. Finally, theSyntaxProtocol.expand(macros:in:indentationWidth:)
syntactic expansion operation has been deprecated in favor of a new versionexpand(macros:contextGenerator:indentationWidth:)
that takes a function produces a new macro expansion context for each expansion.lexicalContext
to anyMacroExpansionContext
-conforming types. If implementing the host-to-plugin message protocol, add support forlexicalContext
. For macro expansion operations going throughSyntaxProtocol.expand
, provide a context generator that creates a fresh context including the lexical context.TriviaPiece.isBackslash
inSwiftParserDiagnostics
removedTriviaPiece.isBackslash
was not intended to be public API.if case .backslash = triviaPiece
insteadAll symbols in
SwiftCompilerPluginMessageHandling
are now SPIv600.0.0
Compare Source
New APIs
FixIt now has a new computed property named
edits
edits
represent the non-overlapping textualedits
that need to be performed when the Fix-It is applied.SourceEdit
SourceEdit
has been moved from SwiftRefactor to SwiftSyntaxassertMacroExpansion
now have new parameters namedapplyFixIts
andfixedSource
applyFixIts
andfixedSource
are used to assert so ensure that the source code after applying Fix-Its matches this string.DeclSyntaxEnum
,StmtSyntaxEnum
,ExprSyntaxEnum
,TypeSyntaxEnum
, andPatternSyntaxEnum
WithOptionalCodeBlock
FunctionDeclSyntax
andInitializerDeclSyntax
.CodeBlockSyntax
CodeBlockSyntax
is nowSyntaxParseable
, so it can be used with string interpolations.ThrowsClause
throwsSpecifier
for the effects nodes (AccessorEffectSpecifiers
,FunctionEffectSpecifiers
,TypeEffectSpecifiers
,EffectSpecifiers
) has been replaced withthrowsClause
, which captures both the throws specifier and the (optional) thrown error type, as introduced by SE-0413.String.isValidSwiftIdentifier(for:)
SwiftParser
adds an extension onString
to check if it can be used as an identifier in a given context.MacroDeclSyntax.expand
expand(argumentList:definition:replacements:)
method gains a new parameter 'genericReplacements:' that is defaulted to an empty array.expand(argumentList:definition:replacements:genericReplacements:)
SyntaxProtocol.asMacroLexicalContext()
andallMacroLexicalContexts(enclosingSyntax:)
TriviaPiece.isComment
TriviaPiece
now has a computed propertyisComment
that returnstrue
if the trivia piece is a comment.New
assertMacroExpansion
API with option to specify macro specifications withmacroSpecs
argumentmacroSpecs
can have additional specifications like conformances provided by member or extension macro that can be used for macro expansion.BasicFormat.inferIndentation(of:)
IncrementalEdit
stores replacement textIncrementalEdit
used to store the range that was replaced and the length of the replacement but not the replacement bytes by itself.IncrementalEdit
now has areplacement
property that contains the replacement bytes.Type specifiers
AttributedTypeSyntax
can now contain multiple specifiers and these types are used to model the list of specifiers. Additionally, type specifiers can now contain arguments, likeborrow(data)
. To facilitate this, the following new types were introduces:LifetimeSpecifierArgumentListSyntax
,LifetimeSpecifierArgumentSyntax
,LifetimeSpecifierArgumentsSyntax
,LifetimeTypeSpecifierSyntax
,SimpleTypeSpecifierSyntax
,TypeSpecifierListSyntax
DeclGroupSyntax.introducer
DeclGroupSyntax
trait has an extraintroducer
property, ie. the keyword that introduces the declaration.ExprSyntax.interpretedAsVersionTuple
#if canImport(MyModule, _version: 1.2.3)
as a function call instead of a dedicated syntax node,1.2.3
natively gets parsed as a member access3
to the1.2
float literal. This property allows the reinterpretation of such an expression as a version tuple.SyntaxProtocol.node(at:)
SyntaxIdentifier
, returns theSyntax
node with that identifierSyntaxIdentifier.IndexInTree
SyntaxIdentifier
but does not store the root ID of the tree. It can thus be transferred across trees that are structurally equivalent, for example two copies of the same tree that live in different processes. The only public functions on this type aretoOpaque
andinit(fromOpaque:)
, which allow serialization of theIndexInTree
.SyntaxIdentifier
conformance toComparable
:SyntaxIdentifier
compares less than anotherSyntaxIdentifier
if the node at that identifier occurs first during a depth-first traversal of the tree.SyntaxIdentifier.indexInTree
andSyntaxIdentifier.fromIndexInTree
SyntaxIdentifier.indexInTree
allows the retrieval of aSyntaxIdentifier
that identifies the syntax node independent of the syntax tree.SyntaxIdentifier.fromIndexInTree
allows the creation for aSyntaxIdentifier
from a tree-agnosticSyntaxIdentifier.IndexInTree
and the tree's root node.SwiftSyntaxMacrosGenericTestSupport
SwiftSyntaxMacrosTestSupport
module that doesn't depend onFoundation
orXCTest
and can thus be used to write macro tests usingswift-testing
. Since swift-syntax can't depend on swift-testing (which would incur a circular dependency since swift-testing depends on swift-syntax), users need to manually specify a failure handler like the following, that fails the swift-testing test:Issue.record("\($0.message)", fileID: $0.location.fileID, filePath: $0.location.filePath, line: $0.location.line, column: $0.location.column)
TokenSyntax.identifier
identifier
property toTokenSyntax
which returns a canonicalized representation of an identifier that strips away backticks.Deprecations
Child Choice Node Casts
is
,as
, andcast
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.is
,as
orcast
methods because they will always fail.IncrementalParseTransition
:IncrementalParseTransition.init(previousTree:edits:lookaheadRanges:reusedNodeCallback:)
is marked as deprecated. UseIncrementalParseTransition.init(previousIncrementalParseResult:edits:reusedNodeCallback:)
instead.IncrementalParseTransition.init(previousIncrementalParseResult:edits:reusedNodeCallback:)
instead.MacroExpansion{Error|Warning|FixIt}Message
moved to theSwiftSyntaxMacros
moduleMacroExpansion{Error|Warning|FixIt}Message
types from theSwiftSyntaxMacroExpansion
module toSwiftSyntaxMacros
. Deprecated typealiases inSwiftSyntaxMacroExpansion
forward toSwiftSyntaxMacros
.SwiftSyntaxMacroExpansion
, which is intended as an implementation detail of the plugin server and should not need to be imported by macros.EditorPlaceholderDeclSyntax
andEditorPlaceholderExprSyntax
:EditorPlaceholderDeclSyntax
andEditorPlaceholderExprSyntax
are now deprecated and placeholders are instead parsed as identifiers within aMissingDeclSyntax
orDeclReferenceExprSyntax
.AttributedTypeSyntax.specifier
has renamed tospecifiers
and changed to be a collectionCanImportExprSyntax
andCanImportVersionInfoSyntax
canImport
inside#if
directives as a special expression node, parse it as a functionc call expression. This is in-line with how theswift(>=6.0)
andcompiler(>=6.0)
directives are parsed.API-Incompatible Changes
MacroDefinition
used for expanding macros:MacroDefinition/expansion
enum case used to have two values ((MacroExpansionExprSyntax, replacements: [Replacement])
), has now gained another value in order to support generic argument replacements in macro expansions:(MacroExpansionExprSyntax, replacements: [Replacement], genericReplacements: [GenericArgumentReplacement])
case .expansion(let node, let replacements, let genericReplacements):
. Creating the.extension
gained a compatibility shim, retaining the previous syntax source compatible (return .expansion(node, replacements: [])
).Effect specifiers:
unexpectedAfterThrowsSpecifier
node of the various effect specifiers has been removed.unexpectedBetweenThrowsSpecifierAndThrownError
andunexpectedAfterThrownError
instead.SyntaxKind
removed conformance toCaseIterable
SyntaxKind
no longer conforms toCaseIterable
since there is no good use case to iterate over all syntax kinds.SyntaxKind
.IntegerLiteralExprSyntax.Radix
removed conformance toCaseIterable
IntegerLiteralExprSyntax.Radix
no longer conforms toCaseIterable
since there is no good use case to iterate over all radix kinds.IntegerLiteralExprSyntax.Radix
.Parser.parseIncrementally(source:parseTransition:)
andParser.parseIncrementally(source:maximumNestingLevel:parseTransition:)
:Parser.parseIncrementally
return aIncrementalParseResult
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.IncrementalParseResult
type.SyntaxClassification
gained a new case:argumentLabel
SyntaxClassification
, cover the new case.SyntaxEnum
andSyntaxKind
gained new cases:throwsClause
ThrowsClauseSyntax
SyntaxEnum
andSyntaxKind
, cover the new case.MacroExpansionContext
now requires a propertylexicalContext
:MacroExpansionContext
will need to implement this property. Additionally, theHostToPluginMessage
casesexpandFreestandingMacro
andexpandAttachedMacro
now include an optionallexicalContext
. Finally, theSyntaxProtocol.expand(macros:in:indentationWidth:)
syntactic expansion operation has been deprecated in favor of a new versionexpand(macros:contextGenerator:indentationWidth:)
that takes a function produces a new macro expansion context for each expansion.lexicalContext
to anyMacroExpansionContext
-conforming types. If implementing the host-to-plugin message protocol, add support forlexicalContext
. For macro expansion operations going throughSyntaxProtocol.expand
, provide a context generator that creates a fresh context including the lexical context.TriviaPiece.isBackslash
inSwiftParserDiagnostics
removedTriviaPiece.isBackslash
was not intended to be public API.if case .backslash = triviaPiece
insteadAll symbols in
SwiftCompilerPluginMessageHandling
are now SPIv510.0.3
Compare Source
Compared to 510.0.2 improves swift-syntax’s ability to build using Bazel.
It also contains the following changes from 510.0.0.
New APIs
SyntaxStringInterpolation.appendInterpolation(_: (some SyntaxProtocol)?)
nil
, nothing will get added to the string interpolation.SyntaxCollection.index(at:)
SyntaxCollection
. This computation is in O(n) andSyntaxCollection
is not subscriptable by an integer.Convenience initializer
ClosureCaptureSyntax.init()
ClosureCaptureSyntax
that takes a concretename
argument and automatically addsequal = TokenSyntax.equalToken()
to it.Convenience initializer
EnumCaseParameterSyntax.init()
EnumCaseParameterSyntax
that takes a concretefirstName
value and addscolon = TokenSyntax.colonToken()
automatically to it.DiagnosticSeverity
andPluginMessage.Diagnostic.Severity
now have new case namedremark
Deprecations
Leaf Node Casts
Same-Type Casts
is
,as
, andcast
overloads onSyntaxProtocol
with same-type conversions are marked as deprecated. The deprecated methods emit a warning indicating the cast will always succeed.Base Node Casts
is
,as
, andcast
methods on base node protocols with base-type conversions are marked as deprecated. The deprecated methods emit a warning that informs the developer that the cast will always succeed and should be done using the base node's initializer.WildcardPatternSyntax.typeAnnotation
typeAnnotation
onWildcardPatternSyntax
was a mistake. UsetypeAnnotation
properties on the outer constructs instead. E.g.PatternBindingListSyntax.typeAnnotation
API-Incompatible Changes
NoteMessage.fixItID
renamed tonoteID
fixItID
and should have been namednoteID
instead. Accesses tofixItID
are deprecated and forward tonoteID
. Any types that conformNoteMessage
it will need to be updated to provide anoteID
instead of afixItID
.DiagnosticSpec.highlight
replaced byhighlights
highlight
prevented users from asserting that a macro highlighted exactly the expected set of syntax nodes. Use ofDiagnosticSpec.init(...highlight:...)
is deprecated and forwards toDiagnosticSpec.init(...highlights:...)
. Migrating fromhighlight
tohighlights
is straightforward; any uses ofDiagnosticSpec.init
which do not specify ahighlight
do not need to change, otherwise:highlight
string should be replaced with a single element array containing the same string without any trailing trivia, e.g.,highlight: "let "
->highlights: ["let"]
.highlight
string should be replaced with an array containing an element for each highlighted node, e.g.,highlight: "struct {}"
->highlights: ["struct", "{}"]
.v510.0.2
Compare Source
Compared to 510.0.1 this release fixes compilation warnings about retroactive conformances when building swift-syntax with a Swift 6 compiler.
It also contains the following changes from 510.0.0.
New APIs
SyntaxStringInterpolation.appendInterpolation(_: (some SyntaxProtocol)?)
nil
, nothing will get added to the string interpolation.SyntaxCollection.index(at:)
SyntaxCollection
. This computation is in O(n) andSyntaxCollection
is not subscriptable by an integer.Convenience initializer
ClosureCaptureSyntax.init()
ClosureCaptureSyntax
that takes a concretename
argument and automatically addsequal = TokenSyntax.equalToken()
to it.Convenience initializer
EnumCaseParameterSyntax.init()
EnumCaseParameterSyntax
that takes a concretefirstName
value and addscolon = TokenSyntax.colonToken()
automatically to it.DiagnosticSeverity
andPluginMessage.Diagnostic.Severity
now have new case namedremark
Deprecations
Leaf Node Casts
Same-Type Casts
is
,as
, andcast
overloads onSyntaxProtocol
with same-type conversions are marked as deprecated. The deprecated methods emit a warning indicating the cast will always succeed.Base Node Casts
is
,as
, andcast
methods on base node protocols with base-type conversions are marked as deprecated. The deprecated methods emit a warning that informs the developer that the cast will always succeed and should be done using the base node's initializer.WildcardPatternSyntax.typeAnnotation
typeAnnotation
onWildcardPatternSyntax
was a mistake. UsetypeAnnotation
properties on the outer constructs instead. E.g.PatternBindingListSyntax.typeAnnotation
API-Incompatible Changes
NoteMessage.fixItID
renamed tonoteID
fixItID
and should have been namednoteID
instead. Accesses tofixItID
are deprecated and forward tonoteID
. Any types that conformNoteMessage
it will need to be updated to provide anoteID
instead of afixItID
.DiagnosticSpec.highlight
replaced byhighlights
highlight
prevented users from asserting that a macro highlighted exactly the expected set of syntax nodes. Use ofDiagnosticSpec.init(...highlight:...)
is deprecated and forwards toDiagnosticSpec.init(...highlights:...)
. Migrating fromhighlight
tohighlights
is straightforward; any uses ofDiagnosticSpec.init
which do not specify ahighlight
do not need to change, otherwise:highlight
string should be replaced with a single element array containing the same string without any trailing trivia, e.g.,highlight: "let "
->highlights: ["let"]
.highlight
string should be replaced with an array containing an element for each highlighted node, e.g.,highlight: "struct {}"
->highlights: ["struct", "{}"]
.v510.0.1
Compare Source
Compared to 510.0.0 this fixes a possible misaligned memory access.
It also contains the following changes from 510.0.0.
New APIs
SyntaxStringInterpolation.appendInterpolation(_: (some SyntaxProtocol)?)
nil
, nothing will get added to the string interpolation.SyntaxCollection.index(at:)
SyntaxCollection
. This computation is in O(n) andSyntaxCollection
is not subscriptable by an integer.Convenience initializer
ClosureCaptureSyntax.init()
ClosureCaptureSyntax
that takes a concretename
argument and automatically addsequal = TokenSyntax.equalToken()
to it.Convenience initializer
EnumCaseParameterSyntax.init()
EnumCaseParameterSyntax
that takes a concretefirstName
value and addscolon = TokenSyntax.colonToken()
automatically to it.DiagnosticSeverity
andPluginMessage.Diagnostic.Severity
now have new case namedremark
Deprecations
Leaf Node Casts
Same-Type Casts
is
,as
, andcast
overloads onSyntaxProtocol
with same-type conversions are marked as deprecated. The deprecated methods emit a warning indicating the cast will always succeed.Base Node Casts
is
,as
, andcast
methods on base node protocols with base-type conversions are marked as deprecated. The deprecated methods emit a warning that informs the developer that the cast will always succeed and should be done using the base node's initializer.WildcardPatternSyntax.typeAnnotation
typeAnnotation
onWildcardPatternSyntax
was a mistake. UsetypeAnnotation
properties on the outer constructs instead. E.g.PatternBindingListSyntax.typeAnnotation
API-Incompatible Changes
NoteMessage.fixItID
renamed tonoteID
fixItID
and should have been namednoteID
instead. Accesses tofixItID
are deprecated and forward tonoteID
. Any types that conformNoteMessage
it will need to be updated to provide anoteID
instead of afixItID
.DiagnosticSpec.highlight
replaced byhighlights
highlight
prevented users from asserting that a macro highlighted exactly the expected set of syntax nodes. Use ofDiagnosticSpec.init(...highlight:...)
is deprecated and forwards toDiagnosticSpec.init(...highlights:...)
. Migrating fromhighlight
tohighlights
is straightforward; any uses ofDiagnosticSpec.init
which do not specify ahighlight
do not need to change, otherwise:highlight
string should be replaced with a single element array containing the same string without any trailing trivia, e.g.,highlight: "let "
->highlights: ["let"]
.highlight
string should be replaced with an array containing an element for each highlighted node, e.g.,highlight: "struct {}"
->highlights: ["struct", "{}"]
.v510.0.0
Compare Source
New APIs
SyntaxStringInterpolation.appendInterpolation(_: (some SyntaxProtocol)?)
nil
, nothing will get added to the string interpolation.SyntaxCollection.index(at:)
SyntaxCollection
. This computation is in O(n) andSyntaxCollection
is not subscriptable by an integer.Convenience initializer
ClosureCaptureSyntax.init()
ClosureCaptureSyntax
that takes a concretename
argument and automatically addsequal = TokenSyntax.equalToken()
to it.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.