You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SwiftLexicalLookup - A new Swift unqualified lookup library
Description: The library provides a new Swift unqualified lookup implementation detached from the compiler and accessible to outside clients. The query is stateless and can be directly run on swift-syntax syntax tree, with any syntax node functioning as an entry point. It produces an enum-based data structure as a result that partitions collected names based on the lexical scope of introduction.
Notes: The library follows the behavior of the compiler implementation with some minor differences, such as a different way of handling dollar identifiers $x and generic parameters inside extensions. Furthermore, in the future, once the compiler adopts SwiftLexicalLookup and it becomes the canonical implementation, results produced by the query will be guaranteed to be correct.
DiagnosticMessage has a new optional property, category, that provides a category name and documentation URL for a diagnostic.
Description: Tools often have many different diagnostics. Diagnostic categories allow tools to group several diagnostics together with documentation that can help users understand what the diagnostics mean and how to address them. This API allows diagnostics to provide this category information. The diagnostic renderer will provide the category at the end of the diagnostic message in the form [#CategoryName], and can print categories as "footnotes" with its categoryFootnotes method.
Migration steps: None required. The new category property has optional type, and there is a default implementation that returns nil. Types that conform to DiagnosticMessage can choose to implement this property and provide a category when appropriate.
DiagnosticsFormatter has a new method, formattedMessage, that formats a diagnostic message without any corresponding syntax node.
Description: Some tools want to use the diagnostics formatter to produce diagnostics that don't relate to source code, or for which the source code isn't available. This API allows them to do so while maintaining consistent presentation.
FixIt.Change has a new case replaceText that performs a textual replacement of a range of text with another string.
Description: The other FixIt.Change cases provide structured
modifications to syntax trees, such as replacing specific notes. Some
clients provide Fix-Its that don't fit well into this structured model. The replaceText case makes it possible for such clients to express Fix-Its.
ExpandEditorPlaceholdersToTrailingClosures has changed to ExpandEditorPlaceholdersToLiteralClosures
Description: Whether function-typed placeholders are expanded to trailing closures is now configurable using a format argument to this rewriter. Additionally clients that support nested placeholders may request that the entire expanded closure be wrapped in an outer placeholder, e.g. <#{ <#foo#> in <#Bar#> }#>.
Migration steps: Replace uses of ExpandEditorPlaceholdersToTrailingClosures with ExpandEditorPlaceholdersToLiteralClosures. The initializer does not need to change: .init(indentationWidth:) on the new type provides the same behavior as the old type.
Notes: This improves code completion in a SourceKitLSP session where the trailing closure form may be undesirable. The nested placeholders offer more flexibility to end users, in editors that support it.
SyntaxArena and ParsingSyntaxArena has changed to SPI
Description: SyntaxArena and the subclasses were only meant to be used when dealing with RawSyntax which is also SPI.
Migration steps: Do not use SyntaxArena or ParsingSyntaxArena directly.
Notes: Although the type itself was public, most initializers were already SPI and there was no way to retrive them from existing types via public API.
SyntaxChildrenIndex is no longer ExpressibleByNilLiteral
Description: nil used to represent the end index. However, due to a change in the internal structure, the end index must now be retrieved from the collection.
Migration steps: Use SyntaxChildren.endIndex instead.
Notes: ExpressibleByNilLiteral was a mistake. In general, Collection.Index should only be created and managed by the collection itself. For example, Collection.index(after:) exists, but Index.advanced(by:) does not.
Some cases in AttributeSyntax.Arguments choices and related types has been removed
Description: Some attributes that used to have special attribute list syntax are now parsed as a regular AttributeSyntax with .argumentList(LabeledExprListSyntax).
Migration steps: Use AttributeSyntax.Arguments.argumentList(LabeledExprListSyntax) instead.
Notes: Removed cases from AttributeSyntax.Arguments: token(TokenSyntax), string(StringLiteralExprSyntax), conventionArguments(ConventionAttributeArgumentsSyntax), conventionWitnessMethodArguments(ConventionWitnessMethodAttributeArgumentsSyntax), opaqueReturnTypeOfAttributeArguments(OpaqueReturnTypeOfAttributeArgumentsSyntax), exposeAttributeArguments(ExposeAttributeArgumentsSyntax), underscorePrivateAttributeArguments(UnderscorePrivateAttributeArgumentsSyntax), and unavailableFromAsyncArguments(UnavailableFromAsyncAttributeArgumentsSyntax). Removed Syntax kinds: ConventionAttributeArgumentsSyntax, ConventionWitnessMethodAttributeArgumentsSyntax, OpaqueReturnTypeOfAttributeArgumentsSyntax, ExposeAttributeArgumentsSyntax, UnderscorePrivateAttributeArgumentsSyntax, and UnavailableFromAsyncAttributeArgumentsSyntax.
ExpandEditorPlaceholdersToLiteralClosures & CallToTrailingClosures now take a Syntax parameter
Description: These refactorings now take an arbitrary Syntax and return a Syntax?. If a non-function-like syntax node is passed, nil is returned. The previous FunctionCallExprSyntax overloads are deprecated.
Comparing renovate/swiftlang-swift-syntax-602.x to main
🔀 1 Modification
Package.swift
.dependencies
🔀 Modified
// From
.package(url:"https://github.com/swiftlang/swift-syntax","601.0.1"..<"602.0.0")
// To
.package(url:"https://github.com/swiftlang/swift-syntax","602.0.0"..<"603.0.0")
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.
Uh oh!
There was an error while loading. Please reload this page.
Note
Mend has cancelled the proposed renaming of the Renovate GitHub app being renamed to
mend[bot]
.This notice will be removed on 2025年10月07日.
This PR contains the following updates:
from: "601.0.1"
->from: "602.0.0"
Release Notes
swiftlang/swift-syntax (swiftlang/swift-syntax)
v602.0.0
Compare Source
New APIs
SwiftLexicalLookup
- A new Swift unqualified lookup library$x
and generic parameters inside extensions. Furthermore, in the future, once the compiler adoptsSwiftLexicalLookup
and it becomes the canonical implementation, results produced by the query will be guaranteed to be correct.DiagnosticMessage
has a new optional property,category
, that provides a category name and documentation URL for a diagnostic.[#CategoryName]
, and can print categories as "footnotes" with itscategoryFootnotes
method.category
property has optional type, and there is a default implementation that returnsnil
. Types that conform toDiagnosticMessage
can choose to implement this property and provide a category when appropriate.DiagnosticsFormatter
has a new method,formattedMessage
, that formats a diagnostic message without any corresponding syntax node.FixIt.Change
has a new casereplaceText
that performs a textual replacement of a range of text with another string.FixIt.Change
cases provide structuredmodifications to syntax trees, such as replacing specific notes. Some
clients provide Fix-Its that don't fit well into this structured model. The
replaceText
case makes it possible for such clients to express Fix-Its.API Behavior Changes
Deprecations
API-Incompatible Changes
ExpandEditorPlaceholdersToTrailingClosures
has changed toExpandEditorPlaceholdersToLiteralClosures
format
argument to this rewriter. Additionally clients that support nested placeholders may request that the entire expanded closure be wrapped in an outer placeholder, e.g.<#{ <#foo#> in <#Bar#> }#>
.ExpandEditorPlaceholdersToTrailingClosures
withExpandEditorPlaceholdersToLiteralClosures
. The initializer does not need to change:.init(indentationWidth:)
on the new type provides the same behavior as the old type.SyntaxArena
andParsingSyntaxArena
has changed to SPISyntaxArena
and the subclasses were only meant to be used when dealing withRawSyntax
which is also SPI.SyntaxArena
orParsingSyntaxArena
directly.public
, most initializers were already SPI and there was no way to retrive them from existing types via public API.SyntaxChildrenIndex
is no longerExpressibleByNilLiteral
nil
used to represent the end index. However, due to a change in the internal structure, the end index must now be retrieved from the collection.SyntaxChildren.endIndex
instead.ExpressibleByNilLiteral
was a mistake. In general,Collection.Index
should only be created and managed by the collection itself. For example,Collection.index(after:)
exists, butIndex.advanced(by:)
does not.Some cases in
AttributeSyntax.Arguments
choices and related types has been removedAttributeSyntax
with.argumentList(LabeledExprListSyntax)
.AttributeSyntax.Arguments.argumentList(LabeledExprListSyntax)
instead.AttributeSyntax.Arguments
:token(TokenSyntax)
,string(StringLiteralExprSyntax)
,conventionArguments(ConventionAttributeArgumentsSyntax)
,conventionWitnessMethodArguments(ConventionWitnessMethodAttributeArgumentsSyntax)
,opaqueReturnTypeOfAttributeArguments(OpaqueReturnTypeOfAttributeArgumentsSyntax)
,exposeAttributeArguments(ExposeAttributeArgumentsSyntax)
,underscorePrivateAttributeArguments(UnderscorePrivateAttributeArgumentsSyntax)
, andunavailableFromAsyncArguments(UnavailableFromAsyncAttributeArgumentsSyntax)
. Removed Syntax kinds:ConventionAttributeArgumentsSyntax
,ConventionWitnessMethodAttributeArgumentsSyntax
,OpaqueReturnTypeOfAttributeArgumentsSyntax
,ExposeAttributeArgumentsSyntax
,UnderscorePrivateAttributeArgumentsSyntax
, andUnavailableFromAsyncAttributeArgumentsSyntax
.ExpandEditorPlaceholdersToLiteralClosures
&CallToTrailingClosures
now take aSyntax
parameterSyntax
and return aSyntax?
. If a non-function-like syntax node is passed,nil
is returned. The previousFunctionCallExprSyntax
overloads are deprecated.Syntax(...)
initializer call for the argument, and cast the result with.as(...)
if necessary.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 is behind base branch, 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.