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

Default to --v2 arguments. #305

Merged
merged 2 commits into from
Sep 17, 2015
Merged

Default to --v2 arguments. #305

merged 2 commits into from
Sep 17, 2015

Conversation

justin
Copy link
Collaborator

@justin justin commented Sep 7, 2015

As part of modernizing mogenerator for a 2.0 (or whatever we call it), I’ve removed the —v2 argument and now we generate Objective-C using ARC, Objective-C literals, and modules out of the box.

There’s still some stuff I don’t like about our Objective-C code I’d like to fix. Namely, the structs for attribute names need to be marked __unsafe_unretained because ARC doesn’t support objects in a struct. I wasn’t sure of a better way to handle that without adding a bunch of extra code.

I’d also like to add nullability attributes to Objective-C where appropriate, but we can save that for another day (Patches Welcomed!)

This is obviously a breaking change, and I always opt to go fairly heavy handed on that in favor of moving the project forward. Feedback welcomed.

Justin Williams added 2 commits September 7, 2015 16:05
As part of moving to Swift and what I’m calling mogen2, we’re going to
default to generating modern Objective-C. We now  use ARC, Objective-C
Literals, and modules out of the box.
This still needs to take into account a Swift test case. That’s next.
@rentzsch
Copy link
Owner

👍 Kinda sad to see --v2 go since that was my strategy to easily allow mogenerator to support future stuff while seamlessly supporting old projects. That said, I think your direction of just dropping backwards compatibility and requiring folks just use older version is far, far, far more practical given the manpower this project has. I'd much prefer being able to address the present than support the past.

@justin
Copy link
Collaborator Author

justin commented Sep 13, 2015

My thinking was to make modern Objective-C the default for now and maintain a --swift flag as the alternative. Then someday in the future, flip those or whatever depending on how Apple treats our old bracketed language friend.

justin pushed a commit that referenced this pull request Sep 17, 2015
Default to --v2 arguments, removing the option. Sorry if you were using it.
@justin justin merged commit 6f293ff into develop Sep 17, 2015
@rentzsch rentzsch deleted the feature/v2-as-default branch March 22, 2016 18:48
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.

2 participants