yonaskolb / yonaskolb/XcodeGen
Manually set TEST_HOST to None
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 8.8k
- Forks
- 908
- Avg merge
- 17d 14h
- Merged PRs (30d)
- 2
Description
I have a use case where I want my unit test targets to not set their TEST_HOST automatically to a product target that is a dependency to the test target and, if possible, set it to "None".
Would it be a good idea to maybe creating an optional spec configuration to set the TEST_HOST manually to a specific target/none if present and bypass the automatic one?
https://github.com/yonaskolb/XcodeGen/blob/4339007e666f8c0e83a5b2a7eefeb91f2b17d2a3/Sources/XcodeGenKit/PBXProjGenerator.swift#L938
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 in Sources/XcodeGenKit/PBXProjGenerator.swift around line 938, where TEST_HOST is selected automatically. Trace the project specification data used there, then define how an optional setting would represent a specific target or None and bypass automatic selection; done means generated test targets honor that setting. No test file is mentioned, so identify the relevant generator tests before changing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100