Skip to content

[DO NOT MERGE YET] Cherry-pick commits required for swift-3.0-branch Foundation integration #617

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
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
5 changes: 0 additions & 5 deletions Sources/Basic/Condition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@

import Foundation

// FIXME: Temporary compatibility shims.
#if !os(macOS)
private typealias NSCondition = Foundation.Condition
#endif

/// A simple condition wrapper.
public struct Condition {
private let _condition = NSCondition()
Expand Down
5 changes: 0 additions & 5 deletions Sources/Basic/Lock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@

import Foundation

// FIXME: Temporary compatibility shims.
#if !os(macOS)
private typealias NSLock = Foundation.Lock
#endif

/// A simple lock wrapper.
public struct Lock {
private var _lock = NSLock()
Expand Down
4 changes: 2 additions & 2 deletions Sources/Basic/Thread.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final public class Thread {
}
}

self.thread = ThreadImpl(theTask)
self.thread = ThreadImpl(block: theTask)
}

/// Starts the thread execution.
Expand Down Expand Up @@ -76,7 +76,7 @@ final private class ThreadImpl: Foundation.Thread {
task()
}

init(_ task: @escaping () -> Void) {
init(block task: @escaping () -> Void) {
self.task = task
}
}
Expand Down
4 changes: 0 additions & 4 deletions Sources/Commands/SwiftTestTool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,7 @@ public struct SwiftTestTool: SwiftTool {

// Execute the XCTest with inherited environment as it is convenient to pass senstive
// information like username, password etc to test cases via enviornment variables.
#if os(Linux)
let result: Void? = try? system(args, environment: ProcessInfo.processInfo().environment)
#else
let result: Void? = try? system(args, environment: ProcessInfo.processInfo.environment)
#endif
return result != nil
}

Expand Down
4 changes: 0 additions & 4 deletions Sources/Get/Git.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ extension Git {
}

do {
#if os(Linux)
let env = ProcessInfo.processInfo().environment
#else
let env = ProcessInfo.processInfo.environment
#endif
try system(Git.tool, "clone",
"--recursive", // get submodules too so that developers can use these if they so choose
"--depth", "10",
Expand Down
4 changes: 0 additions & 4 deletions Sources/SourceControl/GitRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ public class GitRepositoryProvider: RepositoryProvider {
do {
// FIXME: We need infrastructure in this subsystem for reporting
// status information.
#if os(Linux)
let env = ProcessInfo.processInfo().environment
#else
let env = ProcessInfo.processInfo.environment
#endif
try system(
Git.tool, "clone", "--bare", repository.url, path.asString,
environment: env, message: "Cloning \(repository.url)")
Expand Down
4 changes: 0 additions & 4 deletions Sources/Utility/Git.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,7 @@ public class Git {
}

public func fetch() throws {
#if os(Linux)
try system(Git.tool, "-C", path.asString, "fetch", "--tags", "origin", environment: ProcessInfo.processInfo().environment, message: nil)
#else
try system(Git.tool, "-C", path.asString, "fetch", "--tags", "origin", environment: ProcessInfo.processInfo.environment, message: nil)
#endif
}
}

Expand Down