autogen icon indicating copy to clipboard operation
autogen copied to clipboard

Rewrite autogen in Python to support complex new features

Open mbrukman opened this issue 7 years ago • 0 comments

We have existing feature requests (see issue #23 and issue #46) which require non-trivial implementation changes. Adding support for configuration may well require embedding inline Python code into the autogen shell script. Implementing UTF-8 BOM support is even more complex.

It is time to rewrite Autogen in an actual programming language rather than keep extending a shell script to handle more functionality. The current proposal on the table is Python, because it will not require compilation and will thus be easy to use in the same way that the shell script is, by referencing license boilerplate in relative directories, without running any additional commands.

For reference, see the Google shell style guide:

Shell should only be used for small utilities or simple wrapper scripts.

While shell scripting isn't a development language, it is used for writing various utility scripts throughout Google. This style guide is more a recognition of its use rather than a suggestion that it be used for widespread deployment.

Some guidelines:

  • [...]
  • If you are writing a script that is more than 100 lines long, you should probably be writing it in Python instead. Bear in mind that scripts grow. Rewrite your script in another language early to avoid a time-consuming rewrite at a later date.

mbrukman avatar Sep 12 '17 22:09 mbrukman