)]}'
{
  "commit": "991530ce394efb58fcd848195469022fa17ae126",
  "tree": "6dd0331ffdb6364111f9b350ce4afb08e99383f4",
  "parents": [
    "c1fc04434c8ea7d27936cc1239e59dc0eb7a379f"
  ],
  "author": {
    "name": "Mark Seaborn",
    "email": "mseaborn@google.com",
    "time": "Mon Sep 11 15:38:54 2023 -0700"
  },
  "committer": {
    "name": "GN LUCI",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue Sep 12 19:01:41 2023 +0000"
  },
  "message": "Avoid unnecessary \"Regenerating ninja files\" step after running \"gn gen\"\n\nBefore this change, if you touch args.gn, run \"gn gen\" and then run\nninja, ninja produces a \"Regenerating ninja files\" step which\nunnecessarily runs \"gn gen\" again, and this happens under conditions\nfor which this was previously fixed.\n\nThis can be reproduced in the Fuchsia build:\n\n  # Precondition: \"Regenerating ninja files\" needs to have happened\n  # once before.  This will achieve that.\n  fx set bringup.x64 --release\n  touch out/default/args.gn\n  fx build\n\n  # Immediate reproducer: With the bug, \"fx build\" produces\n  # \"Regenerating ninja files\".\n  fx set bringup.x64 --release\n  fx build\n\nThis problem arose before in issue 136 and was fixed by this change:\nhttps://gn-review.googlesource.com/c/gn/+/10400\n(\"Restat build.ninja after gen\", December 2020)\n\nHowever, that fix no longer has any effect following this change:\nhttps://gn-review.googlesource.com/c/gn/+/14200\n(\"[gn] Prevent build.ninja deletion when regeneration is interrupted\",\nAugust 2022)\n\nWe can fix this by telling Ninja to restat build.ninja.stamp instead\nof build.ninja.\n\nIdeally we would add a test case for this that tests the behaviour of\nGN and Ninja together.  As well as preventing another regression, that\nwould help with explaining the problem, since the conditions for it\nare somewhat subtle.  However, GN currently has no integration tests\nof that kind.\n\nSo ideally I would drop the restat of build.ninja, because it\u0027s not\ncurrently necessary.  I\u0027m leaving it place as a defensive measure\nbecause there is no test coverage to ensure that the restats are kept\nin sync with the rest of the code, and also because the cost of\nkeeping it is small.\n\nBug: 344\nTest: manual, see above\nChange-Id: Ifb042070710754c486541dde427c3d8bba0fa6a0\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/15940\nReviewed-by: Petr Hosek \u003cphosek@google.com\u003e\nCommit-Queue: Petr Hosek \u003cphosek@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ec4a766ce9ba1fa2fbadecb742b320633452f5f7",
      "old_mode": 33188,
      "old_path": "src/gn/command_gen.cc",
      "new_id": "5d4b75bd6d6304053d912cbd66572ce1eb16fd3d",
      "new_mode": 33188,
      "new_path": "src/gn/command_gen.cc"
    }
  ]
}
