yonaskolb / yonaskolb/XcodeGen

Settings relative path behavior inconsistency

Open
#620 3 comments 1 reaction 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.