Support relative paths for fileGroups in includes (#1534)

This commit is contained in:
Shaun Harrison
2025-04-05 01:10:18 -04:00
committed by GitHub
parent 9e8343b1a6
commit 26de8f1c9b
6 changed files with 12 additions and 2 deletions
+2 -1
View File
@@ -242,7 +242,8 @@ extension Project: PathContainer {
.object("schemes", Scheme.pathProperties),
.object("projectReferences", ProjectReference.pathProperties),
.object("packages", SwiftPackage.pathProperties),
.string("localPackages")
.string("localPackages"),
.string("fileGroups")
]
}
}
@@ -2,7 +2,8 @@ include:
- duplicated_import_transitive.yml
- duplicated_import_root.yml
- duplicated_import_root.yml
- different_path/duplicated_import_root.yml
- path: different_path/duplicated_import_root.yml
relativePaths: false
name: DuplicatedImportDependent
targets:
IncludedTarget:
@@ -1,8 +1,11 @@
name: IncludedPathsTest
include:
- recursive_test/recursive_test.yml
- same_relative_path_test/same_relative_path_test.yml
- path: relative_local_package/inc.yml
relativePaths: true
- path: relative_file_groups/inc.yml
relativePaths: true
configFiles:
IncludedConfig: config
projectReferences:
@@ -0,0 +1 @@
This is a test file for relative file groups
@@ -0,0 +1,2 @@
fileGroups:
- TestFile.md
@@ -197,6 +197,8 @@ class SpecLoadingTests: XCTestCase {
try expect(project.packages) == [
"LocalPackage": .local(path: "paths_test/relative_local_package/LocalPackage", group: nil, excludeFromProject: false),
]
try expect(project.fileGroups.contains("paths_test/relative_file_groups/TestFile.md")) == true
}
$0.it("respects directory expansion preference") {