Skip to content

Commit aba094d

Browse files
authored
Merge pull request #581 from dduan/se0110-a
update for SE-0110 Part I
2 parents b4ae3b3 + 0848975 commit aba094d

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Sources/Build/Command.compile(ClangModule).swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ struct ClangModuleBuildMetadata {
8585
}
8686

8787
/// Returns all the objects files for this module.
88-
var objects: [AbsolutePath] { return compilePaths().map{$0.object} }
88+
var objects: [AbsolutePath] { return compilePaths().map{ _, _, object, _ in object} }
8989

9090
/// Basic flags needed to compile this module.
9191
func basicCompileArgs() throws -> [String] {

Sources/POSIX/system.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func posix_spawnp(_ path: String, args: [String], environment: [String: String]
6565
}
6666
}
6767

68-
let env: [UnsafeMutablePointer<CChar>?] = environment.map{ "\($0.0)=\($0.1)".withCString(strdup) }
68+
let env: [UnsafeMutablePointer<CChar>?] = environment.map{ "\($0)=\($1)".withCString(strdup) }
6969
defer { for case let arg? in env { free(arg) } }
7070

7171
var pid = pid_t()

Sources/Xcodeproj/pbxproj().swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public func pbxproj(srcroot: AbsolutePath, projectRoot: AbsolutePath, xcodeprojP
9292
let sourceFileRefs = fileRefs(forModuleSources: module, srcroot: srcroot)
9393

9494
// Make an array of all the source file reference ids to add to the main group.
95-
var sourceRefIds = sourceFileRefs.map{ $0.refId }
95+
var sourceRefIds = sourceFileRefs.map{ refId, _, _ in refId }
9696

9797
////// Info.plist file reference if this a framework target
9898
if module.isLibrary {
@@ -151,7 +151,7 @@ public func pbxproj(srcroot: AbsolutePath, projectRoot: AbsolutePath, xcodeprojP
151151
// sources build phase
152152
print(" \(module.compilePhaseReference) = {")
153153
print(" isa = PBXSourcesBuildPhase;")
154-
print(" files = (\(sourceFileRefs.map{ $0.bflId }.joined(separator: ", ")));")
154+
print(" files = (\(sourceFileRefs.map{ _, _, bflId in bflId }.joined(separator: ", ")));")
155155
print(" runOnlyForDeploymentPostprocessing = 0;")
156156
print(" };")
157157

@@ -167,7 +167,7 @@ public func pbxproj(srcroot: AbsolutePath, projectRoot: AbsolutePath, xcodeprojP
167167
let linkPhaseFileRefs = module.linkPhaseFileRefs
168168
print(" \(module.linkPhaseReference) = {")
169169
print(" isa = PBXFrameworksBuildPhase;")
170-
print(" files = (\(linkPhaseFileRefs.map{ $0.fileRef }.joined(separator: ", ")));")
170+
print(" files = (\(linkPhaseFileRefs.map{ _, fileRef in fileRef }.joined(separator: ", ")));")
171171
print(" runOnlyForDeploymentPostprocessing = 0;")
172172
print(" };")
173173
for item in linkPhaseFileRefs {
@@ -284,7 +284,7 @@ public func pbxproj(srcroot: AbsolutePath, projectRoot: AbsolutePath, xcodeprojP
284284

285285
print(" \(configsGroupReference) = {")
286286
print(" isa = PBXGroup;")
287-
print(" children = (" + configs.map{ $0.refId }.joined(separator: ", ") + ");")
287+
print(" children = (" + configs.map{ refId, _ in refId }.joined(separator: ", ") + ");")
288288
print(" name = Configs;")
289289
print(" sourceTree = '<group>';")
290290
print(" };")

Tests/GetTests/GitTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private func tryCloningRepoWithTag(_ tag: String?, shouldCrash: Bool) {
5959
mktmpdir { path in
6060
_ = makeGitRepo(path, tag: tag)!
6161
do {
62-
_ = try RawClone(path: path, manifestParser: { _ throws in
62+
_ = try RawClone(path: path, manifestParser: { _, _, _ throws in
6363
return Manifest(path: path, url: path.asString, package: PackageDescription.Package(name: path.basename), products: [], version: nil)
6464
})
6565
} catch Get.Error.unversioned {

Tests/PackageGraphTests/DependencyResolverTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class DependencyResolverTests: XCTestCase {
9393
provider: provider,
9494
delegate: delegate)
9595
let packages = try resolver.resolve()
96-
XCTAssertEqual(packages.map{ $0.container }.sorted(), ["A", "B", "C"])
96+
XCTAssertEqual(packages.map{ container, _ in container }.sorted(), ["A", "B", "C"])
9797
XCTAssertEqual(delegate.messages, [
9898
"added container: A",
9999
"added container: B",

0 commit comments

Comments
 (0)