)]}'
{
  "commit": "64f9d62b9f33ac0713d24eaa84dfd76260bb6e5a",
  "tree": "c87227fcaa55007ef000492c8bfa9f51acf1298b",
  "parents": [
    "c8e8b3b194e027571c75a696796901b5e2f6a31a"
  ],
  "author": {
    "name": "Alan Donovan",
    "email": "adonovan@google.com",
    "time": "Mon Jan 30 12:32:11 2023 -0500"
  },
  "committer": {
    "name": "Alan Donovan",
    "email": "adonovan@google.com",
    "time": "Tue Feb 14 22:08:02 2023 +0000"
  },
  "message": "gopls/internal/lsp/source/rename: use incremental algorithm\n\nThis change is a reimplementation of the renaming operation so\nthat it no longer mixes types.Objects from different packages.\nThe basic approach is as follows.\n\nFirst, the referenced object is found and classified. If it is\nnonexported (e.g. lowercase, or inherently local such as an\nimport or label, or within a function body), the operation is\nlocal to that package and is carried out essentially as before.\n\nHowever, if it is exported, then the scope of the global search\nis deduced (direct for package-level var/func/const/type,\ntransitive for fields and methods). The object is converted to an\nobjectpath, and all the reverse dependencies are analyzed, using\nthe objectpath to identify the target in each package.\n\nThe renameObject function (the entry point for the fiddly renamer\nalgorithm) is now called once per package, and the results of all\ncalls are combined.\n\nBecause we process variants, duplicate edits are likely. We sort\nand de-dup at the very end under the assumption that edits are\nwell behaved. The \"seen edit\" tracking in package renaming is no\nlonger needed.\n\nAlso:\n- Package.importMap maps PackagePath to Package for all dependencies,\n  so that we can resolve targets identified by (PackagePath,\n  objectpath) to their objects in a different types.Importer \"realm\".\n  It is materialized as a DAG of k/v pairs and exposed as\n  Package.DependencyTypes.\n- The rename_check algorithm (renamer) is now applied once to each\n  package instead of once to all packages.\n- The set of references to update is derived from types.Info, not the\n  references operation.\n\nStill to do in follow-ups:\n- Method renaming needs to expand the set of renamed types (based on\n  \u0027satisfy\u0027) and recompute the dependencies of their declarations,\n  until a fixed point is reached. (Not supporting this case is a\n  functional regression since v0.11.0, but we plan to submit this\n  change to unblock foundational progress and then fix it before the\n  next release. See golang/go#58461)\n- Lots of generics cases to consider (see golang/go#58462).\n- Lots more tests required. For golang/go#57987.\n\nChange-Id: I5fd8538ab35d61744d765d8bd101cd4efa41bd33\nReviewed-on: https://go-review.googlesource.com/c/tools/+/464902\nTryBot-Result: Gopher Robot \u003cgobot@golang.org\u003e\nReviewed-by: Robert Findley \u003crfindley@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b8d7d0298d5935677d506cdcc5b0606f577cfdf2",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/cache/check.go",
      "new_id": "86e086f7085a0161ca73a41cf48bb8e6ce1bb459",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/cache/check.go"
    },
    {
      "type": "modify",
      "old_id": "bb4823c0326b05d4853c12c05afaaadce42bc27f",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/cache/pkg.go",
      "new_id": "8c45948480070c4ee56a87450bbbf90389062249",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/cache/pkg.go"
    },
    {
      "type": "modify",
      "old_id": "956fb59059b8b34457f5df3148d770c8e7f6cd03",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/cmd/test/integration_test.go",
      "new_id": "dd4f0ff821bb7866271c959214fee4504f408271",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/cmd/test/integration_test.go"
    },
    {
      "type": "modify",
      "old_id": "e59a5bda3e03977bbed8b19bac0ec6d3b7dd39d5",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/lsp_test.go",
      "new_id": "81e2600bda4699a392fa4fd7563316c61c0b69e0",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/lsp_test.go"
    },
    {
      "type": "modify",
      "old_id": "359d9acd0118e18d36bc7ede1bf0306e0cf96a66",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/rename.go",
      "new_id": "7111e92dcf2c2e928d2dbfe698e28805439a3bdc",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/rename.go"
    },
    {
      "type": "modify",
      "old_id": "e579ab056a68b2cb573dfd16a770ba473a638dc1",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/source/references2.go",
      "new_id": "c612f5111e34d6c556d45ee0618cf23b5069175c",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/source/references2.go"
    },
    {
      "type": "modify",
      "old_id": "7b00f88fc1a2f1b134925cb6eb3a2b20d8f51d69",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/source/rename.go",
      "new_id": "63c6b7f31937e50485872b7e61152aa0118fe019",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/source/rename.go"
    },
    {
      "type": "modify",
      "old_id": "69b0c4a43827ccfc740aac0e0d81e68d73b4f58b",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/source/rename_check.go",
      "new_id": "a858bb7faaf4a9d384c8beb14e585f5a8a98e7b7",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/source/rename_check.go"
    },
    {
      "type": "modify",
      "old_id": "c15bce53b8dad10902efa796cb8f80c00ffc4944",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/source/view.go",
      "new_id": "54e59be589af202ea3bf940ce214dd1832f6a270",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/source/view.go"
    },
    {
      "type": "modify",
      "old_id": "36c6d39d0e81b60c48afca81595d2eae749cec55",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/testdata/rename/b/b.go.golden",
      "new_id": "add4049cd98ef9940fcd8ad4bc745b7cf4e49209",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/testdata/rename/b/b.go.golden"
    },
    {
      "type": "modify",
      "old_id": "ba5cf7ae8e08806126fde926cc638fc1922075e2",
      "old_mode": 33188,
      "old_path": "gopls/internal/regtest/misc/rename_test.go",
      "new_id": "ebb02609db98f9c6ae4810a7ac7fe242bdf1d9aa",
      "new_mode": 33188,
      "new_path": "gopls/internal/regtest/misc/rename_test.go"
    }
  ]
}
