Skip to content

Move +classNameWithoutNamespaces to WordPressSharedObjC - #24164

Merged
mokagio merged 2 commits into
trunkfrom
mokagio/share-classNameWithoutNamespaces
Mar 7, 2025
Merged

Move +classNameWithoutNamespaces to WordPressSharedObjC#24164
mokagio merged 2 commits into
trunkfrom
mokagio/share-classNameWithoutNamespaces

Conversation

@mokagio

@mokagio mokagio commented Mar 7, 2025

Copy link
Copy Markdown
Contributor

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

dangermattic commented Mar 7, 2025

Copy link
Copy Markdown
Collaborator
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 crazytonyli and kean March 7, 2025 07:13
@wpmobilebot

wpmobilebot commented Mar 7, 2025

Copy link
Copy Markdown
Contributor
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

wpmobilebot commented Mar 7, 2025

Copy link
Copy Markdown
Contributor
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

kean commented Mar 7, 2025

Copy link
Copy Markdown
Contributor

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

@kean kean left a comment

Copy link
Copy Markdown
Contributor

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

mokagio commented Mar 7, 2025

Copy link
Copy Markdown
Contributor Author

@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
@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