Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

Commit 183d809

Browse files
pepicrftCopilot
andauthored
feat: Add Target.buildableFolders attribute (#266)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 47d426a commit 183d809

4 files changed

Lines changed: 50 additions & 29 deletions

File tree

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
name: conventional-pr
22
on:
3-
pull_request:
4-
branches:
5-
- main
6-
- master
7-
types:
8-
- opened
9-
- edited
10-
- synchronize
3+
pull_request: {}
4+
115
jobs:
126
lint-pr:
7+
name: Lint PR
138
runs-on: ubuntu-latest
149
steps:
1510
- uses: actions/checkout@v5
16-
- uses: CondeNast/conventional-pull-request-action@v0.2.0
11+
- uses: amannn/action-semantic-pull-request@v5
12+
with:
13+
requireScope: false
1714
env:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Package.resolved

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Path
2+
3+
/// A buildable folder maps to an PBXFileSystemSynchronizedRootGroup in Xcode projects.
4+
/// Synchronized groups were introduced in Xcode 16 to reduce git conflicts by having a reference
5+
/// to a folder whose content is "synchronized" by Xcode itself. Think of it as Xcode resolving
6+
/// the globs.
7+
public struct BuildableFolder: Sendable, Codable, Equatable, Hashable {
8+
/// The absolute path to the buildable folder.
9+
public var path: AbsolutePath
10+
11+
/// Creates an instance of buildable folder.
12+
/// - Parameter path: Absolute path to the buildable folder.
13+
public init(path: AbsolutePath) {
14+
self.path = path
15+
}
16+
}

Sources/XcodeGraph/Models/Target.swift

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public struct Target: Equatable, Hashable, Comparable, Codable, Sendable {
6262
public let onDemandResourcesTags: OnDemandResourcesTags?
6363
public let metadata: TargetMetadata
6464
public let type: TargetType
65-
/// Package directories
6665
public let packages: [AbsolutePath]
66+
public let buildableFolders: [BuildableFolder]
6767

6868
// MARK: - Init
6969

@@ -97,7 +97,8 @@ public struct Target: Equatable, Hashable, Comparable, Codable, Sendable {
9797
onDemandResourcesTags: OnDemandResourcesTags? = nil,
9898
metadata: TargetMetadata = .metadata(tags: []),
9999
type: TargetType = .local,
100-
packages: [AbsolutePath] = []
100+
packages: [AbsolutePath] = [],
101+
buildableFolders: [BuildableFolder] = []
101102
) {
102103
self.name = name
103104
self.product = product
@@ -129,6 +130,7 @@ public struct Target: Equatable, Hashable, Comparable, Codable, Sendable {
129130
self.metadata = metadata
130131
self.type = type
131132
self.packages = packages
133+
self.buildableFolders = buildableFolders
132134
}
133135

134136
/// Given a target name, it obtains the product name by turning "-" characters into "_" and "/" into "_"
@@ -441,7 +443,8 @@ extension Sequence<Target> {
441443
prune: Bool = false,
442444
mergedBinaryType: MergedBinaryType = .disabled,
443445
mergeable: Bool = false,
444-
metadata: TargetMetadata = .test()
446+
metadata: TargetMetadata = .test(),
447+
buildableFolders: [BuildableFolder] = []
445448
) -> Target {
446449
Target(
447450
name: name,
@@ -469,7 +472,8 @@ extension Sequence<Target> {
469472
prune: prune,
470473
mergedBinaryType: mergedBinaryType,
471474
mergeable: mergeable,
472-
metadata: metadata
475+
metadata: metadata,
476+
buildableFolders: buildableFolders
473477
)
474478
}
475479

@@ -501,7 +505,8 @@ extension Sequence<Target> {
501505
prune: Bool = false,
502506
mergedBinaryType: MergedBinaryType = .disabled,
503507
mergeable: Bool = false,
504-
metadata: TargetMetadata = .test()
508+
metadata: TargetMetadata = .test(),
509+
buildableFolders: [BuildableFolder] = []
505510
) -> Target {
506511
Target(
507512
name: name,
@@ -529,7 +534,8 @@ extension Sequence<Target> {
529534
prune: prune,
530535
mergedBinaryType: mergedBinaryType,
531536
mergeable: mergeable,
532-
metadata: metadata
537+
metadata: metadata,
538+
buildableFolders: buildableFolders
533539
)
534540
}
535541

@@ -554,7 +560,8 @@ extension Sequence<Target> {
554560
filesGroup: ProjectGroup = .group(name: "Project"),
555561
dependencies: [TargetDependency] = [],
556562
rawScriptBuildPhases: [RawScriptBuildPhase] = [],
557-
onDemandResourcesTags: OnDemandResourcesTags? = nil
563+
onDemandResourcesTags: OnDemandResourcesTags? = nil,
564+
buildableFolders: [BuildableFolder] = []
558565
) -> Target {
559566
Target(
560567
name: name,
@@ -576,7 +583,8 @@ extension Sequence<Target> {
576583
filesGroup: filesGroup,
577584
dependencies: dependencies,
578585
rawScriptBuildPhases: rawScriptBuildPhases,
579-
onDemandResourcesTags: onDemandResourcesTags
586+
onDemandResourcesTags: onDemandResourcesTags,
587+
buildableFolders: buildableFolders
580588
)
581589
}
582590

0 commit comments

Comments
 (0)