Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode: removed purchases-ios SPM reference #3166

Merged
merged 1 commit into from
Sep 8, 2023
Merged

Conversation

NachoSoto
Copy link
Contributor

@NachoSoto NachoSoto commented Sep 7, 2023

The project no longer depends on purchases-ios through SPM.
This was needed for 2 reasons:

  • v3LoadShedderIntegration
  • BackendCustomEntitlementsIntegrationTests

Both of these depend on RevenueCat_CustomEntitlementComputation, which is only an SPM library.

This solution allows us to build it but without having to clone the repo separately through a dependency, and instead embedding a reference to the local Package.
v3LoadShedderIntegration depended on the 3.x release, so I've simply removed it from the workspace. It can still be modified and ran directly by opening the project.

This solves at least 2 major current annoyances:

  • Compiling BackendIntegrationTests lead to compile errors because the local changes weren't seen when building RevenueCat_CustomEntitlementComputation.
  • Switching branches was always frustrating, as Xcode tried to modify RevenueCat.xcworkspace/xcshareddata/swiftpm/Package.resolved to point to the latest commit in main, sometimes even making it crash.

⚠️ This might also help with the timeouts when cloning the repo, since SPM was probably resolving our repo twice through the transitive dependency.

New setup:

Screenshot 2023-09-07 at 15 01 53

@NachoSoto NachoSoto added the build label Sep 7, 2023
@NachoSoto NachoSoto requested a review from a team September 7, 2023 21:48
The project no longer depends on `purchases-ios` through SPM.
This was needed for 2 reasons:
- `v3LoadShedderIntegration`
- `BackendCustomEntitlementsIntegrationTests`

Both of these depend on `RevenueCat_CustomEntitlementComputation`, which is only an SPM library.

This solution allows us to build it but without having to clone the repo separately through a dependency, and instead embedding a reference to the _local_ Package.
`v3LoadShedderIntegration` depended on the 3.x release, so I've simply removed it from the workspace. It can still be modified and ran directly by opening the project.
@NachoSoto NachoSoto force-pushed the purchases-spm-dependency branch from bd24ddf to af64643 Compare September 7, 2023 21:54
Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

Nice!

@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.64%. Comparing base (341f0d3) to head (af64643).
Report is 793 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3166   +/-   ##
=======================================
  Coverage   86.64%   86.64%           
=======================================
  Files         220      220           
  Lines       15742    15742           
=======================================
  Hits        13639    13639           
  Misses       2103     2103           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@NachoSoto NachoSoto merged commit 7087218 into main Sep 8, 2023
@NachoSoto NachoSoto deleted the purchases-spm-dependency branch September 8, 2023 15:58
NachoSoto pushed a commit that referenced this pull request Sep 14, 2023
**This is an automatic release.**

### Bugfixes
* Fix runtime crash in SK2TransactionListener in iOS < 15 (#3206) via
Toni Rico (@tonidero)
### Performance Improvements
* `OperationDispatcher`: add support for "long" delays (#3168) via
NachoSoto (@NachoSoto)
### Other Changes
* `Integration Tests`: add tests for ghost transfer behavior (#3135) via
NachoSoto (@NachoSoto)
* `Xcode`: removed `purchases-ios` SPM reference (#3166) via NachoSoto
(@NachoSoto)
* `Integration Tests`: another flaky failure (#3165) via NachoSoto
(@NachoSoto)
* `Integration Tests`: fix flaky test failure due to leftover
transaction (#3167) via NachoSoto (@NachoSoto)
* `Xcode 13`: removed last `Swift 5.7` checks (#3161) via NachoSoto
(@NachoSoto)
* `Integration Tests`: improve flaky tests (#3163) via NachoSoto
(@NachoSoto)
* `Codable`: improved decoding errors (#3153) via NachoSoto (@NachoSoto)
* Refactor: extract `HealthOperation` (#3154) via NachoSoto (@NachoSoto)
* `Xcode 13`: remove conditional code (#3147) via NachoSoto (@NachoSoto)
* `CircleCI`: change all jobs to use `Xcode 14.x` and replace
`xcode-install` with `xcodes` (#2421) via NachoSoto (@NachoSoto)
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.

3 participants