-
Notifications
You must be signed in to change notification settings - Fork 737
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
CoreData: Change fetchRequest to makeFetchRequest #726
Conversation
Hey 👋 I'm Eve, the friendly bot watching over SwiftGen 🤖 Thanks a lot for your contribution! Seems like everything is in order 👍 You did a good job here! 🤝 Generated by 🚫 Danger |
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.
You'll need to apply the same change to the swift 4 template.
I'm not 100% certain what the naming conventions are, and am very bad at it myself, so unless there's a better suggestion, let's go with createFetchRequest()
.
Yeah I'm not sure on whether this is the correct name for the method either, it was either this or |
@davidrothera thx for the quick PR! Maybe we can avoid this being a breaking change, if we keep the old method name, and add a new method @available(*, deprecated, renamed: "createFetchRequest", message: "To avoid collisions with the less concrete method in `NSManagedObject`, please use `createFetchRequest()` instead.")
@nonobjc internal class func fetchRequest() -> NSFetchRequest<SecondaryEntity> {
return NSFetchRequest<SecondaryEntity>(entityName: entityName)
}
@nonobjc internal class func createFetchRequest() -> NSFetchRequest< SecondaryEntity > {
return NSFetchRequest<SecondaryEntity>(entityName: entityName)
} |
Thanks for the suggestion, yeah I would always prefer not having to break backwards compatibility. I'll get this changed shortly 👍 |
I've added the method back in along with a deprecation notice, I updated the |
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.
So we also need to update:
- swift 4 docs
- readme usage example code
- playgrounds page code
Changelog location is ok for now, we can always move it later if really needed. |
Hey @djbe, have you had chance to look over the latest changes you requested? |
Allright, seems like those last changes cover everything. One unfortunate bit is that I read through the API design guidelines:
So it should become |
Good find and nice to know, there are probably some places in my own code which I should clean up in that case as well 😝 |
Ok should be good to go now @djbe |
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.
Nice, thx for the update!
I'm approving this now, but not merging it yet, as we still need to release 6.2.1. Depending on how that release goes, we may need a 6.2.2. After all that, this can be merged for 6.3.0.
Fixes #725
Technically I can see this as a breaking change so added as such in the
CHANGELOG