facebookarchive / swift

An annotation-based Java library for creating Thrift serializable types and services.
Apache License 2.0
900 stars 297 forks source link

simple CLI for swift generator #56

Closed andrewcox closed 11 years ago

andrewcox commented 11 years ago

This adds a shaded jar that can be used as a command-line tool to generate swift types & interfaces.

Other changes in this pull include:

hgschmie commented 11 years ago

The headline of that pull request is misleading... :-) The CLI is the smallest part of the changes, I consider the template changes to be much more intrusive.

The easiest way forward here might be having a Map<String, List> for the template names instead of the current Map<String, String> for TEMPLATES. But I do not like the "we always load a 'common' file.

andrewcox commented 11 years ago

Fixed the templates thing (reworked the TemplateLoader to take a set of files instead of one, so it's easy to share templates in java/common.st without baking it into TemplateLoader), and the other issues called out in the review.

dain commented 11 years ago

You should consider using Airline (https://github.com/airlift/airline) instead of JCommander for the CLI parsing. It is easier to use and maintained by me :)

hgschmie commented 11 years ago

In case I haven't said it yet: LGTM.

andrewcox commented 11 years ago

addressed remaining issues (except switching from JCommander to airline, will get to that soon) and merged