Skip to content

Commit 0118c59

Browse files
authored
Merge pull request swiftlang#404 from swiftlang/owenv/update-6.2
Periodic merge main -> release 6.2
2 parents 2fa7228 + 09d78a5 commit 0118c59

File tree

350 files changed

+2705
-2010
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

350 files changed

+2705
-2010
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ _[Put a one line description of your change into the PR title, please be specifi
22

33
_[Explain the context, and why you're making that change. What is the problem you're trying to solve.]_
44

5-
_[Tests can be run by commenting `@swift-ci` test on the pull request, for more information see [this](https://github.com/swiftlang/swift-build/blob/main/README.md)]_
5+
_[Tests can be run by commenting `@swift-ci test` on the pull request, for more information see [this](https://github.com/swiftlang/swift-build/blob/main/README.md)]_

Package.swift

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,20 @@ func swiftSettings(languageMode: SwiftLanguageMode) -> [SwiftSetting] {
3131
.enableUpcomingFeature("ConciseMagicFile"),
3232
.enableUpcomingFeature("DeprecateApplicationMain"),
3333
.enableUpcomingFeature("DisableOutwardActorInference"),
34+
//.enableUpcomingFeature("DynamicActorIsolation"),
3435
.enableUpcomingFeature("ForwardTrailingClosures"),
36+
.enableUpcomingFeature("GlobalActorIsolatedTypesUsability"),
3537
.enableUpcomingFeature("GlobalConcurrency"),
3638
.enableUpcomingFeature("ImplicitOpenExistentials"),
3739
.enableUpcomingFeature("ImportObjcForwardDeclarations"),
3840
.enableUpcomingFeature("InferSendableFromCaptures"),
3941
.enableUpcomingFeature("IsolatedDefaultValues"),
42+
.enableUpcomingFeature("NonfrozenEnumExhaustivity"),
4043
//.enableUpcomingFeature("RegionBasedIsolation"), // rdar://137809703
4144

4245
// Future Swift features
4346
.enableUpcomingFeature("ExistentialAny"),
47+
.enableUpcomingFeature("MemberImportVisibility"),
4448
.enableUpcomingFeature("InternalImportsByDefault"),
4549

4650
.swiftLanguageMode(.v5),
@@ -51,6 +55,7 @@ func swiftSettings(languageMode: SwiftLanguageMode) -> [SwiftSetting] {
5155
return [
5256
// Future Swift features
5357
.enableUpcomingFeature("ExistentialAny"),
58+
.enableUpcomingFeature("MemberImportVisibility"),
5459
.enableUpcomingFeature("InternalImportsByDefault"),
5560

5661
.swiftLanguageMode(.v6),
@@ -195,7 +200,6 @@ let package = Package(
195200
"SWBCSupport",
196201
"SWBLibc",
197202
.product(name: "ArgumentParser", package: "swift-argument-parser"),
198-
.product(name: "Crypto", package: "swift-crypto", condition: .when(platforms: [.linux, .openbsd, .android])),
199203
.product(name: "SystemPackage", package: "swift-system", condition: .when(platforms: [.linux, .android, .windows])),
200204
],
201205
exclude: ["CMakeLists.txt"],
@@ -232,7 +236,14 @@ let package = Package(
232236
swiftSettings: swiftSettings(languageMode: .v6)),
233237
.target(
234238
name: "SWBUniversalPlatform",
235-
dependencies: ["SWBCore", "SWBMacro", "SWBUtil"],
239+
dependencies: [
240+
"SWBCore",
241+
"SWBMacro",
242+
"SWBUtil",
243+
"SWBTaskConstruction",
244+
"SWBTaskExecution",
245+
.product(name: "ArgumentParser", package: "swift-argument-parser"),
246+
],
236247
exclude: ["CMakeLists.txt"],
237248
resources: [.process("Specs")],
238249
swiftSettings: swiftSettings(languageMode: .v6)),
@@ -427,7 +438,6 @@ for target in package.targets {
427438
// `SWIFTCI_USE_LOCAL_DEPS` configures if dependencies are locally available to build
428439
if useLocalDependencies {
429440
package.dependencies += [
430-
.package(path: "../swift-crypto"),
431441
.package(path: "../swift-driver"),
432442
.package(path: "../swift-system"),
433443
.package(path: "../swift-argument-parser"),
@@ -437,7 +447,6 @@ if useLocalDependencies {
437447
}
438448
} else {
439449
package.dependencies += [
440-
.package(url: "https://github.com/apple/swift-crypto.git", "2.0.0"..<"4.0.0"),
441450
.package(url: "https://github.com/swiftlang/swift-driver.git", branch: "release/6.2"),
442451
.package(url: "https://github.com/apple/swift-system.git", .upToNextMajor(from: "1.4.1")),
443452
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.0.3"),

Plugins/cmake-smoke-test/cmake-smoke-test.swift

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ struct CMakeSmokeTest: CommandPlugin {
4141
let swiftSystemURL = try findSiblingRepository("swift-system", swiftBuildURL: swiftBuildURL)
4242
let swiftSystemBuildURL = context.pluginWorkDirectoryURL.appending(component: "swift-system")
4343

44-
let swiftAsn1URL = try findSiblingRepository("swift-asn1", swiftBuildURL: swiftBuildURL)
45-
let swiftAsn1BuildURL = context.pluginWorkDirectoryURL.appending(component: "swift-asn1")
46-
47-
let swiftCryptoURL = try findSiblingRepository("swift-crypto", swiftBuildURL: swiftBuildURL)
48-
let swiftCryptoBuildURL = context.pluginWorkDirectoryURL.appending(component: "swift-crypto")
49-
5044
let llbuildURL = try findSiblingRepository("llbuild", swiftBuildURL: swiftBuildURL)
5145
let llbuildBuildURL = context.pluginWorkDirectoryURL.appending(component: "llbuild")
5246

@@ -56,7 +50,7 @@ struct CMakeSmokeTest: CommandPlugin {
5650
let swiftDriverURL = try findSiblingRepository("swift-driver", swiftBuildURL: swiftBuildURL)
5751
let swiftDriverBuildURL = context.pluginWorkDirectoryURL.appending(component: "swift-driver")
5852

59-
for url in [swiftToolsSupportCoreBuildURL, swiftAsn1BuildURL, swiftCryptoBuildURL, swiftSystemBuildURL, llbuildBuildURL, swiftArgumentParserBuildURL, swiftDriverBuildURL, swiftBuildBuildURL] {
53+
for url in [swiftToolsSupportCoreBuildURL, swiftSystemBuildURL, llbuildBuildURL, swiftArgumentParserBuildURL, swiftDriverBuildURL, swiftBuildBuildURL] {
6054
try FileManager.default.createDirectory(at: url, withIntermediateDirectories: true)
6155
}
6256

@@ -69,8 +63,6 @@ struct CMakeSmokeTest: CommandPlugin {
6963
"-DArgumentParser_DIR=\(swiftArgumentParserBuildURL.appending(components: "cmake", "modules").path())",
7064
"-DLLBuild_DIR=\(llbuildBuildURL.appending(components: "cmake", "modules").path())",
7165
"-DTSC_DIR=\(swiftToolsSupportCoreBuildURL.appending(components: "cmake", "modules").path())",
72-
"-DSwiftASN1_DIR=\(swiftAsn1BuildURL.appending(components: "cmake", "modules").path())",
73-
"-DSwiftCrypto_DIR=\(swiftCryptoBuildURL.appending(components: "cmake", "modules").path())",
7466
"-DSwiftDriver_DIR=\(swiftDriverBuildURL.appending(components: "cmake", "modules").path())",
7567
"-DSwiftSystem_DIR=\(swiftSystemBuildURL.appending(components: "cmake", "modules").path())"
7668
]
@@ -87,18 +79,6 @@ struct CMakeSmokeTest: CommandPlugin {
8779
try await Process.checkNonZeroExit(url: ninjaURL, arguments: [], workingDirectory: swiftToolsSupportCoreBuildURL)
8880
print("Built swift-tools-support-core")
8981

90-
if hostOS != .macOS && hostOS != .windows {
91-
print("Building swift-asn1")
92-
try await Process.checkNonZeroExit(url: cmakeURL, arguments: sharedCMakeArgs + [swiftAsn1URL.path()], workingDirectory: swiftAsn1BuildURL)
93-
try await Process.checkNonZeroExit(url: ninjaURL, arguments: [], workingDirectory: swiftAsn1BuildURL)
94-
print("Built swift-asn1")
95-
96-
print("Building swift-crypto")
97-
try await Process.checkNonZeroExit(url: cmakeURL, arguments: sharedCMakeArgs + [swiftCryptoURL.path()], workingDirectory: swiftCryptoBuildURL)
98-
try await Process.checkNonZeroExit(url: ninjaURL, arguments: [], workingDirectory: swiftCryptoBuildURL)
99-
print("Built swift-crypto")
100-
}
101-
10282
if hostOS != .macOS {
10383
print("Building swift-system")
10484
try await Process.checkNonZeroExit(url: cmakeURL, arguments: sharedCMakeArgs + [swiftSystemURL.path()], workingDirectory: swiftSystemBuildURL)

Sources/SWBApplePlatform/ActoolInputFileGroupingStrategy.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
public import SWBCore
1414
import SWBUtil
15+
import Foundation
1516

1617
/// A grouping strategy that groups all asset catalogs and all strings files that match sticker packs inside those asset catalogs.
1718
@_spi(Testing) public final class ActoolInputFileGroupingStrategy: InputFileGroupingStrategy {

Sources/SWBApplePlatform/AppIntentsMetadataTaskProducer.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import SWBCore
1414
import SWBUtil
1515
import SWBTaskConstruction
16+
import SWBMacro
1617

1718
final class AppIntentsMetadataTaskProducer: PhasedTaskProducer, TaskProducer {
1819

Sources/SWBApplePlatform/CoreDataCompiler.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import SWBUtil
1414
public import SWBCore
15+
import SWBMacro
1516

1617
public final class CoreDataModelCompilerSpec : GenericCompilerSpec, SpecIdentifierType, @unchecked Sendable {
1718
public static let identifier = "com.apple.compilers.model.coredata"

Sources/SWBApplePlatform/CoreMLCompiler.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
public import SWBUtil
1414
public import SWBCore
1515
public import SWBMacro
16+
import SWBProtocol
1617

1718
public struct DiscoveredCoreMLToolSpecInfo: DiscoveredCommandLineToolSpecInfo {
1819
public let toolPath: Path
@@ -151,7 +152,7 @@ public final class CoreMLCompilerSpec : GenericCompilerSpec, SpecIdentifierType,
151152
// When the build setting is empty or is set to Automatic, then use an appropriate string based on the predominant source code language for the target.
152153
if languageSettingValue.isEmpty || languageSettingValue == "Automatic" {
153154
// Note that it would be pretty weird here to not have a configured target, or to have a target which is not a StandardTarget.
154-
let predominantSourceCodeLanguage = (cbc.producer.configuredTarget?.target as? StandardTarget)?.predominantSourceCodeLanguage ?? .undefined
155+
let predominantSourceCodeLanguage = (cbc.producer.configuredTarget?.target as? SWBCore.StandardTarget)?.predominantSourceCodeLanguage ?? .undefined
155156
switch predominantSourceCodeLanguage {
156157
case .swift:
157158
codegenLanguage = "Swift"
@@ -289,7 +290,7 @@ public final class CoreMLCompilerSpec : GenericCompilerSpec, SpecIdentifierType,
289290
}
290291

291292
guard
292-
let target = cbc.producer.configuredTarget?.target as? BuildPhaseTarget,
293+
let target = cbc.producer.configuredTarget?.target as? SWBCore.BuildPhaseTarget,
293294
let outputPath = headerOutputPath,
294295
target.headersBuildPhase != nil else { continue }
295296

Sources/SWBApplePlatform/DevelopmentAssetsTaskProducer.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import SWBCore
1414
import SWBUtil
1515
import SWBTaskConstruction
16+
import SWBMacro
1617

1718
final class DevelopmentAssetsTaskProducer: StandardTaskProducer, TaskProducer {
1819
func generateTasks() async -> [any PlannedTask] {

Sources/SWBApplePlatform/InstrumentsPackageBuilderSpec.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import SWBUtil
1414
public import SWBCore
15+
import SWBMacro
1516

1617
public final class InstrumentsPackageBuilderSpec: GenericCompilerSpec, SpecIdentifierType, @unchecked Sendable {
1718
public static let identifier = "com.apple.compilers.instruments-package-builder"

Sources/SWBApplePlatform/IntentsCompiler.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
import SWBUtil
1414
public import SWBCore
15+
import SWBProtocol
16+
import SWBMacro
1517

1618
/// Payload information for Intents tasks.
1719
fileprivate struct IntentsTaskPayload: TaskPayload, Encodable {
@@ -122,7 +124,7 @@ public final class IntentsCompilerSpec : GenericCompilerSpec, SpecIdentifierType
122124
let outputDir = cbc.scope.evaluate(BuiltinMacros.DERIVED_FILE_DIR).join("IntentDefinitionGenerated").join(modelName).normalize()
123125

124126
guard
125-
let target = cbc.producer.configuredTarget?.target as? BuildPhaseTarget,
127+
let target = cbc.producer.configuredTarget?.target as? SWBCore.BuildPhaseTarget,
126128
target.sourcesBuildPhase != nil,
127129
let intentsCodegenVisibility = input.intentsCodegenVisibility else { return }
128130

@@ -136,7 +138,7 @@ public final class IntentsCompilerSpec : GenericCompilerSpec, SpecIdentifierType
136138
// When the build setting is empty or is set to Automatic, then use an appropriate string based on the predominant source code language for the target.
137139
if languageSettingValue.isEmpty || languageSettingValue == "Automatic" {
138140
// Note that it would be pretty weird here to not have a configured target, or to have a target which is not a StandardTarget.
139-
let predominantSourceCodeLanguage = (cbc.producer.configuredTarget?.target as? StandardTarget)?.predominantSourceCodeLanguage ?? .undefined
141+
let predominantSourceCodeLanguage = (cbc.producer.configuredTarget?.target as? SWBCore.StandardTarget)?.predominantSourceCodeLanguage ?? .undefined
140142
switch predominantSourceCodeLanguage {
141143
case .swift:
142144
codegenLanguage = "Swift"
@@ -236,7 +238,7 @@ public final class IntentsCompilerSpec : GenericCompilerSpec, SpecIdentifierType
236238
}
237239

238240
guard
239-
let target = cbc.producer.configuredTarget?.target as? BuildPhaseTarget,
241+
let target = cbc.producer.configuredTarget?.target as? SWBCore.BuildPhaseTarget,
240242
let outputPath = headerOutputPath,
241243
target.headersBuildPhase != nil else { continue }
242244

0 commit comments

Comments
 (0)