Skip to content

update for SE-0110 Part I #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Build/Command.compile(ClangModule).swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct ClangModuleBuildMetadata {
}

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

/// Basic flags needed to compile this module.
func basicCompileArgs() throws -> [String] {
Expand Down
2 changes: 1 addition & 1 deletion Sources/POSIX/system.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func posix_spawnp(_ path: String, args: [String], environment: [String: String]
}
}

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

var pid = pid_t()
Expand Down
8 changes: 4 additions & 4 deletions Sources/Xcodeproj/pbxproj().swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public func pbxproj(srcroot: AbsolutePath, projectRoot: AbsolutePath, xcodeprojP
let sourceFileRefs = fileRefs(forModuleSources: module, srcroot: srcroot)

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

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

Expand All @@ -167,7 +167,7 @@ public func pbxproj(srcroot: AbsolutePath, projectRoot: AbsolutePath, xcodeprojP
let linkPhaseFileRefs = module.linkPhaseFileRefs
print(" \(module.linkPhaseReference) = {")
print(" isa = PBXFrameworksBuildPhase;")
print(" files = (\(linkPhaseFileRefs.map{ $0.fileRef }.joined(separator: ", ")));")
print(" files = (\(linkPhaseFileRefs.map{ _, fileRef in fileRef }.joined(separator: ", ")));")
print(" runOnlyForDeploymentPostprocessing = 0;")
print(" };")
for item in linkPhaseFileRefs {
Expand Down Expand Up @@ -284,7 +284,7 @@ public func pbxproj(srcroot: AbsolutePath, projectRoot: AbsolutePath, xcodeprojP

print(" \(configsGroupReference) = {")
print(" isa = PBXGroup;")
print(" children = (" + configs.map{ $0.refId }.joined(separator: ", ") + ");")
print(" children = (" + configs.map{ refId, _ in refId }.joined(separator: ", ") + ");")
print(" name = Configs;")
print(" sourceTree = '<group>';")
print(" };")
Expand Down
2 changes: 1 addition & 1 deletion Tests/GetTests/GitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private func tryCloningRepoWithTag(_ tag: String?, shouldCrash: Bool) {
mktmpdir { path in
_ = makeGitRepo(path, tag: tag)!
do {
_ = try RawClone(path: path, manifestParser: { _ throws in
_ = try RawClone(path: path, manifestParser: { _, _, _ throws in
return Manifest(path: path, url: path.asString, package: PackageDescription.Package(name: path.basename), products: [], version: nil)
})
} catch Get.Error.unversioned {
Expand Down
2 changes: 1 addition & 1 deletion Tests/PackageGraphTests/DependencyResolverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class DependencyResolverTests: XCTestCase {
provider: provider,
delegate: delegate)
let packages = try resolver.resolve()
XCTAssertEqual(packages.map{ $0.container }.sorted(), ["A", "B", "C"])
XCTAssertEqual(packages.map{ container, _ in container }.sorted(), ["A", "B", "C"])
XCTAssertEqual(delegate.messages, [
"added container: A",
"added container: B",
Expand Down