yonaskolb / yonaskolb/XcodeGen

Inconsistent relative path behaviour

Open
#1,143 0 comments 0 reactions 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

I've noticed that when including another yml file, some paths are treated as relative paths (target.sources and additional includes) for example, but other paths like fileGroups are treated as absolute paths relative the to the root project spec.

I think if a yml file is included using relativePaths: true (the default), all the paths in the file should be treated as relative ones.

I looked through the code a bit and it should be pretty easy to add fileGroups to support being a relative path by updating Project.pathProperties. There may be other path that should be updated as well.

I could make this change if it'd be welcome. The main issue is it would be a breaking change for any project using fileGroups in an included yml file.

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 reading Project.pathProperties and the handling of included YAML files with relativePaths enabled. Check how fileGroups and the other path properties are resolved, then verify that paths in included files consistently use the included file's location while preserving root-relative behavior where intended. Document or test the breaking-change implications before considering the work done.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.