Skip to content

Commit 061dac4

Browse files
committed
Update code for Swift 6
1 parent 9c3805a commit 061dac4

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//swift-tools-version:5.7
1+
//swift-tools-version:6.0
22
import PackageDescription
33

44

Sources/swift-sh/Helpers/FilePath+ArgumentParser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import ArgumentParser
99

1010

1111

12-
extension FilePath : ExpressibleByArgument {
12+
extension FilePath : @retroactive ExpressibleByArgument {
1313

1414
public init(argument: String) {
1515
self.init(argument)

Sources/swift-sh/Helpers/ImportSpecification+Parsing.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ extension ImportSpecification {
149149

150150
extension ImportSpecification.ModuleSource {
151151

152-
static var hasLoggedObsoleteFormatWarning = false
152+
/* TODO: Make this safe, I guess…
153+
* Technically I’m pretty sure we never access this variable concurrently, but the compiler ain’t happy (and I’m not sure).
154+
* For now let’s take the easy way out. */
155+
static nonisolated(unsafe) var hasLoggedObsoleteFormatWarning = false
153156

154157
init?(_ stringToParse: String, scriptFolder: FilePath, fileManager fm: FileManager, logger: Logger) {
155158
/* Let’s try multiple formats until we find one that work. */

0 commit comments

Comments
 (0)