Update SwiftSyntax & internal parser for Swift 5.7 (#4203)

Require Swift 5.7 to compile
This commit is contained in:
JP Simard 2022-09-26 10:11:39 -04:00 committed by GitHub
parent c6eec8072c
commit fd7afedfcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 23 deletions

View File

@ -2,6 +2,9 @@
#### Breaking
* SwiftLint now requires Swift 5.7 or higher to build.
[JP Simard](https://github.com/jpsim)
* Exclude `weak_delegate` rule from autocorrection due to behavioral changes
leading to potential undefined behavior or bugs.
[SimplyDanny](https://github.com/SimplyDanny)
@ -75,6 +78,10 @@
[SimplyDanny](https://github.com/SimplyDanny)
[#4202](https://github.com/realm/SwiftLint/issues/4202)
* SwiftSyntax libraries were updated to their 5.7 releases, improving how newer
Swift language features are handled.
[JP Simard](https://github.com/jpims)
#### Bug Fixes
* Respect `validates_start_with_lowercase` option when linting function names.

View File

@ -24,8 +24,8 @@
"repositoryURL": "https://github.com/apple/swift-argument-parser.git",
"state": {
"branch": null,
"revision": "df9ee6676cd5b3bf5b330ec7568a5644f547201b",
"version": "1.1.3"
"revision": "9f39744e025c7d377987f30b03770805dcb0bcd1",
"version": "1.1.4"
}
},
{
@ -33,8 +33,8 @@
"repositoryURL": "https://github.com/apple/swift-syntax.git",
"state": {
"branch": null,
"revision": "0b6c22b97f8e9320bca62e82cdbee601cf37ad3f",
"version": "0.50600.1"
"revision": "04d4497be6b88e524a71778d828790e9589ae1c4",
"version": "0.50700.0"
}
},
{

View File

@ -28,7 +28,7 @@ let package = Package(
],
dependencies: [
.package(name: "swift-argument-parser", url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.1.3")),
.package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .exact("0.50600.1")),
.package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .exact("0.50700.0")),
.package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.33.0"),
.package(url: "https://github.com/jpsim/Yams.git", from: "5.0.1"),
.package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", from: "0.9.0"),
@ -63,7 +63,7 @@ let package = Package(
),
] + (staticSwiftSyntax ? [.binaryTarget(
name: "lib_InternalSwiftSyntaxParser",
url: "https://github.com/keith/StaticInternalSwiftSyntaxParser/releases/download/5.6/lib_InternalSwiftSyntaxParser.xcframework.zip",
checksum: "88d748f76ec45880a8250438bd68e5d6ba716c8042f520998a438db87083ae9d"
url: "https://github.com/keith/StaticInternalSwiftSyntaxParser/releases/download/5.7/lib_InternalSwiftSyntaxParser.xcframework.zip",
checksum: "99803975d10b2664fc37cc223a39b4e37fe3c79d3d6a2c44432007206d49db15"
)] : [])
)

View File

@ -19,8 +19,8 @@ jobs:
strategy:
maxParallel: 10
matrix:
swift56:
containerImage: swift:5.6
swift57:
containerImage: swift:5.7
container: $[ variables['containerImage'] ]
steps:
- script: swift test --parallel -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
@ -32,8 +32,8 @@ jobs:
strategy:
maxParallel: 10
matrix:
xcode1341:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app
xcode14:
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
steps:
- script: |
sw_vers
@ -48,8 +48,8 @@ jobs:
strategy:
maxParallel: 10
matrix:
xcode1341:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app
xcode14:
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
steps:
- script: |
sw_vers
@ -57,11 +57,11 @@ jobs:
displayName: Version Informations
- script: swift test --parallel --enable-code-coverage -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
displayName: swift test
- script: |
xcrun llvm-cov export -format="lcov" .build/debug/SwiftLintPackageTests.xctest/Contents/MacOS/SwiftLintPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
bash <(curl -s https://codecov.io/bash)
displayName: Upload code coverage
condition: eq(variables['DEVELOPER_DIR'], '/Applications/Xcode_13.2.1.app')
# - script: |
# xcrun llvm-cov export -format="lcov" .build/debug/SwiftLintPackageTests.xctest/Contents/MacOS/SwiftLintPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
# bash <(curl -s https://codecov.io/bash)
# displayName: Upload code coverage
# condition: eq(variables['DEVELOPER_DIR'], '/Applications/Xcode_14.0.1.app')
- job: CocoaPods
pool:
@ -80,7 +80,7 @@ jobs:
pool:
vmImage: 'macOS-12'
variables:
DEVELOPER_DIR: /Applications/Xcode_13.3.1.app
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
steps:
- script: |
curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.12.2/bazelisk-darwin-amd64 -o bazelisk
@ -101,7 +101,7 @@ jobs:
pool:
vmImage: 'macOS-12'
variables:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
steps:
- script: swift run swiftlint generate-docs
displayName: Run swiftlint generate-docs

View File

@ -19,9 +19,9 @@ def swiftlint_repos():
http_archive(
name = "com_github_keith_swift_syntax_bazel",
sha256 = "f83b8449f84e29d263d2b0ceb9d2ae7f88c9f2a81f4b10035e94073664507507",
strip_prefix = "swift-syntax-bazel-13.3.13E113",
url = "https://github.com/keith/swift-syntax-bazel/archive/refs/tags/13.3.13E113.tar.gz",
sha256 = "ca7f3a8099e4e7a454f45abea1ededabe209d9f6964df87566a142e3b281fe24",
strip_prefix = "swift-syntax-bazel-14.0.0.14A309",
url = "https://github.com/keith/swift-syntax-bazel/archive/refs/tags/14.0.0.14A309.tar.gz",
)
http_archive(