)]}'
{
  "commit": "40dabfa8588dfa55c3e1a503fae5302326cc4a9c",
  "tree": "d17e904451220a468c40864bc00aba770af9eb43",
  "parents": [
    "55e5cff61126558edd0ba9c5c2d06c8c29b8a499"
  ],
  "author": {
    "name": "Dylan Le",
    "email": "dungtuanle@google.com",
    "time": "Wed Aug 03 14:45:51 2022 -0400"
  },
  "committer": {
    "name": "Dylan Le",
    "email": "dungtuanle@google.com",
    "time": "Tue Oct 04 16:03:06 2022 +0000"
  },
  "message": "gopls/internal/lsp: add support for package renaming\n\nUsers can now rename packages by performing a rename on the package name in package declarations. The editor will prompt user with a dialogue text field to change the package name. This rename feature then do the following:\n- Rename all the external imports of the renaming package. In case there is renaming conflicts within a file, the feature repeatedly try fresh names constructed by appending new package name with number of try times so far until succeed.\n- Rename all the internal references to the renaming package from its files.\n- Rename the directory of the renamed package and update the imports\u0027 paths of any packages nested under the renamed directory.\n- Rename the test package with the new package name and suffix \"_test\" with the current test package name ends with \"_test\", or just the new package name otherwise.\n\nThe regression tests accounts for these edge cases:\n- Only rename other known packages if the module path is same for both the renaming package and the other known packages.\n- Prevent renaming main package.\n- Test if the renaming package name is different from its path base.\n\nTodo:\n- Add a test for the case when the renaming package\u0027s path contains \"internal\" as a segment.\n- Allow edit to the whole package path not just only the last segment of the package path\n- Reject renaming if the renamed subpackages don\u0027t belong to the same module with the renaming package\n- Check the go.mod files in the workspace to see if any replace directives need to be fixed if the renaming affects the locations of any go.mod files\n\nChange-Id: I4ccb700df5a142c3fc1c06f3e5835f0f23da1ec5\nReviewed-on: https://go-review.googlesource.com/c/tools/+/420958\nRun-TryBot: Dylan Le \u003cdungtuanle@google.com\u003e\ngopls-CI: kokoro \u003cnoreply+kokoro@google.com\u003e\nTryBot-Result: Gopher Robot \u003cgobot@golang.org\u003e\nReviewed-by: Robert Findley \u003crfindley@google.com\u003e\nReviewed-by: Alan Donovan \u003cadonovan@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "eb7e10a3ef5abacd2ed379f9f78f51aa5bc47c41",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/cmd/rename.go",
      "new_id": "5f1600384802c23baa3646a36bbc65ecf77d8f78",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/cmd/rename.go"
    },
    {
      "type": "modify",
      "old_id": "2c988ce6669f8553c194f7feb48eb802e4577cf5",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/fake/editor.go",
      "new_id": "17bec286b7d319329880760a6e0351d94a169266",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/fake/editor.go"
    },
    {
      "type": "modify",
      "old_id": "aff2f304ebdc68df986b138186b9dc3c6730c28a",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/rename.go",
      "new_id": "2d9ad69323fdc58ef3691b5dafb956a049a3133f",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/rename.go"
    },
    {
      "type": "modify",
      "old_id": "b3896802aac602eff2d326ca0314bf090e4e970e",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/source/implementation.go",
      "new_id": "4626bae5ac17ce92f22850e4bf710d7ef2f29d42",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/source/implementation.go"
    },
    {
      "type": "modify",
      "old_id": "bb4d9a843e12122e568723990b36b14214b90b6b",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/source/rename.go",
      "new_id": "d0225b52a85e9bff937284e8678f9504abb13129",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/source/rename.go"
    },
    {
      "type": "modify",
      "old_id": "1f348764cfee85492b02e6bdbf432330c659924f",
      "old_mode": 33188,
      "old_path": "gopls/internal/lsp/source/source_test.go",
      "new_id": "d899f4ffdb22417545fec3fa364b3996c6675913",
      "new_mode": 33188,
      "new_path": "gopls/internal/lsp/source/source_test.go"
    },
    {
      "type": "modify",
      "old_id": "a0447c5026dcaa299292f1b4848149e452a616f4",
      "old_mode": 33188,
      "old_path": "gopls/internal/regtest/misc/rename_test.go",
      "new_id": "1f6ee1c2b858c2d29859ccbdd69b01c56a724213",
      "new_mode": 33188,
      "new_path": "gopls/internal/regtest/misc/rename_test.go"
    }
  ]
}
