Skip to content

Conversation

@mokagio
Copy link
Contributor

@mokagio mokagio commented May 23, 2025

Description

#15663 shows how Wormholy currently does not build with SwiftPM. This PR temporarily removes it in the interest of finishing the CocoaPods removal.

I say temporarily because, as discussed internally, we value having a library like Wormholy in the app.

I considered simply leaving the library as the only CocoaPods one. Given it's only used in the app target, it wouldn't affect the upcoming modules move work. But I think we're better off getting rid of CocoaPods sooner rather than later. This would make the setup leaner and unlock further improvements such as dropping the workspace file

Steps to reproduce && Testing information

I guess referring to green CI is enough here.

Screenshots


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 23, 2025

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Number30050
VersionPR #15668
Bundle IDcom.automattic.alpha.woocommerce
Commita5f6224
Installation URL60glsvcsr57ro
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Base automatically changed from ainfra-216-migrate-woocommerce-ios-from-cocoapods-to-spm to trunk May 23, 2025 09:26
handler: nil
)
)
present(alert, animated: true, completion: nil)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2025-05-23 at 7 26 53 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it wouldn't be better to completely remove all the references to Wormholy completely, including such code, instead.

My rationale is that, while I got that the team values having a network debugging tool that's embedded directly within the app, given the current compatibility issues between Wormholy and SPM to only enable it in debug, and that we don't know if they're ever gonna be resolved (and even if we do, no idea how long it'll take until we find a compatible solution):

  • Maybe once we get back to this topic of having a network debugging tool in-app, we'll end up choosing an alternative library to Wormholy, one that provides similar features but is compatible with how we want to integrate in the project with SPM
  • Maybe, as much as the team wishes to have such a tool in the codebase, we'll never find a satisfying solution in SPM's world for that, and that legacy code will thus be left to rot and pollute the codebase with dead code; not ideal for maintenance mid-to-long term.
  • Even if we were to find a solution to integrate Wormholy back into the codebase via SPM, one could just revert this PR, to restore all the Swift code related to Wormholy's integration to speed up the future re-integration of that package via SPM.

I mean, git is exactly made for this (ability to revert changes), so might as well clean things up anyway.

@mokagio mokagio added this to the 22.5 milestone May 23, 2025
@mokagio mokagio added the category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. label May 23, 2025
@mokagio mokagio self-assigned this May 23, 2025
@mokagio mokagio requested review from a team May 23, 2025 09:29
@mokagio mokagio marked this pull request as ready for review May 23, 2025 09:30
Copy link
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

I considered simply leaving the library as the only CocoaPods one. Given it's only used in the app target, it wouldn't affect the upcoming modules move work. But I think we're better off getting rid of CocoaPods sooner rather than later. This would make the setup leaner and unlock further improvements such as dropping the workspace file

Agreed 👍


Approving to unblock; though I'd suggest to just completely remove all the Wormholy-related code instead of keeping the entry and replacing it with an alert, as we can always git-revert if we end up integrating it again with SPM (or not, if we go with a different network-debugging package after all)

handler: nil
)
)
present(alert, animated: true, completion: nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it wouldn't be better to completely remove all the references to Wormholy completely, including such code, instead.

My rationale is that, while I got that the team values having a network debugging tool that's embedded directly within the app, given the current compatibility issues between Wormholy and SPM to only enable it in debug, and that we don't know if they're ever gonna be resolved (and even if we do, no idea how long it'll take until we find a compatible solution):

  • Maybe once we get back to this topic of having a network debugging tool in-app, we'll end up choosing an alternative library to Wormholy, one that provides similar features but is compatible with how we want to integrate in the project with SPM
  • Maybe, as much as the team wishes to have such a tool in the codebase, we'll never find a satisfying solution in SPM's world for that, and that legacy code will thus be left to rot and pollute the codebase with dead code; not ideal for maintenance mid-to-long term.
  • Even if we were to find a solution to integrate Wormholy back into the codebase via SPM, one could just revert this PR, to restore all the Swift code related to Wormholy's integration to speed up the future re-integration of that package via SPM.

I mean, git is exactly made for this (ability to revert changes), so might as well clean things up anyway.

@mokagio
Copy link
Contributor Author

mokagio commented May 25, 2025

Thanks @AliSoftware ! You put into words the feeling I had when looking at my inconsistent diff, where some of the code was removed and other commented.

I have a Linear project for the followup https://linear.app/a8c/project/re-introduce-network-logger-in-woocommerce-ios-22394768b3b5 . I'll remove the remaining code and add a line about this PR as a source to reintroduce the code to toggle Wormholy in the project.

@mokagio mokagio force-pushed the ainfra-409-migrate-wormholy-from-cocoapods-to-spm-in-woocommerce-ios branch from 0701251 to a5f6224 Compare May 25, 2025 21:35
@mokagio
Copy link
Contributor Author

mokagio commented May 25, 2025

Just a screenshot with the result of the updates to the settings screen removing the Wormholy entry:

Screenshot 2025-05-26 at 7 35 08 AM

A search now only returns entries in the localizations, plus one in the licenses file. I thought the latter was generated automatically, but I can't find the script. I'm chasing that down... Track via https://linear.app/a8c/issue/AINFRA-617

@mokagio mokagio merged commit b56f78c into trunk May 25, 2025
13 checks passed
@mokagio mokagio deleted the ainfra-409-migrate-wormholy-from-cocoapods-to-spm-in-woocommerce-ios branch May 25, 2025 23:08
mokagio added a commit that referenced this pull request Jun 17, 2025
mokagio added a commit that referenced this pull request Jun 18, 2025
mokagio added a commit that referenced this pull request Jun 19, 2025
mokagio added a commit that referenced this pull request Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants