-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use llbuild's new
content-exclusion-patterns
node attribute to prev…
…ent it from descending into `.build` and `.git` directories (#5594) This requires the llbuild commit a1adaff2a405c3a74925e60356431050cb9a3a9d, but it does not cause problems if the llbuild being used doesn't yet support this property. Instead it will be ignored. This adds a dedicated unit test with a flat package. We should consider whether any customized scratch directory should also be included in the list. This is a little tricky since the exclusion patterns are applied to all subdirectory name, not just those at the top level. In testing, it doesn't actually seem to be required, which seems a little surprising. The fix in this commit is safe and good on its own, and we can consider adding customized scratch paths later once we've looked deeper into that issue. rdar://93982172
- Loading branch information
1 parent
27694b5
commit fb032ac
Showing
7 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@main | ||
public struct MyExec { | ||
public private(set) var text = "Hello, World!" | ||
|
||
public static func main() { | ||
print(MyExec().text) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import XCTest | ||
@testable import MyExec | ||
|
||
final class MyTest: XCTestCase { | ||
func testExample() throws { | ||
XCTAssertEqual(MyExec().text, "Hello, World!") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// swift-tools-version: 5.5 | ||
import PackageDescription | ||
|
||
let execSrcFiles = ["MyExec.swift"] | ||
let testSrcFiles = ["MyTest.swift"] | ||
let variousFiles = ["README.md"] | ||
|
||
let package = Package( | ||
name: "FlatPackage", | ||
dependencies: [ | ||
], | ||
targets: [ | ||
.executableTarget( | ||
name: "MyExec", | ||
dependencies: [], | ||
path: ".", | ||
exclude: testSrcFiles + variousFiles, | ||
sources: execSrcFiles | ||
), | ||
.testTarget( | ||
name: "MyTest", | ||
dependencies: ["MyExec"], | ||
path: ".", | ||
exclude: execSrcFiles + variousFiles, | ||
sources: testSrcFiles | ||
), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# FlatPackage | ||
|
||
A description of this package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters