)]}'
{
  "commit": "cde25b3a5f510d17c71f35d7fe6a511dace4b7fc",
  "tree": "2a0b4dca8cb39e8c6a95bc4df7e32f71ae6e48de",
  "parents": [
    "22b709631a034ac104cf20eb792086d9aa34b8ad"
  ],
  "author": {
    "name": "Robert Findley",
    "email": "rfindley@google.com",
    "time": "Tue May 03 15:34:40 2022 -0400"
  },
  "committer": {
    "name": "Robert Findley",
    "email": "rfindley@google.com",
    "time": "Mon May 09 17:02:03 2022 +0000"
  },
  "message": "internal/lsp/lsppos: add helpers for mapping token positions\n\nFor use-cases that work only with token.Pos and protocol.Position, the\nspan package is unnecessarily indirect, and inefficient. It also loses\ninformation about newline termination, and handles positions within CRLF\nline endings incorrectly.\n\nThe lsppos package was written to bypass this complexity, but had\nlimited use and lacked tests.\n\nAdd tests, and an wrapper API that operates on token.Pos. Also fix\nsource.TestTokenOffset to not panic, and add a temporary exemption of\nthe new token.Offset usage.\n\nThis change also fixes position calculation in the case of empty file\ncontent. The mapper now finds position (0, 0) at offset 0 of an empty\nfile.\n\nChange-Id: I639bd3fac78a127b1c8eddad60b890449901c68c\nReviewed-on: https://go-review.googlesource.com/c/tools/+/403678\nReviewed-by: Alan Donovan \u003cadonovan@google.com\u003e\nRun-TryBot: Robert Findley \u003crfindley@google.com\u003e\ngopls-CI: kokoro \u003cnoreply+kokoro@google.com\u003e\nTryBot-Result: Gopher Robot \u003cgobot@golang.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0e7433042e8139fc16b01162a9b724d11c1e50f5",
      "old_mode": 33188,
      "old_path": "internal/lsp/lsppos/lsppos.go",
      "new_id": "35f6f13485419a90103b16d72776529a39f963f6",
      "new_mode": 33188,
      "new_path": "internal/lsp/lsppos/lsppos.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8353f9276814f7cf69b45543684d132fe5d9e5e5",
      "new_mode": 33188,
      "new_path": "internal/lsp/lsppos/lsppos_test.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0a3caed948674d1218abc1776daa901e8eb5bd8f",
      "new_mode": 33188,
      "new_path": "internal/lsp/lsppos/token.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c12d15026c7d1f2e8bbb8f29ed54b55fc91c4de1",
      "new_mode": 33188,
      "new_path": "internal/lsp/lsppos/token_test.go"
    },
    {
      "type": "modify",
      "old_id": "79da0b3adbf8c5ce067071d3715bfbd5ee2874d3",
      "old_mode": 33188,
      "old_path": "internal/lsp/source/format.go",
      "new_id": "5460ec332ca4544fb9b643e2344aa2116b3466e1",
      "new_mode": 33188,
      "new_path": "internal/lsp/source/format.go"
    },
    {
      "type": "modify",
      "old_id": "10076773a524ea036a2172d220004182ac242abc",
      "old_mode": 33188,
      "old_path": "internal/lsp/source/offset_test.go",
      "new_id": "71c7e724828279a77d3722c0faa4306e2871a68b",
      "new_mode": 33188,
      "new_path": "internal/lsp/source/offset_test.go"
    }
  ]
}
