Skip to content

Remove legacy BackendIntegrationTests targets from RevenueCat.xcodeproj#7006

Merged
facumenzella merged 2 commits into
mainfrom
facu/remove-legacy-backend-integration-targets
Jun 15, 2026
Merged

Remove legacy BackendIntegrationTests targets from RevenueCat.xcodeproj#7006
facumenzella merged 2 commits into
mainfrom
facu/remove-legacy-backend-integration-targets

Conversation

@facumenzella

@facumenzella facumenzella commented Jun 15, 2026

Copy link
Copy Markdown
Member

Motivation

After #6774 moved the backend integration tests onto RevenueCat-Tuist.xcworkspace, the matching targets in the legacy RevenueCat.xcodeproj are dead weight. This removes them, another step toward fully retiring RevenueCat.xcodeproj + RevenueCat.xcworkspace in favor of Tuist.

Description

Removes three now-unused targets from the legacy project: BackendIntegrationTests, BackendCustomEntitlementsIntegrationTests, and BackendIntegrationTestsHostApp (the last two share the host app, so they go together). Also drops the dead BackendIntegrationTests scheme and prunes the orphaned file/group references it left behind.

The test sources stay on disk, they're owned by the Tuist RevenueCatTests project now. CI already runs all backend integration test plans through the Tuist workspace, so nothing in CI references these targets anymore.

This is a partial cleanup, not full workspace deletion: RevenueCat.xcworkspace is still needed by the RevenueCat, RevenueCatUIDev, and PurchaseTester schemes.

AI session context

AI Context

Metadata

  • PR: (this PR)
  • Branch: facu/remove-legacy-backend-integration-targets
  • Author / human owner: facumenzella
  • Agent(s): Claude Code (Opus 4.8)
  • Session source: current conversation
  • Generated: 2026-06-15
  • Context document version: 1

Goal

Remove the backend-integration test targets from the legacy RevenueCat.xcodeproj/RevenueCat.xcworkspace now that #6774 routed those tests through RevenueCat-Tuist.xcworkspace, and confirm nothing in CI still needs them.

Initial Prompt

"We've merged #6774. Can we remove these test targets from RevenueCat.xcworkspace now?" Followed by: the end state is everything accessible via Tuist (RevenueCat-Tuist.xcworkspace); make sure CI has nothing that still needs the legacy targets. Cleanup scope chosen: full prune of orphaned references.

Agent Contribution

  • Verified Use Tuist workspace for BackendIntegrationTests in CI #6774 migrated the backend_integration_tests Fastlane lane + CI run-backend-tests job to the Tuist workspace, and that the 8 xctestplans repoint at RevenueCatTests.xcodeproj.
  • Determined the legacy project held three dead targets (host app shared by both test bundles).
  • Confirmed no surviving target/scheme/lane depends on them; swept .circleci/, .github/, fastlane/, scripts/, Tests/.
  • Performed the removal with the xcodeproj Ruby gem (1.27.0) rather than hand-editing the 855KB pbxproj; cleaned gem leftovers the tool doesn't GC (orphaned TargetAttributes, container proxies, build configs, Info.plist/group refs).

Human Decisions

Key Implementation Decisions

  • Decision: remove all three targets together.
    • Rationale: BackendCustomEntitlementsIntegrationTests also depends on BackendIntegrationTestsHostApp and is likewise Tuist-routed; removing the host app forces removing it.
  • Decision: use the xcodeproj gem, not manual pbxproj edits.
    • Rationale: 855KB file, references scattered across ~12 locations; gem handles them structurally.
    • Rejected: hand-editing (error-prone); deleting the whole workspace (still used by other schemes).

Files / Symbols Touched

  • RevenueCat.xcodeproj/project.pbxproj
    • Why: remove the 3 targets + orphaned file/group/config references.
    • Review relevance: the 49 + lines are pure relocations from gem reserialization (verified zero genuinely-new content); all net changes are deletions.
  • RevenueCat.xcodeproj/xcshareddata/xcschemes/BackendIntegrationTests.xcscheme
    • Why: dead scheme for the removed targets.

Dependencies / Config / Migrations

  • None. No source files deleted on disk; no package/build-config changes.

Validation

  • Commands run:
    • xcodebuild -list -workspace RevenueCat.xcworkspace: parses cleanly, BackendIntegrationTests scheme absent, all surviving schemes resolve.
    • plutil -lint project.pbxproj: OK.
    • Survivor source-file counts (HEAD vs now) via gem: all 9 targets unchanged (e.g. RevenueCat 444→444, UnitTests 369→369).
    • grep BackendIntegration project.pbxproj: 0.
    • Diff move-check (comm): 0 genuinely-new lines, all additions are relocations.
  • CI: not yet run on this branch.

Validation Gaps

Review Focus

  • Confirm CI backend-integration jobs are green (they build from the Tuist workspace).
  • Confirm no local Xcode workflow relied on the removed legacy scheme.

Risks / Reviewer Notes

  • Risk: a shared test helper could have been pruned.
    • Evidence: 19 shared files identified and kept; survivor source-file counts unchanged vs HEAD.

Non-goals / Out of Scope

  • Full deletion of RevenueCat.xcodeproj/RevenueCat.xcworkspace (still used by other schemes).

Omitted Context

  • Raw transcript, tool logs, and exploratory steps omitted.

Note

Low Risk
Xcode project/scheme-only cleanup with no source, dependency, or CI lane changes; main risk is a local workflow that still opened the removed legacy scheme.

Overview
Strips duplicate backend integration test wiring from the legacy RevenueCat.xcodeproj now that those suites run from the Tuist RevenueCatTests project (#6774).

Removed from the legacy project: BackendIntegrationTests, BackendCustomEntitlementsIntegrationTests, and shared BackendIntegrationTestsHostApp, plus the BackendIntegrationTests shared scheme and orphaned pbxproj references (groups, build configs, container proxies). Test sources on disk are unchanged—they remain referenced by Projects/RevenueCatTests/Project.swift.

RevenueCat.xcworkspace / the rest of the legacy project stay for other schemes (RevenueCat, PurchaseTester, etc.).

Reviewed by Cursor Bugbot for commit 195ef0f. Bugbot is set up for automated code reviews on this repo. Configure here.

These targets (BackendIntegrationTests, BackendCustomEntitlementsIntegrationTests,
BackendIntegrationTestsHostApp) now run via RevenueCat-Tuist.xcworkspace after #6774,
so they're dead weight in the legacy project. Also removes the dead
BackendIntegrationTests scheme and the now-orphaned file/group references.
Test source files stay on disk (owned by the Tuist RevenueCatTests project).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@facumenzella facumenzella marked this pull request as ready for review June 15, 2026 13:50
@facumenzella facumenzella requested a review from a team as a code owner June 15, 2026 13:50

@ajpallares ajpallares left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the cleanup! 🚀

@facumenzella facumenzella merged commit 8bc282e into main Jun 15, 2026
38 of 42 checks passed
@facumenzella facumenzella deleted the facu/remove-legacy-backend-integration-targets branch June 15, 2026 14:03
@facumenzella

Copy link
Copy Markdown
Member Author

Looks like the failing ones are flaky tests and an issue addressed in #7003

facumenzella added a commit that referenced this pull request Jun 19, 2026
Move test_ios/tvos/watchos/macos off the legacy RevenueCat.xcworkspace
onto RevenueCat-Tuist.xcworkspace, mirroring how #7006 migrated
BackendIntegrationTests.

- Repoint the CI test plans (CI-RevenueCat, CI-RevenueCat-Snapshots,
  CI-Snapshots, CI-AllTests) to the Tuist RevenueCatTests/RulesEngineInternal
  projects. CI-AllTests code coverage set to false (it targeted the legacy
  RevenueCat framework and is consumed nowhere in CI).
- Add a shared RevenueCatTests scheme wired to the four plans.
- Align UnitTestsHostApp deployment targets with the legacy project
  (macOS 11, tvOS 14, watchOS 7) so the scene-lifecycle host app builds.
- Point the four lanes at RevenueCat-Tuist.xcworkspace + RevenueCatTests;
  convert test_macos to scan.
- Add tuist-generate-workspace to the six CI jobs running these lanes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants