yonaskolb / yonaskolb/XcodeGen
Settings relative path behavior inconsistency
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 8.8k
- Forks
- 908
- Avg merge
- 17d 14h
- Merged PRs (30d)
- 2
Description
When using settings with included specs, the default relative path behavior is not respected (which is understandable since xcodegen doesn't know that the value is a path) but is there a way to perhaps get a reference to the current project.yml path so we can use that to interpolate with settings paths?
For example if I have a root spec that includes a framework spec:
include:
- Framework/project.yml
And inside my Framework/project.yml I have settings that specify a path
settings:
INFOPLIST_FILE: Resources/Info.plist
This works perfectly when generating the framework spec but when the root spec is generated, the path to the Info.plist file resolves to Root/Resources/Info.plist instead of Root/Framework/Resources/Info.plist
I tried $(SRCROOT) and $(PROJECT_DIR) in my Framework spec but both resolve to the root project spec.
I was able to use INFOPLIST_FILE:REPLACE: on the root spec successfully but wondered if there was a better way.
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
Start by tracing how settings paths are resolved when an included project.yml is merged into a root spec, comparing standalone framework generation with root generation. The work is done when paths such as Framework/Resources/Info.plist resolve relative to the included spec without requiring a root-level replacement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100