)]}'
{
  "commit": "02cbcd2cf0ace5479e43228ffc7ceab6853d4cff",
  "tree": "0b1d3e1c504b65bdd5b6b74d1fba0235572ab1ba",
  "parents": [
    "2300e6d067858edfe2e3a8784daaab00bc841329"
  ],
  "author": {
    "name": "Greg Estren",
    "email": "gregestren@gmail.com",
    "time": "Mon Oct 19 12:15:13 2020 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Mon Oct 19 12:16:11 2020 -0700"
  },
  "message": "Implement cquery --output\u003dgraph\n\nThankfully, `query` already has most of the infrastructure necessary to make this\neasy.\n\nquery implements graph output (in `GraphOutputFormatter`) over a\n`Digraph\u003cTarget\u003e`, which is a generic graph data structure with `Target` payloads.\nAll output logic then runs over this data structure. To opt query in, all we have\nto do is create an equivalent `Digraph\u003cConfiguredTarget\u003e`, which is a simple\ntransformation from the backing graph.\n\nThis change creates a new generic class for that common logic:\n`GraphOutputWriter`. query\u0027s `GraphOutputFormatter` then becomes a simple wrapper\nover that, and the new `GraphOutputFormatterCallback` is cquery\u0027s equivalent.\n\nA few differences:\n\n - cquery output is always fully ordered (`--order_output\u003dfull`). We could match\n   this with query\u0027s controllable version, but I don\u0027t see a reason to make this\n   yet another bit to configured.\n - query output annotates edges with select() conditions. cquery doesn\u0027t do this\n   because select()s are resolved and removed from the graph after analysis. I\n   think we could annotate edges with the *chosen* condition if there was\n   demand, but that\u0027d be a followup effort.\n\nFixes https://github.com/bazelbuild/bazel/issues/10843 (for `cquery`, not `aquery`)\n\nCloses #12248.\n\nPiperOrigin-RevId: 337907070\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "acec348c93ac0ea10ed7a086ac0e569255073d07",
      "old_mode": 33188,
      "old_path": "site/docs/cquery.html",
      "new_id": "ce8ae528b32730b09c4593538dda86bee5974d32",
      "new_mode": 33188,
      "new_path": "site/docs/cquery.html"
    },
    {
      "type": "modify",
      "old_id": "74d688a6e2b61f96086f544ddfd0bd2d112898b2",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/buildtool/PostAnalysisQueryBuildTool.java",
      "new_id": "946fb5b983050b68240f868d3ab57f4aec520be2",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/buildtool/PostAnalysisQueryBuildTool.java"
    },
    {
      "type": "modify",
      "old_id": "6cee6beaefa5ed56be7cac8e2c89c51d29f34b0f",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/query2/common/CommonQueryOptions.java",
      "new_id": "d9e8af49c5ac2c5515990112a545487d7ece5c3d",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/query2/common/CommonQueryOptions.java"
    },
    {
      "type": "modify",
      "old_id": "01252d004fad16e7144b78d7075c3ea54e29ac7c",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java",
      "new_id": "595a9d10bc06fe507649120da3e78b5812175dfd",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/query2/cquery/ConfiguredTargetQueryEnvironment.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c8f474116f2fbda4f9c2df5bfd02f028ebf6e368",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/query2/cquery/GraphOutputFormatterCallback.java"
    },
    {
      "type": "modify",
      "old_id": "92279887f9c50d49997bc9b2703c33d55dd42e16",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/query2/query/output/GraphOutputFormatter.java",
      "new_id": "d27b2375c258910115b7394d64b9167de61feeb5",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/query2/query/output/GraphOutputFormatter.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5ab5514ef05e5b87ee0c3734314e094a7573f707",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/query2/query/output/GraphOutputWriter.java"
    },
    {
      "type": "modify",
      "old_id": "d9fbe4af6203bb0528cee17f52cd100a5be4ccfe",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/query2/query/output/QueryOptions.java",
      "new_id": "fc5be74b05997f2809fea67eeaf16d3ea1af98b6",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/query2/query/output/QueryOptions.java"
    },
    {
      "type": "modify",
      "old_id": "48cecfd192a901fa3283b43dd61911b06d7fa6cd",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/query2/cquery/BUILD",
      "new_id": "87c52f7acbb762f5e1add50dde8c738eb04231b9",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/query2/cquery/BUILD"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "974b6871b3124b916e762200a75838e68212a4af",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/query2/cquery/GraphOutputFormatterCallbackTest.java"
    }
  ]
}
