Skip to content

Commit c784ad8

Browse files
authored
Merge pull request #617 from itaiferber/pr-foundation-3.0-integration
[DO NOT MERGE YET] Cherry-pick commits required for swift-3.0-branch Foundation integration
2 parents 72d903c + b892f4a commit c784ad8

File tree

7 files changed

+2
-28
lines changed

7 files changed

+2
-28
lines changed

Sources/Basic/Condition.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010

1111
import Foundation
1212

13-
// FIXME: Temporary compatibility shims.
14-
#if !os(macOS)
15-
private typealias NSCondition = Foundation.Condition
16-
#endif
17-
1813
/// A simple condition wrapper.
1914
public struct Condition {
2015
private let _condition = NSCondition()

Sources/Basic/Lock.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010

1111
import Foundation
1212

13-
// FIXME: Temporary compatibility shims.
14-
#if !os(macOS)
15-
private typealias NSLock = Foundation.Lock
16-
#endif
17-
1813
/// A simple lock wrapper.
1914
public struct Lock {
2015
private var _lock = NSLock()

Sources/Basic/Thread.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ final public class Thread {
4747
}
4848
}
4949

50-
self.thread = ThreadImpl(theTask)
50+
self.thread = ThreadImpl(block: theTask)
5151
}
5252

5353
/// Starts the thread execution.
@@ -76,7 +76,7 @@ final private class ThreadImpl: Foundation.Thread {
7676
task()
7777
}
7878

79-
init(_ task: @escaping () -> Void) {
79+
init(block task: @escaping () -> Void) {
8080
self.task = task
8181
}
8282
}

Sources/Commands/SwiftTestTool.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,7 @@ public struct SwiftTestTool: SwiftTool {
291291

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

Sources/Get/Git.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ extension Git {
2525
}
2626

2727
do {
28-
#if os(Linux)
29-
let env = ProcessInfo.processInfo().environment
30-
#else
3128
let env = ProcessInfo.processInfo.environment
32-
#endif
3329
try system(Git.tool, "clone",
3430
"--recursive", // get submodules too so that developers can use these if they so choose
3531
"--depth", "10",

Sources/SourceControl/GitRepository.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ public class GitRepositoryProvider: RepositoryProvider {
4747
do {
4848
// FIXME: We need infrastructure in this subsystem for reporting
4949
// status information.
50-
#if os(Linux)
51-
let env = ProcessInfo.processInfo().environment
52-
#else
5350
let env = ProcessInfo.processInfo.environment
54-
#endif
5551
try system(
5652
Git.tool, "clone", "--bare", repository.url, path.asString,
5753
environment: env, message: "Cloning \(repository.url)")

Sources/Utility/Git.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,7 @@ public class Git {
121121
}
122122

123123
public func fetch() throws {
124-
#if os(Linux)
125-
try system(Git.tool, "-C", path.asString, "fetch", "--tags", "origin", environment: ProcessInfo.processInfo().environment, message: nil)
126-
#else
127124
try system(Git.tool, "-C", path.asString, "fetch", "--tags", "origin", environment: ProcessInfo.processInfo.environment, message: nil)
128-
#endif
129125
}
130126
}
131127

0 commit comments

Comments
 (0)