yonaskolb / yonaskolb/XcodeGen

Test target from a Swift package cannot be added to a scheme

Open
#983 1 comment 5 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

If I add a locally embedded Swift Package that comes with a unit test target, I'd like to be able to add the test target to the app scheme to be able to run all unit tests in one swoop. Like this:

packages:
  BarPackage:
    path: ../BarPackage
targets:
  FooApp:
    scheme:
      testTargets:
        - FooApp-Tests
        - BarPackageTests

Currently this results in an error:

Spec validation error: Target "FooApp" scheme has invalid test "BarPackageTests"

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

Reproduce the validation error with a locally embedded Swift package containing a unit test target and the shown scheme configuration. Start by tracing scheme test-target validation, then verify that BarPackageTests can be included alongside FooApp-Tests and that the generated scheme runs both test targets.

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.