)]}'
{
  "commit": "618387c6b5c1276885a2282c9609be06441bd1eb",
  "tree": "2ab155fd21c4ac40c0915f12e85624f73197019c",
  "parents": [
    "f2f5b23ea7bf95492c683c046b5e7a624364e3b7"
  ],
  "author": {
    "name": "Matt Stark",
    "email": "msta@google.com",
    "time": "Fri May 15 23:32:04 2026 +1000"
  },
  "committer": {
    "name": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue May 19 21:52:16 2026 -0700"
  },
  "message": "Implement cycle detection and circular dependency handling in `gn suggest`.\n\nWhen suggesting dependency changes, `gn suggest` now checks if the proposed\ndependency would introduce a cycle. Specifically:\n\n- Added `FindDependencyPath` to trace the shortest path of dependencies\n  between targets.\n- If adding the dependency from target A to target B would create a loop\n  (because B already transitively depends on A), a warning is printed to\n  trace the cycle.\n- If any target in the cycle utilizes `allow_circular_includes_from`,\n  warns the user that this is bad style and prints a suggestion template\n  demonstrating how to refactor the target (e.g., by splitting it into\n  a `source_set` for compilation units and a target for dependencies).\n- Added corresponding unit tests in `command_suggest_unittest.cc` to verify\n  the warning messages and suggestion templates.\n\nBug: 500845363\nChange-Id: I2d3bf67372073f1aed9c3b1ae6d5a59b6a6a6964\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/22780\nCommit-Queue: Matt Stark \u003cmsta@google.com\u003e\nReviewed-by: Takuto Ikuta \u003ctikuta@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a1e71cb17734d7edb8e32d7e3525de909c156680",
      "old_mode": 33188,
      "old_path": "src/gn/command_suggest.cc",
      "new_id": "9b7ca281ae7b2f47950ee13ce52bf66331b922e1",
      "new_mode": 33188,
      "new_path": "src/gn/command_suggest.cc"
    },
    {
      "type": "modify",
      "old_id": "5f9e8e164f42a3b0c145fcb01400b99b614cb81e",
      "old_mode": 33188,
      "old_path": "src/gn/command_suggest_unittest.cc",
      "new_id": "edf342d6e498ef734d52412e934ee47b37db7216",
      "new_mode": 33188,
      "new_path": "src/gn/command_suggest_unittest.cc"
    }
  ]
}
