Allow `XCSkipTests` to run Gradle without `--rerun-tasks`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- swift
- Domain
- build-system, testing
Research direction
Start by reading XCGradleHarness and compare its Gradle invocation with gradleExec, which already sets rerunTasks: false; also check how the harness selects test tasks. Determine whether incremental compilation handles changes in symlinked peer modules, while ensuring tests still run when Gradle would mark them UP-TO-DATE. Done when an opt-in setting controls task reruns and the tests execute without forcing library recompilation.
Written by the indexing model from the issue text.
Description
XCGradleHarness always passes --rerun-tasks to Gradle. So every swift test compiles SkipLib, SkipFoundation, SkipModel and SkipUI again from scratch, even when I only changed one file in my app.
In my app (about 320 tests, Skip 1.9.20, Gradle 9.8):
| Run | Time |
|---|---|
XCSkipTests |
125 s |
Same gradle testDebug command without --rerun-tasks, after a one-file change |
32 s |
About 30 s of each run is the tests themselves. The rest is compiling the Skip libraries again.
gradleExec already uses rerunTasks: false, so the switch exists. The test harness just doesn't use it.
Two questions:
- Is there a reason the tests need
--rerun-tasks? Maybe Gradle misses changes in the symlinked peer modules? - How about an opt-in env var, like
SKIP_GRADLE_RERUN_TASKS=NO, next toSKIP_GRADLE_VERBOSE? Happy to send a PR.
One catch: with no changes, Gradle marks the test task UP-TO-DATE and doesn't run it. So the harness would still need to force the tests themselves, for example with :Module:testDebugUnitTest --rerun, and keep the compiling incremental.
- Dominant language
- Swift
- Stars
- 3.3k
- Forks
- 115
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from skiptools/skip
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
enhancement project
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
skiptools/skip#673 · 1 reaction ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
🎉 Add MPP ViewerOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
jaywcjlove/awesome-mac#4728 ·
Maintainers usually reply within 1 day
-
compiler diagnostics quality ownership SIL ownership
Difficulty 1/5 Under an hour Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
T-Defect
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
element-hq/element-x-ios#6536 ·
Maintainers usually reply within 1 day
-
fxios-coreexperience
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mozilla-mobile/firefox-ios#36661 ·
Maintainers usually reply within 1 day