Opened 4 years ago

Closed 3 years ago

#47490 closed update (fixed)

mogenerator: version upgrade to 1.2.8

Reported by: rsanchez.saez@… Owned by: public+macports@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: m@…, kurthindenburg (Kurt Hindenburg)
Port: mogenerator

Description (last modified by ryandesign (Ryan Schmidt))

[NEW] --v2 argument. I wanted to enable ARC by default, but decided to take it a step further (while not breaking existing scripts). The new --v2 argument is basically semantic versioning for tool arguments.

So now instead of this:

mogenerator --model MyDataModel.xcdatamodeld \
    --template-var arc=true \
    --template-var literals=true \
    --template-var modules=true

You can write this:

mogenerator --v2 --model MyDataModel.xcdatamodeld

Internally these invocations are equivalent, but new scripts and manual invocations should use the --v2 variant.

I recommend putting the --v2 in front of the rest of the arguments to call attention to the versioned context of the following arguments.

This mechanism should allow mogenerator to continue to supply sensible defaults into the future as well. Perhaps --v3 will generate Swift by default. Speaking of which…

[NEW] Experimental Swift code generation. Unfortunately basic Core Data functionality (to-one relationships) is broken on 10.9, but we can still try writing theoretically-correct Swift code. Perhaps a future version of mogenerator will supply the needed work-around code for you. (Alexsander Akers, afrederick1, Piet Brauer, rentzsch, Chris Weber, Markus Chmelar, Brent Royal-Gordon)

[NEW] Ordered relationships actually work. OMG. I have them working in a new separate OS X test app, even though mogenerator's test dir fails. I still haven't figured out why, but I'm not holding this back. (Daniel Tull, Joshua Greene, Dave Wood, Jonathan del Strother)

[NEW] Custom scalar types. Specify attributeValueScalarType for the name of the property's custom type and additionalHeaderFileName if you need to bring in an additional header file for compilation. With this, mogenerator supports C-style and JREnum-style enums. (Quentin ARNAULT)

[NEW] Remove unnecessary empty lines in the generated files. (Stephan Michels)

[NEW] Ability to forward-declare @protocols for i.e. transformable types. Specify them via a comma delimited string in the entity's user info under the attributeTransformableProtocols key. (Renaud Tircher)

[NEW] Generate *UserInfo key/value pairs as const structs. (Jeremy Foo, rentzsch)

[NEW] --template-var literals which, when enabled, generates Obj-C literals. (Brandon Williams, Thomas van der Heijden, rentzsch)

[NEW] Specify --template-var modules=true option to avoid treating #import as an import of module 'CoreData' [-Wauto-import]" warning. (Daniel Tull)

[NEW] Unsigned integers are generated when a property's minimum is set to 0 in the Xcode modeler. (Dan Pourhadi)

[NEW] Add support for setting command-line options via a JSON config file. (Simon Whitaker)

[NEW] Add file. It's now even easier to contribute to mogenerator :) (rentzsch)

[NEW] Add MIT LICENSE file to make it clear templates are under the same license. (rentzsch)

[CHANGE] Suppress generation of -setPrimativeType: method. issue 16. (rentzsch)

[CHANGE] Add a warning when skipping an attribute named 'type'. (Simon Whitaker)

[CHANGE] Add explicit atomic to sooth -Weverything. (Daniel Tull)

[CHANGE] iOS 8 changes objectID from a getter into a property, resulting in a warning. Templates updated to match. (Ryan Johnson)

[FIX] Support newly-created models when --model=*.xcdatamodeld. issue 137. (Sergey)

[FIX] Minor warning fix, 64->32 truncation, format strings. (Sean M)

[FIX] Machine headers always #imports their superentity if present. (David Aspinall)

[FIX] Fetch requests whose predicate LHS specifies a relationship. issue 15. (rentzsch)

[FIX] Don't emit empty *UserInfo structs. (Jeremy Foo 1 2)

[FIX] Don't emit empty *Attributes, *Relationships, and *FetchedProperties structs. (Daniel Tull)

[FIX] MOIDs subclass their superentity (instead of just always inheriting from NSManagedObject). (Daniel Tull)

[FIX] Don't touch aggregate include files if the content didn't change. (Stephan Michels)

[FIX] Don't attempt to #import "NSManagedObject.h" even in the face of weird (corrupted?) model files. issue 42. (rentzsch)

[TEST] Escape spaces in mogenerator build path. (Daniel Tull)

Attachments (1)

Portfile-mogenerator_1.2.8.diff (1.1 KB) - added by m@… 4 years ago.
diff -u Portfile.current Portfile > Portfile-mogenerator_1.2.8.diff

Download all attachments as: .zip

Change History (5)

comment:1 Changed 4 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)
Owner: changed from macports-tickets@… to public+macports@…
Version: 2.3.3

Changed 4 years ago by m@…

diff -u Portfile.current Portfile > Portfile-mogenerator_1.2.8.diff

comment:2 Changed 4 years ago by m@…

Cc: m@… added

Cc Me!

comment:3 Changed 3 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added

Cc Me!

comment:4 Changed 3 years ago by kurthindenburg (Kurt Hindenburg)

Resolution: fixed
Status: newclosed

update to 1.30.1 r148735

Note: See TracTickets for help on using tickets.