This repository was archived by the owner on Apr 23, 2026. It is now read-only.
Update swift-syntax to 603.0.1 and simplify core code#25
Merged
Conversation
SwiftAstGen Regression ReportPR: #25 alamofire (Alamofire/Alamofire@5.9.1)
35 AST diffs# Alamofire.swift.json [3 added, 7 changed]
--- out-base/Alamofire.swift.json
+++ out-pr/Alamofire.swift.json
@@ -276,10 +276,26 @@
{
"children": [
{
- "children": [],
+ "children": [
+ {
+ "children": [],
+ "index": -1,
+ "name": "baseName",
+ "nodeType": "",
+ "range": {
+ "endColumn": 14,
+ "endLine": 27,
+ "endOffset": 1249,
+ "startColumn": 5,
+ "startLine": 27,
+ "startOffset": 1240
+ },
+ "tokenKind": "identifier(\"canImport\")"
+ }
+ ],
"index": -1,
- "name": "canImportKeyword",
- "nodeType": "",
+ "name": "calledExpression",
+ "nodeType": "DeclReferenceExprSyntax",
"range": {
"endColumn": 14,
"endLine": 27,
@@ -288,7 +304,7 @@
"startLine": 27,
"startOffset": 1240
},
- "tokenKind": "keyword(SwiftSyntax.Keyword.canImport)"
+ "tokenKind": ""
},
{
"children": [],
@@ -306,10 +322,58 @@
"tokenKind": "leftParen"
},
{
- "children": [],
+ "children": [
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "children": [],
+ "index": -1,
+ "name": "baseName",
+ "nodeType": "",
+ "range": {
+ "endColumn": 35,
+ "endLine": 27,
+ "endOffset": 1270,
+ "startColumn": 15,
+ "startLine": 27,
+ "startOffset": 1250
+ },
+ "tokenKind": "identifier(\"FoundationNetworking\")"
+ }
+ ],
+ "index": -1,
+ "name": "expression",
+ "nodeType": "DeclReferenceExprSyntax",
+ "range": {
+ "endColumn": 35,
+ "endLine": 27,
+ "endOffset": 1270,
+ "startColumn": 15,
+ "startLine": 27,
+ "startOffset": 1250
+ },
+ "tokenKind": ""
+ }
+ ],
+ "index": 0,
+ "name": "",
+ "nodeType": "LabeledExprSyntax",
+ "range": {
+ "endColumn": 35,
+ "endLine": 27,
+ "endOffset": 1270,
+ "startColumn": 15,
+ "startLine": 27,
+ "startOffset": 1250
+ },
+ "tokenKind": ""
+ }
+ ],
"index": -1,
- "name": "importPath",
- "nodeType": "",
+ "name": "arguments",
+ "nodeType": "LabeledExprListSyntax",
"range": {
"endColumn": 35,
"endLine": 27,
@@ -318,7 +382,7 @@
"startLine": 27,
"startOffset": 1250
},
- "tokenKind": "identifier(\"FoundationNetworking\")"
+ "tokenKind": ""
},
{
"children": [],
@@ -334,11 +398,26 @@
"startOffset": 1270
},
"tokenKind": "rightParen"
+ },
+ {
+ "children": [],
+ "index": -1,
+ "name": "additionalTrailingClosures",
+ "nodeType": "MultipleTrailingClosureElementListSyntax",
+ "range": {
+ "endColumn": 36,
+ "endLine": 27,
+ "endOffset": 1271,
+ "startColumn": 36,
+ "startLine": 27,
+ "startOffset": 1271
+ },
+ "tokenKind": ""
}
],
"index": -1,
"name": "condition",
- "nodeType": "CanImportExprSyntax",
+ "nodeType": "FunctionCallExprSyntax",
"range": {
"endColumn": 36,
"endLine": 27,
# Core/AFError.swift.json [35 added, 8 removed, 99 changed]
--- out-base/Core/AFError.swift.json
+++ out-pr/Core/AFError.swift.json
@@ -152,10 +152,26 @@
{
"children": [
{
- "children": [],
+ "children": [
+ {
+ "children": [],
+ "index": -1,
+ "name": "baseName",
+ "nodeType": "",
+ "range": {
+ "endColumn": 14,
+ "endLine": 27,
+ "endOffset": 1232,
+ "startColumn": 5,
+ "startLine": 27,
+ "startOffset": 1223
+ },
+ "tokenKind": "identifier(\"canImport\")"
+ }
+ ],
"index": -1,
- "name": "canImportKeyword",
- "nodeType": "",
+ "name": "calledExpression",
+ "nodeType": "DeclReferenceExprSyntax",
"range": {
"endColumn": 14,
"endLine": 27,
@@ -164,7 +180,7 @@
"startLine": 27,
"startOffset": 1223
},
- "tokenKind": "keyword(SwiftSyntax.Keyword.canImport)"
+ "tokenKind": ""
},
{
"children": [],
@@ -182,10 +198,58 @@
"tokenKind": "leftParen"
},
{
- "children": [],
+ "children": [
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "children": [],
+ "index": -1,
+ "name": "baseName",
+ "nodeType": "",
+ "range": {
+ "endColumn": 23,
+ "endLine": 27,
+ "endOffset": 1241,
... (truncated)
... (33 more files not shown)vapor (vapor/vapor@4.99.3)
106 AST diffs# Application.swift.json [11 added, 4 removed, 39 changed]
--- out-base/Application.swift.json
+++ out-pr/Application.swift.json
@@ -32242,10 +32242,26 @@
"tokenKind": "keyword(SwiftSyntax.Keyword.async)"
},
{
- "children": [],
+ "children": [
+ {
+ "children": [],
+ "index": -1,
+ "name": "throwsSpecifier",
+ "nodeType": "",
+ "range": {
+ "endColumn": 147,
+ "endLine": 162,
+ "endOffset": 5383,
+ "startColumn": 141,
+ "startLine": 162,
+ "startOffset": 5377
+ },
+ "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ }
+ ],
"index": -1,
- "name": "throwsSpecifier",
- "nodeType": "",
+ "name": "throwsClause",
+ "nodeType": "ThrowsClauseSyntax",
"range": {
"endColumn": 147,
"endLine": 162,
@@ -32254,7 +32270,7 @@
"startLine": 162,
"startOffset": 5377
},
- "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ "tokenKind": ""
}
],
"index": -1,
@@ -34176,10 +34192,26 @@
{
"children": [
{
- "children": [],
+ "children": [
+ {
+ "children": [],
+ "index": -1,
+ "name": "throwsSpecifier",
+ "nodeType": "",
+ "range": {
+ "endColumn": 29,
+ "endLine": 176,
+ "endOffset": 6169,
+ "startColumn": 23,
+ "startLine": 176,
+ "startOffset": 6163
+ },
+ "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ }
+ ],
"index": -1,
- "name": "throwsSpecifier",
- "nodeType": "",
+ "name": "throwsClause",
+ "nodeType": "ThrowsClauseSyntax",
"range": {
"endColumn": 29,
"endLine": 176,
@@ -34188,7 +34220,7 @@
"startLine": 176,
"startOffset": 6163
},
- "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ "tokenKind": ""
}
],
"index": -1,
@@ -35708,10 +35740,26 @@
"tokenKind": "keyword(SwiftSyntax.Keyword.async)"
},
{
- "children": [],
+ "children": [
+ {
+ "children": [],
+ "index": -1,
+ "name": "throwsSpecifier",
+ "nodeType": "",
+ "range": {
+ "endColumn": 39,
+ "endLine": 191,
+ "endOffset": 6791,
+ "startColumn": 33,
+ "startLine": 191,
+ "startOffset": 6785
+ },
+ "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ }
+ ],
"index": -1,
- "name": "throwsSpecifier",
- "nodeType": "",
+ "name": "throwsClause",
+ "nodeType": "ThrowsClauseSyntax",
"range": {
"endColumn": 39,
"endLine": 191,
@@ -35720,7 +35768,7 @@
"startLine": 191,
"startOffset": 6785
},
- "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ "tokenKind": ""
}
],
"index": -1,
@@ -37643,10 +37691,26 @@
{
"children": [
{
- "children": [],
+ "children": [
+ {
+ "children": [],
+ "index": -1,
+ "name": "throwsSpecifier",
+ "nodeType": "",
+ "range": {
+ "endColumn": 31,
+ "endLine": 210,
+ "endOffset": 7688,
+ "startColumn": 25,
+ "startLine": 210,
+ "startOffset": 7682
+ },
+ "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ }
+ ],
"index": -1,
- "name": "throwsSpecifier",
- "nodeType": "",
+ "name": "throwsClause",
+ "nodeType": "ThrowsClauseSyntax",
"range": {
"endColumn": 31,
"endLine": 210,
@@ -37655,7 +37719,7 @@
"startLine": 210,
"startOffset": 7682
},
- "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ "tokenKind": ""
}
],
"index": -1,
@@ -38785,10 +38849,26 @@
"tokenKind": "keyword(SwiftSyntax.Keyword.async)"
},
{
- "children": [],
+ "children": [
+ {
+ "children": [],
+ "index": -1,
+ "name": "throwsSpecifier",
+ "nodeType": "",
+ "range": {
+ "endColumn": 39,
+ "endLine": 220,
+ "endOffset": 8340,
+ "startColumn": 33,
+ "startLine": 220,
+ "startOffset": 8334
+ },
+ "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ }
+ ],
"index": -1,
- "name": "throwsSpecifier",
- "nodeType": "",
+ "name": "throwsClause",
+ "nodeType": "ThrowsClauseSyntax",
"range": {
"endColumn": 39,
"endLine": 220,
@@ -38797,7 +38877,7 @@
"startLine": 220,
"startOffset": 8334
},
- "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ "tokenKind": ""
}
],
"index": -1,
@@ -42438,10 +42518,26 @@
{
"children": [
... (truncated)
... (105 more files not shown)rxswift (ReactiveX/RxSwift@6.7.1)
70 AST diffs# AnyObserver.swift.json [8 added, 6 removed, 36 changed]
--- out-base/AnyObserver.swift.json
+++ out-pr/AnyObserver.swift.json
@@ -1155,6 +1155,21 @@
{
"children": [
{
+ "children": [],
+ "index": -1,
+ "name": "specifiers",
+ "nodeType": "TypeSpecifierListSyntax",
+ "range": {
+ "endColumn": 31,
+ "endLine": 21,
+ "endOffset": 715,
+ "startColumn": 31,
+ "startLine": 21,
+ "startOffset": 715
+ },
+ "tokenKind": ""
+ },
+ {
"children": [
{
"children": [
@@ -1229,6 +1244,21 @@
"startColumn": 31,
"startLine": 21,
"startOffset": 715
+ },
+ "tokenKind": ""
+ },
+ {
+ "children": [],
+ "index": -1,
+ "name": "lateSpecifiers",
+ "nodeType": "TypeSpecifierListSyntax",
+ "range": {
+ "endColumn": 41,
+ "endLine": 21,
+ "endOffset": 725,
+ "startColumn": 41,
+ "startLine": 21,
+ "startOffset": 725
},
"tokenKind": ""
},
@@ -5572,6 +5602,21 @@
{
"children": [
{
+ "children": [],
+ "index": -1,
+ "name": "specifiers",
+ "nodeType": "TypeSpecifierListSyntax",
+ "range": {
+ "endColumn": 50,
+ "endLine": 64,
+ "endOffset": 2053,
+ "startColumn": 50,
+ "startLine": 64,
+ "startOffset": 2053
+ },
+ "tokenKind": ""
+ },
+ {
"children": [
{
"children": [
@@ -5646,6 +5691,21 @@
"startColumn": 50,
"startLine": 64,
"startOffset": 2053
+ },
+ "tokenKind": ""
+ },
+ {
+ "children": [],
+ "index": -1,
+ "name": "lateSpecifiers",
+ "nodeType": "TypeSpecifierListSyntax",
+ "range": {
+ "endColumn": 60,
+ "endLine": 64,
+ "endOffset": 2063,
+ "startColumn": 60,
+ "startLine": 64,
+ "startOffset": 2063
},
"tokenKind": ""
},
@@ -5747,10 +5807,26 @@
{
"children": [
{
- "children": [],
+ "children": [
+ {
+ "children": [],
+ "index": -1,
+ "name": "throwsSpecifier",
+ "nodeType": "",
+ "range": {
+ "endColumn": 75,
+ "endLine": 64,
+ "endOffset": 2078,
+ "startColumn": 69,
+ "startLine": 64,
+ "startOffset": 2072
+ },
+ "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ }
+ ],
"index": -1,
- "name": "throwsSpecifier",
- "nodeType": "",
+ "name": "throwsClause",
+ "nodeType": "ThrowsClauseSyntax",
"range": {
"endColumn": 75,
"endLine": 64,
@@ -5759,7 +5835,7 @@
"startLine": 64,
"startOffset": 2072
},
- "tokenKind": "keyword(SwiftSyntax.Keyword.throws)"
+ "tokenKind": ""
}
],
"index": -1,
# Binder.swift.json [4 added, 4 removed, 18 changed]
--- out-base/Binder.swift.json
+++ out-pr/Binder.swift.json
@@ -1706,6 +1706,21 @@
{
"children": [
{
+ "children": [],
+ "index": -1,
+ "name": "specifiers",
+ "nodeType": "TypeSpecifierListSyntax",
+ "range": {
+ "endColumn": 116,
+ "endLine": 28,
+ "endOffset": 951,
+ "startColumn": 116,
+ "startLine": 28,
+ "startOffset": 951
+ },
+ "tokenKind": ""
+ },
+ {
"children": [
{
"children": [
@@ -1780,6 +1795,21 @@
"startColumn": 116,
"startLine": 28,
"startOffset": 951
+ },
+ "tokenKind": ""
+ },
+ {
+ "children": [],
+ "index": -1,
+ "name": "lateSpecifiers",
+ "nodeType": "TypeSpecifierListSyntax",
+ "range": {
+ "endColumn": 126,
+ "endLine": 28,
+ "endOffset": 961,
+ "startColumn": 126,
+ "startLine": 28,
+ "startOffset": 961
},
"tokenKind": ""
},
# Concurrency/Lock.swift.json [1 added, 2 changed]
--- out-base/Concurrency/Lock.swift.json
+++ out-pr/Concurrency/Lock.swift.json
@@ -911,10 +911,58 @@
"tokenKind": "leftParen"
},
{
- "children": [],
+ "children": [
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "children": [],
+ "index": -1,
+ "name": "baseName",
+ "nodeType": "",
+ "range": {
+ "endColumn": 21,
+ "endLine": 18,
+ "endOffset": 362,
+ "startColumn": 13,
+ "startLine": 18,
+ "startOffset": 354
+ },
... (truncated)
... (67 more files not shown)📎 Full diff files available as workflow artifacts. |
4118195 to
5bdaf60
Compare
Bumps the vendored swift-syntax parser infrastructure and cleans up the non-vendored code in the process. Dependency updates - 510.0.1 → 603.0.1 (Swift 6.1 parser, now hosted under swiftlang/) - swift-argument-parser: 1.2.0 → 1.7.1 - Regenerated Sources/CodeGeneration/SyntaxSupport/* to match the new upstream node metadata Code cleanup SwiftAstGenerator - var stored properties → let; hardcoded ignore substrings extracted to a static let - ignorePathsFromPackageSwift lowercased once in init instead of per-file - Renamed ignoreDirectory(name:) → shouldIgnore(path:) (it's called with file paths, not directories) - Dropped the idempotent fileExists pre-check before createDirectory(withIntermediateDirectories: true) - parseFile receives the already-computed relativeFilePath instead of recomputing it SyntaxParser - Return Data directly from parse(...) instead of round-tripping through String (JSONEncoder output is already UTF-8) - Fixed a stale countLines comment that referenced CharacterSet.newlines while the code uses Character.isNewline ScalaAstGenerator - Removed the throwing init() that deleted + recreated an empty output file before generate() atomically overwrote it anyway - Collapsed the inheritsFrom if/else into a single joined call - Pinned the generated // Generated: header to en_US_POSIX with an explicit format. No more locale-dependent output or narrow no-break spaces (U+202F) on recent OSes - swift run SwiftAstGen --scalaAstOnly produces byte-identical output across repeated runs TreeNode - Renamed Range → SourceRange to stop shadowing Swift.Range TestUtils + PackageTestTargetParserTests - loadJson now reads Data directly instead of Data → String → Data - temporaryFileURL return type is non-optional (it never returned nil) - createFile no longer pre-checks for directory existence; withCode no longer creates an empty file before writing to it - PackageTestTargetParserTests conforms to TestUtils and drops its local duplicates of createTemporaryDirectory / cleanup / createFile
5bdaf60 to
7925186
Compare
max-leuthaeuser
added a commit
to joernio/joern
that referenced
this pull request
Apr 22, 2026
For the internal swiftastgen changes see: joernio/SwiftAstGen#25
max-leuthaeuser
added a commit
to joernio/joern
that referenced
this pull request
Apr 22, 2026
For the internal swiftastgen changes see: joernio/SwiftAstGen#25
max-leuthaeuser
added a commit
to joernio/joern
that referenced
this pull request
Apr 22, 2026
For the internal swiftastgen changes see: joernio/SwiftAstGen#25
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Bumps the vendored swift-syntax parser infrastructure and cleans up the non-vendored code in the process.
Dependency updates
Code cleanup
SwiftAstGenerator
SyntaxParser
ScalaAstGenerator
TreeNode
TestUtils + PackageTestTargetParserTests