)]}'
{
  "commit": "660070f8469cd8a80536408db98e56facbd91580",
  "tree": "453207ce6634cbf6034414d675df6996b794b121",
  "parents": [
    "d89dac5cfc572fe83a24e255f1dda922aadfc7c2"
  ],
  "author": {
    "name": "Alexandre Rostovtsev",
    "email": "arostovtsev@google.com",
    "time": "Wed Sep 16 07:05:50 2026 -0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Sep 16 11:05:50 2026 +0000"
  },
  "message": "Add cast and isinstance keywords (#1505)\n\nFinishing support for the type syntax proposed in\nhttps://github.com/bazelbuild/starlark/pull/362\n\nAfter some reflection, I think we should always parse cast/isinstance as\nkeywords (requiring 2 arguments, one of which is a value expression and\nthe other a type expression) since permitting pre-type Starlark syntax\nis likely to only lead to confusion, and would be quite difficult to get\nright.\n\nNote that this is an **incompatible change**: forms like `cast(x, y, z)`\nor `cast \u003d foo` will now be a parse error. However, in practice, I\nobserve no occurrences of `cast` or `isinstance` used as identifiers in\nany Starlark code in Google\u0027s monorepo, so I believe that it\u0027s rather\nunlikely to break anyone.\n\nStore the parsed cast/isinstance exprs as `CallExpr`-s (to avoid\ndiverging their formatting/walking/etc. support from call expressions)\nwith an enum field to mark that they are of a special kind.\n\n## Buildtools PR checklist\n\n- [X] The code in this PR is covered by unit/integration tests.\n- [X] I have tested these changes and provide testing instructions\nbelow.\n- [ ] I have either responded to, or resolved all Gemini comments on the\nPR.\n- [X] I have read Google Eng Practices on [Small\nChanges](https://google.github.io/eng-practices/review/developer/small-cls.html),\nthis PR either follows these guidelines or the description provides\nreasoning for why they can not be followed.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2c517d0fad599beb822e4bdb124adf25542629b1",
      "old_mode": 33188,
      "old_path": "build/lex.go",
      "new_id": "12b1afdd3066ae6e4adc65965dbb5c21a58a0b37",
      "new_mode": 33188,
      "new_path": "build/lex.go"
    },
    {
      "type": "modify",
      "old_id": "cdbd2713bb009cc6e9a68722d7c01ac2e61db167",
      "old_mode": 33188,
      "old_path": "build/parse.y",
      "new_id": "f123cb19856f9bd71e9ad20d4f5870f4432c5591",
      "new_mode": 33188,
      "new_path": "build/parse.y"
    },
    {
      "type": "modify",
      "old_id": "576c20b1f49925a2d9f9f14c0a932aca4d3c5dd7",
      "old_mode": 33188,
      "old_path": "build/parse.y.go",
      "new_id": "d370b0bd97e4d3e4b490f3676bc6d5af6281ab12",
      "new_mode": 33188,
      "new_path": "build/parse.y.go"
    },
    {
      "type": "modify",
      "old_id": "df7aa35dda83a17484fc16e1a0b5dd527fefbafd",
      "old_mode": 33188,
      "old_path": "build/parse_test.go",
      "new_id": "ec4bad085fdacb7a068c547e898ae43e269cbfb9",
      "new_mode": 33188,
      "new_path": "build/parse_test.go"
    },
    {
      "type": "modify",
      "old_id": "ac7718cf3c28b71f544e56c4edc5be4ce9335d1f",
      "old_mode": 33188,
      "old_path": "build/syntax.go",
      "new_id": "eb4105b0ebc6d644a9db1a5328ae803c3cd73d1b",
      "new_mode": 33188,
      "new_path": "build/syntax.go"
    },
    {
      "type": "modify",
      "old_id": "7ee7382786907d9787012f6b1c3789b9b9ae5a47",
      "old_mode": 33188,
      "old_path": "build/testdata/079.build.golden",
      "new_id": "1087dcfb03365afffa5fc8ea04f0bb102cc8539e",
      "new_mode": 33188,
      "new_path": "build/testdata/079.build.golden"
    },
    {
      "type": "modify",
      "old_id": "da0bfba0c705e724f00061b37c038dcf086aec87",
      "old_mode": 33188,
      "old_path": "build/testdata/079.bzl.golden",
      "new_id": "2957d9ef222bb57d8062d5d3471ba8f651fed272",
      "new_mode": 33188,
      "new_path": "build/testdata/079.bzl.golden"
    },
    {
      "type": "modify",
      "old_id": "098200b40d8a846a79e047c8d971471d5a7c0231",
      "old_mode": 33188,
      "old_path": "build/testdata/079.in",
      "new_id": "def03106c5e914866ff819309038cb47356b41f6",
      "new_mode": 33188,
      "new_path": "build/testdata/079.in"
    },
    {
      "type": "modify",
      "old_id": "b7db6e10f51955ac44fe6700e8fad6104c55fb29",
      "old_mode": 33188,
      "old_path": "warn/warn_bazel_api.go",
      "new_id": "792be7568fa22d3ff1bffbd0b7de4a535253805f",
      "new_mode": 33188,
      "new_path": "warn/warn_bazel_api.go"
    },
    {
      "type": "modify",
      "old_id": "e9036b96c543a3109a91253b4e3f15ac4adc0e11",
      "old_mode": 33188,
      "old_path": "warn/warn_bazel_api_test.go",
      "new_id": "41df3e657c5174cc99ca95eb5b850608c8bfdc38",
      "new_mode": 33188,
      "new_path": "warn/warn_bazel_api_test.go"
    }
  ]
}
