yams #134760 [diff] flawed api [open]

The main entry point of the diff feature is the schema_diff function, which takes two living schemas as well as an optional diff tool. This is IMO severly flawed:

  • if diff_tool isn't specified, the only thing done is that schema are serialized to files, which is quite unexpected wrt the function name
  • if diff_tool is specified, it's called with subprocess.Popen and output is left to stdout
  • subsequent calls to schema_diff will flood /tmp with temporary directories

I would rather expect schema_diff(schema1 schema2) to return the diff a string with proper temp files cleanup.

If desired, a command line tool or option may be provided to serialize the schema to text.

done in<not specified>
closed by<not specified>