)]}'
{
  "commit": "eddf817bd823a90df209dfbdc2a0b2ec33b7cb77",
  "tree": "8173cd3fa9e23be8c71f9ce8c3d9464f4a8a9b08",
  "parents": [
    "c6b71e5ae73802057d700e2419b80aef1651f213"
  ],
  "author": {
    "name": "Markus Armbruster",
    "email": "armbru@redhat.com",
    "time": "Mon Aug 31 13:54:39 2015 +0200"
  },
  "committer": {
    "name": "Markus Armbruster",
    "email": "armbru@redhat.com",
    "time": "Fri Sep 04 15:47:16 2015 +0200"
  },
  "message": "qapi: Simplify error reporting for array types\n\ncheck_type() first checks and peels off the array type, then checks\nthe element type.  For two out of four error messages, it takes pains\nto report errors for \"array of T\" instead of just T.  Odd.  Let\u0027s\nexamine the errors.\n\n* Unknown element type, e.g.\n  tests/qapi-schema/args-array-unknown.json:\n\n      Member \u0027array\u0027 of \u0027data\u0027 for command \u0027oops\u0027 uses unknown type\n      \u0027array of NoSuchType\u0027\n\n  To make sense of this, you need to know that \u0027array of NoSuchType\u0027\n  refers to \u0027[NoSuchType]\u0027.  Easy enough.  However, simply reporting\n\n      Member \u0027array\u0027 of \u0027data\u0027 for command \u0027oops\u0027 uses unknown type\n      \u0027NoSuchType\u0027\n\n  is at least as easy to understand.\n\n* Element type\u0027s meta-type is inadmissible, e.g.\n  tests/qapi-schema/returns-whitelist.json:\n\n      \u0027returns\u0027 for command \u0027no-way-this-will-get-whitelisted\u0027 cannot\n      use built-in type \u0027array of int\u0027\n\n  \u0027array of int\u0027 is technically not a built-in type, but that\u0027s\n  pedantry.  However, simply reporting\n\n      \u0027returns\u0027 for command \u0027no-way-this-will-get-whitelisted\u0027 cannot\n      use built-in type \u0027int\u0027\n\n  avoids the issue, and is at least as easy to understand.\n\n* The remaining two errors are unreachable, because the array checking\n  ensures that value is a string.\n\nThus, reporting some errors for \"array of T\" instead of just T works,\nbut doesn\u0027t really improve things.  Drop it.\n\nSigned-off-by: Markus Armbruster \u003carmbru@redhat.com\u003e\nReviewed-by: Eric Blake \u003ceblake@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "36560590ba0324723c357f8d3b9e76c771a0b507",
      "old_mode": 33188,
      "old_path": "scripts/qapi.py",
      "new_id": "ac0e45e2e63808a26ca6aa918da74757d6be37e9",
      "new_mode": 33188,
      "new_path": "scripts/qapi.py"
    },
    {
      "type": "modify",
      "old_id": "7834d11bc11c5019e6f94f523be556b8096ab0cb",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/args-array-unknown.err",
      "new_id": "cd7a0f98d799a55948dd8f1bc6aff4fe44ca9cb4",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/args-array-unknown.err"
    },
    {
      "type": "modify",
      "old_id": "a41f019a52e445e5a7087a275eabfe5ce9039c30",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/returns-whitelist.err",
      "new_id": "f47c1ee7ca4a0ed05fb3bc651df094d1137dc5e9",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/returns-whitelist.err"
    }
  ]
}
