Skip to content

Commit

Permalink
Update for Swift 5.6 (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim authored Mar 15, 2022
1 parent cbb4b38 commit d355d20
Show file tree
Hide file tree
Showing 24 changed files with 37,754 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jazzy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
container:
image: norionomura/jazzy:0.13.6_swift-5.3.3
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: bundle install --path vendor/bundle
- run: swift build
- name: Generate documentation json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pod_lib_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
env:
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: bundle install --path vendor/bundle
- run: bundle exec pod repo update
- run: bundle exec pod lib lint --verbose
8 changes: 5 additions & 3 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ on:
jobs:
SwiftLint:
runs-on: ubuntu-latest
container:
image: ghcr.io/realm/swiftlint:0.46.5
steps:
- uses: actions/checkout@v2
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
- uses: actions/checkout@v3
- name: Run SwiftLint
run: swiftlint --strict
13 changes: 11 additions & 2 deletions .github/workflows/swiftpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: swift -version
- run: swift test

Expand All @@ -27,5 +27,14 @@ jobs:
container:
image: swift:${{ matrix.tag }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: swift test --parallel

# TODO: Move to official Swift Docker image when available
Linux_5_6:
runs-on: ubuntu-latest
container:
image: swiftlang/swift:nightly-5.6-focal
steps:
- uses: actions/checkout@v3
- run: swift test --parallel
2 changes: 1 addition & 1 deletion .github/workflows/xcodebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: xcodebuild -version
- run: xcodebuild -scheme sourcekitten -parallel-testing-enabled NO test -destination platform=macOS
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* Support docs generation on Swift 5.6.
[John Fairhurst](https://github.com/johnfairh)

* Added `SwiftDeclarationAttributeKind` values introduced in Swift 5.6.
[JP Simard](https://github.com/jpsim)

* Add `IN_PROCESS_SOURCEKIT` environment variable, which causes to use
the in-process version of sourcekitd on macOS. This avoids the use of
XPC, which is prohibited in some sandboxed environments, such as in
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ package: installables
release: package

docker_test:
docker run -v `pwd`:`pwd` -w `pwd` --name sourcekitten --rm swift:5.5 swift test --parallel
# TODO: Move to official Swift Docker image when available
docker run -v `pwd`:`pwd` -w `pwd` --name sourcekitten --rm swiftlang/swift:nightly-5.6-focal swift test --parallel

docker_htop:
docker run -it --rm --pid=container:sourcekitten terencewestphal/htop || reset
Expand Down
14 changes: 13 additions & 1 deletion Source/SourceKittenFramework/SwiftDeclarationAttributeKind.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public enum SwiftDeclarationAttributeKind: String, CaseIterable {
// Only available in Swift >= 5.4
case _specializeExtension = "source.decl.attribute._specializeExtension"
case actor = "source.decl.attribute.actor"
case actorIndepedent = "source.decl.attribute.actorIndependent"
case actorIndependent = "source.decl.attribute.actorIndependent"
case async = "source.decl.attribute.async"
case asyncHandler = "source.decl.attribute.asyncHandler"
case globalActor = "source.decl.attribute.globalActor"
Expand All @@ -149,4 +149,16 @@ public enum SwiftDeclarationAttributeKind: String, CaseIterable {
case _marker = "source.decl.attribute._marker"
case reasync = "source.decl.attribute.reasync"
case Sendable = "source.decl.attribute.Sendable"

// Only available in Swift >= 5.6
case distributed = "source.decl.attribute.distributed"
case _unavailableFromAsync = "source.decl.attribute._unavailableFromAsync"
case preconcurrency = "source.decl.attribute.preconcurrency"
case _assemblyVision = "source.decl.attribute._assemblyVision"
case _const = "source.decl.attribute._const"
case _typeSequence = "source.decl.attribute._typeSequence"
case _nonSendable = "source.decl.attribute._nonSendable"
case _noAllocation = "source.decl.attribute._noAllocation"
case _noImplicitCopy = "source.decl.attribute._noImplicitCopy"
case _noLocks = "source.decl.attribute._noLocks"
}
811 changes: 811 additions & 0 deletions Tests/SourceKittenFrameworkTests/Fixtures/[email protected]

Large diffs are not rendered by default.

Loading

0 comments on commit d355d20

Please sign in to comment.