)]}'
{
  "commit": "b9762ddb486864c29cca3aeefc30fbf391e86f14",
  "tree": "575d956e709e2e344387fe320bbe5a0bd1b84c19",
  "parents": [
    "84d21c8d7e8adb9d99115797387c8d92c68917c0"
  ],
  "author": {
    "name": "brandjon",
    "email": "brandjon@google.com",
    "time": "Tue Dec 16 12:32:57 2025 -0800"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Dec 16 12:34:36 2025 -0800"
  },
  "message": "Move validation of one-annotation-per-symbol to `TypeResolver`\n\nThis undoes some complication in the resolver by removing the `hasType` parameter to `bind()`. Now, the resolver is agnostic to where type annotations occur, and it\u0027s the type resolver\u0027s responsibility to complain when an annotation appears somewhere other than the first binding occurrence of a symbol.\n\nThis makes the story around `DefStatement` simpler. All defs are considered to annotate a `Callable` type to the function identifier, so redefining a function is simply disallowed when running the type resolver. We also get to remove an edge case around illegally reusing param names in the same function signature, since this error would cause the AST to not make it to the type resolver anyway.\n\nThis also simplifies the implementation of how we decide whether the annotation is at the first binding occurrence. Before, we were basing it on the resolver\u0027s internal state. Now we\u0027re just checking the `Binding#first` field to see whether it matches the `Identifier` being visited.\n\nThe entry point to the `TypeResolver` now no longer throws an exception when errors exist. The caller checks that, just like for `Resolver`.\n\nMoved relevant test cases from `ResolverTest` to `TypeResolverTest` and simplified some of them. Also added a test for attempting to annotate a loaded global (not shadowed) symbol.\n\nUpdated `StarlarkTypesTest` to simplify the detection of whether or not the type resolver ran, based on bad annotations rather than function redefinitions. Also simplified assertion logic in that file to use better primitives. (Previously we were intercepting an `AssertionError` thrown by the `failFastHandler` in some test cases.)\n\nWork toward #27728.\n\nPiperOrigin-RevId: 845389905\nChange-Id: I98a429d8d4db3a8e3208b3a60856b048bba4f4ab\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d074dd413986288893b3d4b7826eee2168d6809e",
      "old_mode": 33188,
      "old_path": "src/main/java/net/starlark/java/syntax/Resolver.java",
      "new_id": "ed0f03bec32bfd3a3b47efde12e8320b95cbe011",
      "new_mode": 33188,
      "new_path": "src/main/java/net/starlark/java/syntax/Resolver.java"
    },
    {
      "type": "modify",
      "old_id": "1a924f9432955dd0750aecdfde4fe1014e2eddc1",
      "old_mode": 33188,
      "old_path": "src/main/java/net/starlark/java/syntax/TypeResolver.java",
      "new_id": "4d26b375106a6fc3e32b6bd57f0caed9cbeacce9",
      "new_mode": 33188,
      "new_path": "src/main/java/net/starlark/java/syntax/TypeResolver.java"
    },
    {
      "type": "modify",
      "old_id": "367117c8ed1416e1829ecb38c3d71583d6679b49",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/starlark/StarlarkTypesTest.java",
      "new_id": "143a022815f273f6e369f9b6c662e89fa79ddc3f",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/starlark/StarlarkTypesTest.java"
    },
    {
      "type": "modify",
      "old_id": "a0e7ab4204ab44ddfa9b38966559ffe682f92eeb",
      "old_mode": 33188,
      "old_path": "src/test/java/net/starlark/java/syntax/ResolverTest.java",
      "new_id": "6aa4253f361184358b45d29c8a8e98b1f1457c1d",
      "new_mode": 33188,
      "new_path": "src/test/java/net/starlark/java/syntax/ResolverTest.java"
    },
    {
      "type": "modify",
      "old_id": "c6f701d8dac98eb214552f521d9d75622cc431e7",
      "old_mode": 33188,
      "old_path": "src/test/java/net/starlark/java/syntax/TypeResolverTest.java",
      "new_id": "41dd220bcbef852cbfc8fd3ed96f6d76f663c1cb",
      "new_mode": 33188,
      "new_path": "src/test/java/net/starlark/java/syntax/TypeResolverTest.java"
    }
  ]
}
