-
Notifications
You must be signed in to change notification settings - Fork 316
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
[WIP] Separate ReceiptParser
into SPM
#2062
Conversation
Turns out this approach might not be supported: https://forums.swift.org/t/unable-to-integrate-a-remote-package-that-has-local-packages/53146/5 Might have to keep the folder structure the same, and instead expose a separate target in the main We get the same result, but I was excited about this approach because it would allow creating many more smaller SPMs that would help us keep different parts of the SDK isolated like we do in Android. |
8a93941
to
5b6d5a8
Compare
d8cb2e9
to
8966da4
Compare
8966da4
to
4be52c8
Compare
907e85b
to
1dc251b
Compare
1dc251b
to
694b009
Compare
targets: resolveTargets() | ||
targets: [ | ||
.target(name: "RevenueCat", | ||
dependencies: [.byName(name: "ReceiptParser")], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my experience, this will complicate things quite a bit.
It's a total headache to manage imports from a local package, we had something like this back in the objc days with PurchasesCoreSwift and it broke hybrids in all sorts of ways.
I think we should just have these two be independent packages, which just happen to have the same files.
If you use RC, you don't need the ReceiptParser package. If you use the ReceiptParser package, and you want to move to the full RevenueCat, you need to remove ReceiptParser and replace it with RevenueCat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One bummer with this is that SPM from Xcode might prompt you to install both by default, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should just have these two be independent packages, which just happen to have the same files.
That's a great idea, which will simplify this tremendously.
I wanted to have a call with you to discuss the approach, but thanks for providing the best path forward already :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to chat about it whenever!
New approach: #2096. |
Fixes [CSDK-17]. New approach after #2062.
Fixes [CSDK-17]. New approach after #2062.
Fixes CSDK-17
TODO:
- [ ] Create separate SPM for shared types (This would be a pain to do with CocoaPodsLogger
?)APITester
sCarthage
integration still worksREADME
ReceiptParser
tests to SPM (includeNSData+RCExtensionsTests
: improved errors #2043)Logger
outside modulerelease-checks
all pass