Skip to content

Commit 77d3109

Browse files
TheOtherDaveTheOtherDave
authored andcommitted
Added groundwork for FileAddRemoveTests
1 parent e9ba182 commit 77d3109

File tree

10 files changed

+71
-2
lines changed

10 files changed

+71
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
This source file is part of the Swift.org open source project
3+
4+
Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
5+
Licensed under Apache License v2.0 with Runtime Library Exception
6+
7+
See http://swift.org/LICENSE.txt for license information
8+
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
9+
*/
10+
11+
import PackageDescription
12+
13+
// For testing whether removing/readding a target incrementally builds correctly
14+
let package = Package(
15+
name: "StayOnTarget",
16+
17+
targets: [
18+
Target(
19+
name: "T1",
20+
dependencies: []),
21+
Target(
22+
name: "T2",
23+
dependencies: []),
24+
]
25+
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
print(firstLine)
2+
print(secondLine)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
This source file is part of the Swift.org open source project
3+
4+
Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
5+
Licensed under Apache License v2.0 with Runtime Library Exception
6+
7+
See http://swift.org/LICENSE.txt for license information
8+
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
9+
*/
10+
11+
import PackageDescription
12+
13+
// For testing whether removing and readding a file incrementally builds correctly
14+
let package = Package(
15+
name: "FileAddRemoveTests",
16+
)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
struct FileTester : FileTesterType {
2+
static var fileTester: String {
3+
return "fileTester"
4+
}
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
extension FileTester {
2+
static var fileTesterToo: String {
3+
return "fileTesterToo"
4+
}
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
protocol FileTestType {
2+
static var fileTester: String {get}
3+
static var fileTesterToo: String {get}
4+
}
5+
extension FileTestType {
6+
static var fileTesterToo: String { return Self.fileTester }
7+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print(FileTester.fileTesterToo)

Sources/Commands/ToolDefaults.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct ToolDefaults: ManifestResourceProvider {
3434
do {
3535
try setenv("SWIFT_EXEC", value:"/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc")
3636
} catch let error {
37-
fatalError("getenv(\"SWIFT_EXEC\") returned nil, and we then caught \(error) while calling setenv(\"SWIFT_EXEC\", value:\"/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc\") so that subsequent calls to getenv(\"SWIFT_EXEC\") could return a value, so that we can have a path for SWIFT_EXEC. The error is fatal to prevent an infinite loop.")
37+
fatalError("getenv(\"SWIFT_EXEC\") returned nil, and we then caught \"\(error)\" while calling setenv(\"SWIFT_EXEC\", value:\"/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc\") so that subsequent calls to getenv(\"SWIFT_EXEC\") could return a value, so that we can have a path for SWIFT_EXEC. The error is fatal to prevent an infinite loop.")
3838
}
3939
return self.SWIFT_EXEC
4040
}
@@ -47,7 +47,7 @@ struct ToolDefaults: ManifestResourceProvider {
4747
do {
4848
try setenv("SWIFT_EXEC", value:"/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc")
4949
} catch let error {
50-
fatalError("getenv(\"SWIFT_EXEC\") returned nil, and we then caught \(error) while calling setenv(\"SWIFT_EXEC\", value:\"/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc\") so that subsequent calls to getenv(\"SWIFT_EXEC\") could return a value, so that we can have a path for llbuild. The error is fatal to prevent an infinite loop.")
50+
fatalError("getenv(\"SWIFT_EXEC\") returned nil, and we then caught \"\(error)\" while calling setenv(\"SWIFT_EXEC\", value:\"/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc\") so that subsequent calls to getenv(\"SWIFT_EXEC\") could return a value, so that we can have a path for llbuild. The error is fatal to prevent an infinite loop.")
5151
}
5252
return self.llbuild
5353
}

0 commit comments

Comments
 (0)