File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed
Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 2020 uses : swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
2121 with :
2222 enable_cross_pr_testing : true
23- # " 5.9" is excluded because of https://github.com/swiftlang/swift-format/issues/1094.
23+ linux_exclude_swift_versions : " [{ \" swift_version \" : \" 5.9\" }, { \" swift_version \" : \" 5.10 \" }] "
2424 windows_exclude_swift_versions : " [{\" swift_version\" : \" 5.9\" }]"
2525 soundness :
2626 name : Soundness
Original file line number Diff line number Diff line change 1- // swift-tools-version: 5.9
1+ // swift-tools-version: 6.0
22//===----------------------------------------------------------------------===//
33//
44// This source file is part of the Swift.org open source project
@@ -146,9 +146,11 @@ let package = Package(
146146 ] ,
147147 products: products,
148148 dependencies: dependencies,
149- targets: targets
149+ targets: targets,
150+ swiftLanguageModes: [ . v5]
150151)
151152
153+ @MainActor
152154func swiftSyntaxDependencies( _ names: [ String ] ) -> [ Target . Dependency ] {
153155 if buildDynamicSwiftSyntaxLibrary {
154156 return [ . product( name: " _SwiftSyntaxDynamic " , package : " swift-syntax " ) ]
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import PackagePlugin
1616@main
1717struct FormatPlugin {
1818 func format( tool: PluginContext . Tool , targetDirectories: [ String ] , configurationFilePath: String ? ) throws {
19- let swiftFormatExec = URL ( fileURLWithPath : tool. path . string )
19+ let swiftFormatExec = tool. url
2020
2121 var arguments : [ String ] = [ " format " ]
2222
@@ -58,7 +58,8 @@ extension FormatPlugin: CommandPlugin {
5858
5959 try format (
6060 tool: swiftFormatTool,
61- targetDirectories: sourceCodeTargets. map ( \. directory. string) ,
61+ // This should be `directoryURL`, but it's only available in 6.1+
62+ targetDirectories: sourceCodeTargets. map { String ( describing: $0. directory) } ,
6263 configurationFilePath: configurationFilePath
6364 )
6465 }
@@ -76,7 +77,7 @@ extension FormatPlugin: XcodeCommandPlugin {
7677
7778 try format (
7879 tool: swiftFormatTool,
79- targetDirectories: [ context. xcodeProject. directory . string ] ,
80+ targetDirectories: [ context. xcodeProject. directoryURL . path ( ) ] ,
8081 configurationFilePath: configurationFilePath
8182 )
8283 }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import PackagePlugin
1616@main
1717struct LintPlugin {
1818 func lint( tool: PluginContext . Tool , targetDirectories: [ String ] , configurationFilePath: String ? ) throws {
19- let swiftFormatExec = URL ( fileURLWithPath : tool. path . string )
19+ let swiftFormatExec = tool. url
2020
2121 var arguments : [ String ] = [ " lint " ]
2222
@@ -59,7 +59,8 @@ extension LintPlugin: CommandPlugin {
5959
6060 try lint (
6161 tool: swiftFormatTool,
62- targetDirectories: sourceCodeTargets. map ( \. directory. string) ,
62+ // This should be `directoryURL`, but it's only available in 6.1+
63+ targetDirectories: sourceCodeTargets. map { String ( describing: $0. directory) } ,
6364 configurationFilePath: configurationFilePath
6465 )
6566 }
@@ -76,7 +77,7 @@ extension LintPlugin: XcodeCommandPlugin {
7677
7778 try lint (
7879 tool: swiftFormatTool,
79- targetDirectories: [ context. xcodeProject. directory . string ] ,
80+ targetDirectories: [ context. xcodeProject. directoryURL . path ( ) ] ,
8081 configurationFilePath: configurationFilePath
8182 )
8283 }
You can’t perform that action at this time.
0 commit comments