Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Swift 5.7 to build #752

Merged
merged 7 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
MacOS:
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app
DEVELOPER_DIR: /Applications/Xcode_14.1.app
steps:
- uses: actions/checkout@v2
- run: bazelisk test //Tests:UnitTests --test_env=PROJECT_ROOT=$(bazelisk info workspace)
- run: bazelisk build sourcekitten
Linux:
strategy:
matrix:
tag: ['5.6-focal']
tag: ['5.7-focal']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
SwiftLint:
runs-on: ubuntu-latest
container:
image: ghcr.io/realm/swiftlint:0.48.0
image: ghcr.io/realm/swiftlint:0.50.0
steps:
- uses: actions/checkout@v3
- name: Run SwiftLint
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/swiftpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
Xcode:
strategy:
matrix:
xcode_version: ['13.3', '13.4.1']
xcode_version: ['14.1']
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
Expand All @@ -23,7 +23,7 @@ jobs:
Linux:
strategy:
matrix:
tag: ['5.6']
tag: ['5.7']
runs-on: ubuntu-latest
container:
image: swift:${{ matrix.tag }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/xcodebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
Xcode:
strategy:
matrix:
xcode_version: ['13.3', '13.4.1']
xcode_version: ['14.1']
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
Expand Down
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ disabled_rules:
- todo

line_length: 160
large_tuple: 4
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## Main

##### Breaking

* SourceKitten now requires Swift 5.7 or higher to build.
[JP Simard](https://github.com/jpsim)

##### Enhancements

* None.

##### Bug Fixes

* None.

## 0.33.1

##### Breaking
Expand Down
60 changes: 29 additions & 31 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
{
"object": {
"pins": [
{
"package": "swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser.git",
"state": {
"branch": null,
"revision": "df9ee6676cd5b3bf5b330ec7568a5644f547201b",
"version": "1.1.3"
}
},
{
"package": "SWXMLHash",
"repositoryURL": "https://github.com/drmohundro/SWXMLHash.git",
"state": {
"branch": null,
"revision": "4d0f62f561458cbe1f732171e625f03195151b60",
"version": "7.0.1"
}
},
{
"package": "Yams",
"repositoryURL": "https://github.com/jpsim/Yams.git",
"state": {
"branch": null,
"revision": "01835dc202670b5bb90d07f3eae41867e9ed29f6",
"version": "5.0.1"
}
"pins" : [
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser.git",
"state" : {
"revision" : "fddd1c00396eed152c45a46bea9f47b98e59301d",
"version" : "1.2.0"
}
]
},
"version": 1
},
{
"identity" : "swxmlhash",
"kind" : "remoteSourceControl",
"location" : "https://github.com/drmohundro/SWXMLHash.git",
"state" : {
"revision" : "4d0f62f561458cbe1f732171e625f03195151b60",
"version" : "7.0.1"
}
},
{
"identity" : "yams",
"kind" : "remoteSourceControl",
"location" : "https://github.com/jpsim/Yams.git",
"state" : {
"revision" : "01835dc202670b5bb90d07f3eae41867e9ed29f6",
"version" : "5.0.1"
}
}
],
"version" : 2
}
8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.5
// swift-tools-version:5.7
import PackageDescription

let package = Package(
Expand All @@ -9,9 +9,9 @@ let package = Package(
.library(name: "SourceKittenFramework", targets: ["SourceKittenFramework"])
],
dependencies: [
.package(name: "swift-argument-parser", url: "https://github.com/apple/swift-argument-parser.git", from: "1.1.3"),
.package(name: "SWXMLHash", url: "https://github.com/drmohundro/SWXMLHash.git", .upToNextMinor(from: "7.0.1")),
.package(name: "Yams", url: "https://github.com/jpsim/Yams.git", from: "5.0.1"),
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.2.0")),
.package(url: "https://github.com/drmohundro/SWXMLHash.git", .upToNextMinor(from: "7.0.1")),
.package(url: "https://github.com/jpsim/Yams.git", from: "5.0.1"),
],
targets: [
.executableTarget(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,12 @@ public enum SwiftDeclarationAttributeKind: String, CaseIterable {
case _noAllocation = "source.decl.attribute._noAllocation"
case _noImplicitCopy = "source.decl.attribute._noImplicitCopy"
case _noLocks = "source.decl.attribute._noLocks"

// Only available in Swift >= 5.7

case _local = "source.decl.attribute._local"
case _backDeploy = "source.decl.attribute._backDeploy"
case exclusivity = "source.decl.attribute.exclusivity"
case _unsafeInheritExecutor = "source.decl.attribute._unsafeInheritExecutor"
case _compilerInitialized = "source.decl.attribute._compilerInitialized"
}
8 changes: 5 additions & 3 deletions Source/SourceKittenFramework/SwiftDeclarationKind.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public enum SwiftDeclarationKind: String, CaseIterable {
case functionAccessorDidset = "source.lang.swift.decl.function.accessor.didset"
/// `function.accessor.getter`.
case functionAccessorGetter = "source.lang.swift.decl.function.accessor.getter"
/// `function.accessor.modify`
// `function.accessor.modify`
// @available(swift, introduced: 5.0)
case functionAccessorModify = "source.lang.swift.decl.function.accessor.modify"
/// `function.accessor.mutableaddress`.
case functionAccessorMutableaddress = "source.lang.swift.decl.function.accessor.mutableaddress"
/// `function.accessor.read`
// `function.accessor.read`
// @available(swift, introduced: 5.0)
case functionAccessorRead = "source.lang.swift.decl.function.accessor.read"
/// `function.accessor.setter`.
Expand All @@ -51,7 +51,7 @@ public enum SwiftDeclarationKind: String, CaseIterable {
case functionMethodInstance = "source.lang.swift.decl.function.method.instance"
/// `function.method.static`.
case functionMethodStatic = "source.lang.swift.decl.function.method.static"
/// `function.operator`.
// `function.operator`.
// @available(swift, obsoleted: 2.2)
case functionOperator = "source.lang.swift.decl.function.operator"
/// `function.operator.infix`.
Expand Down Expand Up @@ -88,4 +88,6 @@ public enum SwiftDeclarationKind: String, CaseIterable {
case varParameter = "source.lang.swift.decl.var.parameter"
/// `var.static`.
case varStatic = "source.lang.swift.decl.var.static"
/// `actor`.
case actor = "source.lang.swift.decl.actor"
}
2 changes: 1 addition & 1 deletion Source/sourcekitten/Complete.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ extension SourceKitten {
var spmModule = ""
@Flag(help: "Prettify output")
var prettify = false
@available(macOS 10.13, *)
@Flag(help: "Sort keys in output")
@available(macOS 10.13, *)
var sortKeys = false
@Argument(help: "Compiler arguments to pass to SourceKit")
var compilerargs: [String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"key.substructure" : [
{
"key.accessibility" : "source.lang.swift.accessibility.public",
"key.annotated_decl" : "<Declaration>class NSString : <Type usr=\"c:objc(cs)NSObject\">NSObject<\/Type>, <Type usr=\"c:objc(pl)NSCopying\">NSCopying<\/Type>, <Type usr=\"c:objc(pl)NSMutableCopying\">NSMutableCopying<\/Type>, <Type usr=\"c:objc(pl)NSSecureCoding\">NSSecureCoding<\/Type><\/Declaration>",
"key.annotated_decl" : "<Declaration>@_nonSendable(_assumed) class NSString : <Type usr=\"c:objc(cs)NSObject\">NSObject<\/Type>, <Type usr=\"c:objc(pl)NSCopying\">NSCopying<\/Type>, <Type usr=\"c:objc(pl)NSMutableCopying\">NSMutableCopying<\/Type>, <Type usr=\"c:objc(pl)NSSecureCoding\">NSSecureCoding<\/Type><\/Declaration>",
"key.attributes" : [
{
"key.attribute" : "source.decl.attribute.public",
Expand All @@ -27,7 +27,7 @@
"key.doclength" : 26,
"key.docoffset" : 19,
"key.filepath" : "",
"key.fully_annotated_decl" : "<decl.class><syntaxtype.keyword>class<\/syntaxtype.keyword> <decl.name>NSString<\/decl.name> : <ref.class usr=\"c:objc(cs)NSObject\">NSObject<\/ref.class>, <ref.protocol usr=\"c:objc(pl)NSCopying\">NSCopying<\/ref.protocol>, <ref.protocol usr=\"c:objc(pl)NSMutableCopying\">NSMutableCopying<\/ref.protocol>, <ref.protocol usr=\"c:objc(pl)NSSecureCoding\">NSSecureCoding<\/ref.protocol><\/decl.class>",
"key.fully_annotated_decl" : "<decl.class><syntaxtype.attribute.builtin><syntaxtype.attribute.name>@_nonSendable(_assumed)<\/syntaxtype.attribute.name><\/syntaxtype.attribute.builtin> <syntaxtype.keyword>class<\/syntaxtype.keyword> <decl.name>NSString<\/decl.name> : <ref.class usr=\"c:objc(cs)NSObject\">NSObject<\/ref.class>, <ref.protocol usr=\"c:objc(pl)NSCopying\">NSCopying<\/ref.protocol>, <ref.protocol usr=\"c:objc(pl)NSMutableCopying\">NSMutableCopying<\/ref.protocol>, <ref.protocol usr=\"c:objc(pl)NSSecureCoding\">NSSecureCoding<\/ref.protocol><\/decl.class>",
"key.is_system" : true,
"key.kind" : "source.lang.swift.decl.extension",
"key.length" : 21,
Expand Down
Loading