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

Merge Swift42 branch changes #385

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Merge Swift42 branch changes #385

wants to merge 26 commits into from

Conversation

atomicbird
Copy link
Collaborator

Summary of Changes

This incorporates a variety of updates to generated Swift code. Objective-C generated code is not affected by this PR. Changes are listed in the updated README and below.

This does not include Codable support for NSManagedObject subclasses, which has been shelved for now.

Addresses

  • [NEW] Update Swift templates for better Swift style (Aleksandar Vacić)

  • [FIX] Fixed invalid call of NSManagedObject.fetchRequest() (Vincent Esche)

  • [NEW] Add support for URI and UUID attribute types (Trevor Squires)

  • [NEW] Expose information when custom type is set through userInfo (Aleksandar Vacić)

  • [NEW] Add Codable property support via a new attributeCodableTypeName user info key (Tom Harrington)

  • [CHANGE] Nullability annotations for generated primitive accessors (Michael Babin)

  • [FIX] Support for “Uses Scalar Type” (Rok Gregorič)

  • [FIX] Swift 3 NSData to Data (Christopher Rogers)

  • [FIX] Add specialized fetchRequest() func to Swift's machine generated files (0xpablo)

  • [FIX] Correct Swift machine template for singleton (fetchOne…) fetch request results (Warren Burton)

  • [FIX] Expose allAttributes and allRelationships (Trevor Squires)

radianttap and others added 26 commits November 12, 2016 23:06
* Don’t import C style headers in Swift code
* Add a space between “public” and “private(set)” to avoid “publicprivate” in code.
* Don’t declare “open” items in public extension
* Use “entityName” instead of “entityName()”
@dginsburg
Copy link

👋🏻 Hi, what's the status on this PR? I'm building it locally and the generated code is working well though it has warnings with Swift 5.

If you're still planning on doing merges I can take a stab at updating the templates for Swift 5 and submitting a PR.

@atomicbird
Copy link
Collaborator Author

Hi @dginsburg! This PR is more or less ready to merge, I've just been needing someone to test it. If it seems good to you, that's probably all we need. I'll get things moving this week.

@dginsburg
Copy link

I'm happy you feel it's good enough to merge, but you may not want to base that on my experience. I mean it's been fine but this is for a new project and my usage has been basic.

@maxwoodhams
Copy link

Is there a status update for this? Getting started on a new project and would love to use all the Swift features :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants