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

Move +classNameWithoutNamespaces to WordPressSharedObjC #24164

Merged
merged 2 commits into from
Mar 7, 2025

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Mar 7, 2025

I've been trying to move the Core Data model to WordPressData but got bogged with an NSArray element failed to match the Swift Array Element type exception — More details in #24166.

Given that work is still in progress, I thought we could at least merge this pre-condition change to move (actually duplicate for migration convenience) the classNameWithoutNamespaces method on NSObject that the models use to create their NSFetchRequest.

public class BloggingPrompt: NSManagedObject {
@nonobjc public class func fetchRequest() -> NSFetchRequest<BloggingPrompt> {
return NSFetchRequest<BloggingPrompt>(entityName: Self.classNameWithoutNamespaces())
}

@dangermattic
Copy link
Collaborator

dangermattic commented Mar 7, 2025

1 Warning
⚠️ 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).

Generated by 🚫 Danger

@mokagio mokagio added this to the 25.9 milestone Mar 7, 2025
@mokagio mokagio added the Core Data Issues related to Core Data label Mar 7, 2025
@mokagio mokagio requested review from kean and crazytonyli March 7, 2025 07:13
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 7, 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 Numberpr24164-57a9e60
Version25.8
Bundle IDorg.wordpress.alpha
Commit57a9e60
App Center BuildWPiOS - One-Offs #11609
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 7, 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 Numberpr24164-57a9e60
Version25.8
Bundle IDcom.jetpack.alpha
Commit57a9e60
App Center Buildjetpack-installable-builds #10640
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

Base automatically changed from mokagio/wordpress-data-skeleton to trunk March 7, 2025 07:52
@kean
Copy link
Contributor

kean commented Mar 7, 2025

Hey Gio, did you mean to base it off trunk? It seems to include other changes.

Copy link
Contributor

@kean kean left a comment

Choose a reason for hiding this comment

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

Going to approve it to make it mergable once the commit history is updated.

@mokagio
Copy link
Contributor Author

mokagio commented Mar 7, 2025

@kean this was stacked on top of #24153 but the squash and merge of that into trunk messed up the history here

image

I'll rebase and we should be good. Thanks for the preemptive approval.

@mokagio mokagio force-pushed the mokagio/share-classNameWithoutNamespaces branch from 81890b9 to 57a9e60 Compare March 7, 2025 20:56
@mokagio mokagio enabled auto-merge March 7, 2025 21:09
@mokagio mokagio added this pull request to the merge queue Mar 7, 2025
Merged via the queue into trunk with commit a389ae8 Mar 7, 2025
25 checks passed
@mokagio mokagio deleted the mokagio/share-classNameWithoutNamespaces branch March 7, 2025 21:51
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