Repository navigation
Conversation
dmnre
force-pushed
the
autogenerated-schemes-and-test-plans
branch
2 times, most recently
from
September 2, 2026 10:23
8d20a1f to
065d562
Compare
fixique
requested changes
Sep 7, 2026
dmnre
force-pushed
the
autogenerated-schemes-and-test-plans
branch
from
September 10, 2026 16:00
ca92a6c to
09a7d01
Compare
dmnre
marked this pull request as ready for review
September 16, 2026 08:09
fixique
reviewed
Sep 22, 2026
dmnre
force-pushed
the
autogenerated-schemes-and-test-plans
branch
from
October 7, 2026 14:07
7257ec7 to
fb29d7b
Compare
shinxey
reviewed
Oct 8, 2026
| var scheme = schemes[index] | ||
|
|
||
| if var buildAction = scheme.buildAction, !buildAction.targetSelection.isEmpty { | ||
| buildAction.targets = try buildAction.targets + resolveBuildTargets( |
Contributor
There was a problem hiding this comment.
What will happen if there are multiple instances of same target references with different options?
Preferrably, we should deduplicate targets here and keep only first instance of each target reference, so users could overwrite settings from target selection.
Contributor
Author
There was a problem hiding this comment.
I added deduplication of targets by their name in all places.
shinxey
reviewed
Oct 8, 2026
dmnre
force-pushed
the
autogenerated-schemes-and-test-plans
branch
from
October 15, 2026 09:07
fd31d61 to
a654353
Compare
dmnre
force-pushed
the
autogenerated-schemes-and-test-plans
branch
2 times, most recently
from
October 19, 2026 13:13
80386b7 to
60078df
Compare
dmnre
force-pushed
the
autogenerated-schemes-and-test-plans
branch
from
October 20, 2026 14:02
60078df to
e82a217
Compare
dmnre
force-pushed
the
autogenerated-schemes-and-test-plans
branch
from
October 20, 2026 14:48
58dbcc5 to
12eb7a5
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR reworks how Geko lets you declare schemes and test plans in your manifests. Instead of manually listing every target or hand-writing
.xctestplanfiles, you now describe a scheme with target selection scopes and let Geko resolve them into concrete targets during generation. Generated test plans become a first-class part of a scheme's test action.Declarative target selection (
targetSelection)A scheme's
BuildActionandTestActionnow accept atargetSelectionparameter. Instead of enumerating targets one by one, you declare a set of scopes and Geko fills in the targets at generation time:.all– include all build targets (build action) or all test targets (test action)..scope(platform:products:regexp:exclude:)– include only targets matching the given filters (platform, product types, name regexes, and exclusions). The filters are combined with AND.Schemes are declared in the
schemes:parameter of theWorkspaceorProjectmanifest, and the scopes are resolved against the targets of that project (or workspace).Generated test plans (
GeneratedTestPlan)Test plans are now declared on a scheme's
testActionvia.testPlans(list: [...]). Each entry is either:.file(path)– reference an existing.xctestplanfile on disk, or.generated(...)– a test plan that Geko generates duringgeko generate..generated(...)acceptsname,directory(defaults toDerived/TestPlans/<name>.xctestplan), explicittestTargets,targetSelectionscopes (the same.all/.scope(...)used by test actions),configurationsanddefaultOptionsfor fine-grained control of the generated plan, and amissingTargetPolicy(.skipTestPlan,.skipTarget, or.fail).geko test --edit-test-planA new
--edit-test-planflag was added to thegeko testcommand. When passed together with--test-plan, Geko rewrites the selected test plan so that itstestTargetscontain exactly the targets passed via--test-targets(or all available test targets if the argument is omitted), and corrects thecontainer:project paths so they are relative to the workspace. This avoids the problem where Xcode builds all test targets listed in a test plan even when only a subset is run, which previously dragged in unnecessary module builds and slowed down the build for projects with many focused targets.Related Issue
geko-tech/project-description#26
Motivation and Context
For large modular projects, manually maintaining schemes and test plans in the manifests is tedious and error-prone, and hard-coded
.xctestplanfiles become stale as targets are added or removed. Declarative target selection and generated test plans let teams define the shape of their build/test setup once and keep it in sync automatically: targets that match a scope are picked up when they are added and dropped when they are removed.The
--edit-test-planflag solves a specific pain point: Xcode builds every test target present in a test plan even when-only-testingrestricts which tests actually run. Extra test targets could pull in extra module builds (mocks, resources, etc.), which significantly hurts build times when many targets are in the focus. Rewriting the plan so it contains only the requested test targets produces a more optimal build graph.The change also includes:
SchemeTargetSelectionResolverthat resolvestargetSelectionscopes into concrete targets at generation time, wired into the pipeline through the newSchemeScopeResolverWorkspaceMapper.ios_app_with_generated_test_planfixture demonstrating a generated plan combined with an existing plan.docs/guides/features/build_and_test/(target selection, test plan generation, scheme generation, andgeko test).Types of changes
Checklist: