Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .github/workflows/conventional-pr.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
name: conventional-pr
on:
pull_request:
branches:
- main
- master
types:
- opened
- edited
- synchronize
pull_request: {}

jobs:
lint-pr:
name: Lint PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: CondeNast/conventional-pull-request-action@v0.2.0
- uses: amannn/action-semantic-pull-request@v5
with:
requireScope: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 11 additions & 11 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Sources/XcodeGraph/Models/BuildableFolder.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Path

/// A buildable folder maps to an PBXFileSystemSynchronizedRootGroup in Xcode projects.
/// Synchronized groups were introduced in Xcode 16 to reduce git conflicts by having a reference
/// to a folder whose content is "synchronized" by Xcode itself. Think of it as Xcode resolving
/// the globs.
public struct BuildableFolder: Sendable, Codable, Equatable, Hashable {
/// The absolute path to the buildable folder.
public var path: AbsolutePath

/// Creates an instance of buildable folder.
/// - Parameter path: Absolute path to the buildable folder.
public init(path: AbsolutePath) {
self.path = path
}
}
24 changes: 16 additions & 8 deletions Sources/XcodeGraph/Models/Target.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public struct Target: Equatable, Hashable, Comparable, Codable, Sendable {
public let onDemandResourcesTags: OnDemandResourcesTags?
public let metadata: TargetMetadata
public let type: TargetType
/// Package directories
public let packages: [AbsolutePath]
public let buildableFolders: [BuildableFolder]

// MARK: - Init

Expand Down Expand Up @@ -97,7 +97,8 @@ public struct Target: Equatable, Hashable, Comparable, Codable, Sendable {
onDemandResourcesTags: OnDemandResourcesTags? = nil,
metadata: TargetMetadata = .metadata(tags: []),
type: TargetType = .local,
packages: [AbsolutePath] = []
packages: [AbsolutePath] = [],
buildableFolders: [BuildableFolder] = []

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move this property below sources ?, it will be better when both are next to each other. Then as a user I don't have to jump around to see which files or folder are part of target

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that XcodeGraph is not the abstraction used in Project.swift. We have an extra layer that sits in-between.

I don't have a strong preference here, but agree that in ProjectDescription, it should be close to sources and resources.

) {
self.name = name
self.product = product
Expand Down Expand Up @@ -129,6 +130,7 @@ public struct Target: Equatable, Hashable, Comparable, Codable, Sendable {
self.metadata = metadata
self.type = type
self.packages = packages
self.buildableFolders = buildableFolders
}

/// Given a target name, it obtains the product name by turning "-" characters into "_" and "/" into "_"
Expand Down Expand Up @@ -441,7 +443,8 @@ extension Sequence<Target> {
prune: Bool = false,
mergedBinaryType: MergedBinaryType = .disabled,
mergeable: Bool = false,
metadata: TargetMetadata = .test()
metadata: TargetMetadata = .test(),
buildableFolders: [BuildableFolder] = []
) -> Target {
Target(
name: name,
Expand Down Expand Up @@ -469,7 +472,8 @@ extension Sequence<Target> {
prune: prune,
mergedBinaryType: mergedBinaryType,
mergeable: mergeable,
metadata: metadata
metadata: metadata,
buildableFolders: buildableFolders
)
}

Expand Down Expand Up @@ -501,7 +505,8 @@ extension Sequence<Target> {
prune: Bool = false,
mergedBinaryType: MergedBinaryType = .disabled,
mergeable: Bool = false,
metadata: TargetMetadata = .test()
metadata: TargetMetadata = .test(),
buildableFolders: [BuildableFolder] = []
) -> Target {
Target(
name: name,
Expand Down Expand Up @@ -529,7 +534,8 @@ extension Sequence<Target> {
prune: prune,
mergedBinaryType: mergedBinaryType,
mergeable: mergeable,
metadata: metadata
metadata: metadata,
buildableFolders: buildableFolders
)
}

Expand All @@ -554,7 +560,8 @@ extension Sequence<Target> {
filesGroup: ProjectGroup = .group(name: "Project"),
dependencies: [TargetDependency] = [],
rawScriptBuildPhases: [RawScriptBuildPhase] = [],
onDemandResourcesTags: OnDemandResourcesTags? = nil
onDemandResourcesTags: OnDemandResourcesTags? = nil,
buildableFolders: [BuildableFolder] = []
) -> Target {
Target(
name: name,
Expand All @@ -576,7 +583,8 @@ extension Sequence<Target> {
filesGroup: filesGroup,
dependencies: dependencies,
rawScriptBuildPhases: rawScriptBuildPhases,
onDemandResourcesTags: onDemandResourcesTags
onDemandResourcesTags: onDemandResourcesTags,
buildableFolders: buildableFolders
)
}

Expand Down