)]}'
{
  "commit": "c39be6c8b71edfc97a4f4b6054c8e712e551e83e",
  "tree": "548f21ed996c7c9f1839f11b8d7ab4f7a8cb86e2",
  "parents": [
    "e70d9e9e12d82890d41e4d0edcab4d722aad9ff0"
  ],
  "author": {
    "name": "wyv",
    "email": "wyv@google.com",
    "time": "Mon Aug 30 09:38:48 2021 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Mon Aug 30 09:40:46 2021 -0700"
  },
  "message": "bzlmod: create a base class for repository_ctx\n\n(https://github.com/bazelbuild/bazel/issues/13316)\n\nThis base class contains methods to be shared between repository_ctx and module_ctx. In other words, the following methods are moved from repository_ctx to the new StarlarkBaseExternalContext:\n\n* `path`: needed to traverse the file system\n* `os`: needed for OS-specific information and env variables\n* `read`: needed to read files\n* `execute`: needed to perform arbitrary operations\n* `which`: needed to locate tools on PATH\n\nThe other methods are left out because they\u0027re mostly useful for creating files, which module extensions are discouraged from (since the files created in such a way aren\u0027t accessible later, unlike those created by repo rules). We\u0027d ideally also need an \"http_get\" method later.\n\nThis CL also changes the handling of marker data in repository_ctx (now in the base class), so that instead of directly writing entries into a marker data map, we collect those entries into a separate map. After the context object is used, that separate map can then be read and processed (so repository_ctx can put it into marker data and module_ctx will likely want to write it into the lockfile).\n\nPiperOrigin-RevId: 393790084\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2d056aa3c56c3bae4a794dcb133b1805b35ae0b8",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java"
    },
    {
      "type": "modify",
      "old_id": "89c79ff016152a71f6f9931faf4b29167c79dc81",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkRepositoryContext.java",
      "new_id": "5d8efae1b32f09f91aaae0f6b0d88a0fa97ff542",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkRepositoryContext.java"
    },
    {
      "type": "modify",
      "old_id": "44c7be02e1c77f6f9cf74d69e8acddc593b6347f",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkRepositoryFunction.java",
      "new_id": "ea3cf114bf9bc448975129b37b2b9cddd42ab849",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkRepositoryFunction.java"
    },
    {
      "type": "modify",
      "old_id": "b4c07589083cc9ace07409f3527ecf977c39ba4d",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkRepositoryContextTest.java",
      "new_id": "87fb22fed905aac090d5124b3ad4102c13ffc78d",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkRepositoryContextTest.java"
    },
    {
      "type": "modify",
      "old_id": "527fe0705d50ffcef5fb730df76c35caaadef343",
      "old_mode": 33261,
      "old_path": "src/test/shell/bazel/bazel_workspaces_test.sh",
      "new_id": "8f1663f27bae5fc5b6f1913a533368a3d9b33bc3",
      "new_mode": 33261,
      "new_path": "src/test/shell/bazel/bazel_workspaces_test.sh"
    }
  ]
}
