Skip to content

Commit ad05fcb

Browse files
committed
Merge branch 'main' of github.com:apple/swift-package-manager into maxd/test-toolchain-argument
# Conflicts: # Tests/BuildTests/BuildPlanTests.swift
2 parents a7f8121 + 7bd34cc commit ad05fcb

File tree

65 files changed

+1673
-1084
lines changed

Some content is hidden

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

65 files changed

+1673
-1084
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ Package.resolved
1818
.docc-build
1919
.vscode
2020
Utilities/InstalledSwiftPMConfiguration/config.json
21+
.devcontainer

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Note: This is in reverse chronological order, so newer entries are added to the
22

33
* [#7530]
44

5-
Makes it possible for packages to depend on each other if such dependency doesn't form any target-level cycles. For example,
6-
package `A` can depend on `B` and `B` on `A` unless targets in `B` depend on products of `A` that depend on some of the same
5+
Starting from tools-version 6.0 makes it possible for packages to depend on each other if such dependency doesn't form any target-level cycles.
6+
For example, package `A` can depend on `B` and `B` on `A` unless targets in `B` depend on products of `A` that depend on some of the same
77
targets from `B` and vice versa.
88

99
Swift 6.0

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626

2727
Sources/XCBuildSupport/* @jakepetroules
2828

29-
* @bnbarham @MaxDesiatov @jakepetroules @francescomikulis
29+
* @bnbarham @MaxDesiatov @jakepetroules @francescomikulis @xedin
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// swift-tools-version: 5.10
2+
3+
import PackageDescription
4+
5+
let package = Package(
6+
name: "CheckTestLibraryEnvironmentVariable",
7+
targets: [
8+
.testTarget(name: "CheckTestLibraryEnvironmentVariableTests"),
9+
]
10+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import XCTest
2+
3+
final class CheckTestLibraryEnvironmentVariableTests: XCTestCase {
4+
func testEnviromentVariable() throws {
5+
let envvar = ProcessInfo.processInfo.environment["SWIFT_PM_TEST_LIBRARY"]
6+
XCTAssertEqual(envvar, "XCTest")
7+
}
8+
}

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
827827
.package(url: "https://github.com/apple/swift-crypto.git", .upToNextMinor(from: "3.0.0")),
828828
.package(url: "https://github.com/apple/swift-syntax.git", branch: relatedDependenciesBranch),
829829
.package(url: "https://github.com/apple/swift-system.git", .upToNextMinor(from: "1.1.1")),
830-
.package(url: "https://github.com/apple/swift-collections.git", .upToNextMinor(from: "1.0.1")),
830+
.package(url: "https://github.com/apple/swift-collections.git", "1.0.1" ..< "1.2.0"),
831831
.package(url: "https://github.com/apple/swift-certificates.git", .upToNextMinor(from: "1.0.1")),
832832
]
833833
} else {

Sources/Build/BuildDescription/PluginDescription.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public final class PluginDescription: Codable {
2929
/// the plugin).
3030
public let targetName: String
3131

32+
/// The language-level target name.
33+
public let targetC99Name: String
34+
3235
/// The names of any plugin products in that package that vend the plugin
3336
/// to other packages.
3437
public let productNames: [String]
@@ -56,6 +59,7 @@ public final class PluginDescription: Codable {
5659

5760
self.package = package.identity
5861
self.targetName = target.name
62+
self.targetC99Name = target.c99name
5963
self.productNames = products.map(\.name)
6064
self.toolsVersion = toolsVersion
6165
self.sources = target.sources

Sources/Build/BuildDescription/ResolvedModule+BuildDescription.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import SPMBuildCore
1717

1818
extension ResolvedModule {
1919
func tempsPath(_ buildParameters: BuildParameters) -> AbsolutePath {
20-
let suffix = buildParameters.suffix(triple: self.buildTriple)
20+
let suffix = buildParameters.suffix
2121
return buildParameters.buildPath.appending(component: "\(self.c99name)\(suffix).build")
2222
}
2323
}

Sources/Build/BuildDescription/SwiftTargetBuildDescription.swift

Lines changed: 86 additions & 91 deletions
Large diffs are not rendered by default.

Sources/Build/BuildDescription/TargetBuildDescription.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public enum TargetBuildDescription {
101101
var buildParameters: BuildParameters {
102102
switch self {
103103
case .swift(let swiftTargetBuildDescription):
104-
return swiftTargetBuildDescription.defaultBuildParameters
104+
return swiftTargetBuildDescription.buildParameters
105105
case .clang(let clangTargetBuildDescription):
106106
return clangTargetBuildDescription.buildParameters
107107
}

0 commit comments

Comments
 (0)