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

Convert WordPressData from Swift package to Xcode target #24194

Closed
wants to merge 8 commits into from

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Mar 12, 2025

To much Objective-C code using logic implemented elsewhere in Swift for us to be able to move the files in two separate Objective-C- and Swift- only packages.

Refer to #24166 as an experiment for this that shows the various build failure that even a partial attempt at moving some files results in.


Part of #24165

mokagio added 2 commits March 12, 2025 15:24
To much Objective-C code using logic implemented elsewhere in Swift for
us to be able to move the files in two separate Objective-C- and Swift-
only packages.

Refer to #24166 as
an experiment for this that shows the various build failure that even a
partial attempt at moving some files results in.
@mokagio mokagio added this to the 25.9 milestone Mar 12, 2025
@mokagio mokagio added the Core Data Issues related to Core Data label Mar 12, 2025
@mokagio mokagio self-assigned this Mar 12, 2025
@mokagio mokagio requested review from kean and crazytonyli and removed request for kean March 12, 2025 07:21
@dangermattic
Copy link
Collaborator

dangermattic commented Mar 12, 2025

2 Warnings
⚠️ Modules/Package.swift was changed without updating its corresponding Package.resolved. Please resolve the Swift packages as appropriate to your project setup (e.g. in Xcode or by running swift package resolve).
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@mokagio mokagio force-pushed the mokagio/wordpressdata-target branch from 65c55b2 to 9641248 Compare March 12, 2025 08:13
@mokagio mokagio force-pushed the mokagio/wordpressdata-target branch from 9641248 to 8e7bf7d Compare March 12, 2025 08:28
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 12, 2025

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr24194-4396c99
Version25.8
Bundle IDorg.wordpress.alpha
Commit4396c99
App Center BuildWPiOS - One-Offs #11651
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 12, 2025

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr24194-4396c99
Version25.8
Bundle IDcom.jetpack.alpha
Commit4396c99
App Center Buildjetpack-installable-builds #10680
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@mokagio mokagio requested a review from kean March 12, 2025 10:03
@mokagio mokagio marked this pull request as ready for review March 12, 2025 10:03
Base automatically changed from mokagio/blog-cleanup to trunk March 12, 2025 12:01
@kean
Copy link
Contributor

kean commented Mar 14, 2025

Is there something in particular worth reviewing?
Is this what we are going to go for, or are you planning to continue working towards making in a SwiftPM package? It will help to have it as an Xcode target (code completion should be better), but it will prevent it from using it from other SwiftPM packages.

@mokagio
Copy link
Contributor Author

mokagio commented Mar 18, 2025

Closing in favor of #24242 , for now at least.

Sorry @kean I had missed your comment...

Is this what we are going to go for, or are you planning to continue working towards making in a SwiftPM package? It will help to have it as an Xcode target (code completion should be better), but it will prevent it from using it from other SwiftPM packages.

The work I've been doing in #24242 is at the target level. My hope is for the target to be a small intermediate step.

First, eradicate all the dependencies between what is clearly model code and the rest of the app. To do so, it helps to not have to worry about Objective-C using code defined in Swift itself built on top of Objective-C code. This circular dependency makes moving the code out too. I've been working on it for days and I'm still not done...

Once all the code is in WordPressData, and we can work on the target in isolation and with unit tests, restructuring to remove the circular dependencies, or simply rewriting all in Swift should be much faster.

I'm 100% on board with the Swift package being the desired end state.

@mokagio mokagio closed this Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Data Issues related to Core Data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants