yonaskolb / yonaskolb/XcodeGen
transitivelyLinkDependencies does not embed 2nd degree dependencies
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 8.8k
- Forks
- 908
- Avg merge
- 17d 14h
- Merged PRs (30d)
- 2
Description
Hello, we are using xcodegen and our setup looks like
1 main app project - 1 target
30 projects for "modules" that consists of
- a dynamic framework target
- an app target (playground for the framework) that embeds the dynamic framework target
Let's say we have dynamic frameworks A, A1, A2, A3, and A11, all of which are in separate projects, so that
( -> means depends on)
A -> A1 -> A11
A -> A2
A -> A3
and also in the same project with dynamic framework A, there is also an app target, A-Playground, so that
A-Playground -> A
We normally add every dependency explicitly in the main app target so all of the dynamic frameworks are embedded correctly, no problems
However for A-Playground, when I set transitivelyLinkDependencies: true, I see that A1, A2 and A3 are linked and embedded properly, however A11 isn't. Is this expected behavior? Is there a way to recursively embed dependencies until the end of the dependency tree?
Our directory structure and .yml definitions
Directory structure
├── A
│ ├── A
│ │ ├── Info.plist
│ │ ├── A.h
│ │ └── src
│ │ └── A.swift
│ ├── A.xcodeproj
│ └── A.yml
├── A1
│ ├── A1
│ │ ├── Info.plist
│ │ ├── A1.h
│ │ └── src
│ │ └── A1.swift
│ ├── A1.xcodeproj
│ └── A1.yml
├── A2
│ ├── A2
│ │ ├── Info.plist
│ │ ├── A2.h
│ │ └── src
│ │ └── A2.swift
│ ├── A2.xcodeproj
│ └── A2.yml
├── A3
│ ├── A3
│ │ ├── Info.plist
│ │ ├── A3.h
│ │ └── src
│ │ └── A3.swift
│ ├── A3.xcodeproj
│ └── A3.yml
├── A11
│ ├── A11
│ │ ├── Info.plist
│ │ ├── A11.h
│ │ └── src
│ │ └── A11.swift
│ ├── A11.xcodeproj
│ └── A11.yml
└── framework_templates.yml
A.yml
name: A
include:
- path: ../framework_templates.yml
relative: true
projectReferences:
A1:
path: ../A1/A1.xcodeproj
A2:
path: ../A2/A2.xcodeproj
A3:
path: ../A3/A3.xcodeproj
targets:
A:
platform: iOS
type: framework
templates:
- DynamicFramework
templateAttributes:
targetName: A
moduleName: A
dependencies:
- target: A1/A1
- target: A2/A2
- target: A3/A3
A-Playground:
platform: iOS
type: application
templates:
- PlaygroundApp
templateAttributes:
targetName: A-Playground
moduleName: A
dependencies:
- target: A
A1.yml
name: A1
include:
- path: ../framework_templates.yml
relative: true
projectReferences:
A11:
path: ../A11/A11.xcodeproj
targets:
A1:
platform: iOS
type: framework
templates:
- DynamicFramework
templateAttributes:
targetName: A1
moduleName: A1
dependencies:
- target: A11/A11
framework_templates.yml
targetTemplates:
DynamicFramework:
sources:
- ${moduleName}/${targetName}
scheme:
gatherCoverageData: true
PlaygroundApp:
sources:
- ${moduleName}/${targetName}
transitivelyLinkDependencies: true
dependencies:
- target: ${moduleName}
PS: I left unrelated stuff (like configs, test targets etc) out for easier visual parsing of yml files, if you're interested I can share the full blown versions, but I don't think there is anything related to dependencies etc there.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the configurations in A.yml, A1.yml, and framework_templates.yml to reproduce the A-Playground dependency chain with transitivelyLinkDependencies enabled. Trace how the dependency graph is traversed and how linked frameworks are embedded, then verify that A11 is embedded along with A1, A2, and A3.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100