yonaskolb / yonaskolb/XcodeGen

Regression: relative includes now relative to project-root rather than spec file

Open
#1,344 0 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

In our product, we integrate build via xcode with another build system. To reuse existing infrastructure, we generate both the spec yaml file and other yamls this spec file includes.

This means, that we in effect have 3 directory structures we work with:

  1. spec file and its relative includes (defined via --spec)
  2. source files defined via (--project-root)
  3. directory into which project files are generated (--project)

However it seems that this behavior has been broken, probably by https://github.com/yonaskolb/XcodeGen/pull/1262/files
as it seems that in the newest xcodegen the relative includes of from within spec .yaml are relative to --project-root.

The old behavior was significantly more flexible. Would it be possible to revert to the previous behavior, either by default or via a command line switch? If I implement this as a pull request, would there be an interest to merge this to the mainline?

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 reviewing the changes in pull request #1262 and the handling of --spec, --project-root, and --project. Confirm how relative includes are resolved, then restore resolution relative to the spec file and verify that generated projects still use the intended source and output directories.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.