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

Refactoring to ease the way we define generated code #22

Open
wants to merge 157 commits into
base: develop
Choose a base branch
from

Conversation

netbe
Copy link
Contributor

@netbe netbe commented Apr 15, 2014

Let's make it easier to define generated code via template. The approach is to use mustache template.

  • use a template files (meaning code complexity can be handled by developer/user)
  • document syntax for template (see template keys)
  • easy to install via homebrew or pypi
  • can use a given set of template files
  • document templates wiki

netbe and others added 30 commits October 13, 2013 21:09
getCommonDescriptionString and getHeaderDescriptionString
Given a simple scheme, diff between generated files and expected files
Use second template for source.m
Assuring code functionality while refactoring
@netbe
Copy link
Contributor Author

netbe commented May 20, 2014

@SanggeonPark i think this pull request need some review from you or anybody else.
@WarrenFaith for now the java remains the same, will basically just need an Android template to be wrote at some points. Also any inputs welcomed :)

@netbe
Copy link
Contributor Author

netbe commented Dec 16, 2014

@sinnerschrader-mobile/owners what should we do guys with this PR, merge?

S2MBO and others added 9 commits March 9, 2015 15:22
All tests have failed since 2015-01-01 because the timestamp at the copyright notice of the generated files differs from the timestamp of reference file's copyright notice which is of 2014.

This is fixed by replacing all occurences of the current year in the generated files with "2014". Keep in mind that even new reference files need a timestamp of 2014 for the tests to work.
Fixing tests broken due to copyright timestamp
* Removed "target" option from command line.
* Deleted JavaCodeGenerator because it is not needed anymore.
Android code generation using Mustache templates
@netbe
Copy link
Contributor Author

netbe commented Mar 19, 2015

Todo before merging:

@ben-efiz something else missing before merging to master?

@ben-efiz
Copy link
Contributor

That should be enough. The rest we track issues/enhancments. @S2MBO you had some on your wishlist.

@S2MBO
Copy link

S2MBO commented Mar 19, 2015

Maybe we should give a thought about the differences between https://github.com/sinnerschrader-mobile/metaJSON/blob/907a400817bd526d71e3c0c5078f400764542e91/doc/MetaJSONProtocol.md and https://github.com/sinnerschrader-mobile/metaJSON/wiki/Protocol.

For example, merging this right now would remove the ISO 8601 formatted date feature for ObjectiveC (was never implemented in Java).

@netbe
Copy link
Contributor Author

netbe commented Mar 19, 2015

Yes you're right, I was not really keen on adding this ISO8601 support at least not that way. I mean then we will need the subType iso8601 in the protocol and in the template.

If I remember it was for one project only, in that case with the new version, you would create your own template and replace the code for normal dates with one for iso8601.

Worst case I would add it as enhancement.

@netbe
Copy link
Contributor Author

netbe commented Mar 20, 2015

FYI I added the repo to a code static analyser, here's the report for the branch: https://landscape.io/github/sinnerschrader-mobile/metaJSON/2

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.

3 participants