Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-43187

standardize C++ codegen tools to YAML and Cheetah

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability

      Would be nice if most or all of our C++ code generators used the same tool. That tool, rather than arbitrary python generating arbitrary Cxx, could have a very fixed form similar to the generate_error_codes.py generator.

      Proposal: all inputs (if any) are yaml, which generates python objects.
      These objects are passed to Cheetah, which fills in a template file that looks a lot like a PHP template that produces Cxx. So there's not much arbitrary execution. The yaml is declarative, and the cheetah is usually very simple. There isn't a big layer of python to understand, and devs can edit these templates easily as Cxx-like files.

      Something like idlc might not need to be very big. What it's doing might very well be doable as a yaml file + Cheetah template.

      There may be some yaml->yaml transformation stages if the source yaml needs to be massaged or verified, but that's an easier program to analyze than a program that emits Cxx statements in Python code.

            Assignee:
            Unassigned Unassigned
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: