yonaskolb / yonaskolb/XcodeGen

Cannot add testable target from project reference

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

XCodeGen version 2.32.0

I'm trying to add testable target from project reference according to the instructions https://github.com/yonaskolb/XcodeGen/blob/master/Docs/ProjectSpec.md#testable-target-reference

projectReferences:
  Keychain:
    path: Modules/Keychain/Keychain.xcodeproj

targets:
  xyz:
     scheme:
        testTargets:
          - project: Keychain/KeychainTests

And unfortunetly it's not working 👎 I have error:

Spec validation error: Target "xyz" scheme has invalid test "KeychainTests"

Additionaly, there is a typo in instruction:

project: {project-reference-name}/{target-name}: Name of local swift package and its target.

But this is for project not for swift package 😄

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 with the testable target reference section in Docs/ProjectSpec.md and reproduce the shown projectReferences and scheme configuration. Trace the validation that rejects "KeychainTests" and verify the documented project-reference syntax, including the wording typo; done means the configuration validates and the generated scheme includes the referenced test target.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift, yaml
Domain
build-system, tooling
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.