)]}'
{
  "commit": "4ac8a928e3e1703fc2e8f9399b9fdba5938e7c4d",
  "tree": "70182985888303d637060eba0b04661b5d1e7422",
  "parents": [
    "27e1907617217bf3e621b16c92b43b6bb29403e5"
  ],
  "author": {
    "name": "Fabian Meumertzheim",
    "email": "fabian@meumertzhe.im",
    "time": "Tue Dec 01 01:52:18 2026 -0800"
  },
  "committer": {
    "name": "rules_java Copybara",
    "email": "noreply@google.com",
    "time": "Tue Dec 01 01:53:27 2026 -0800"
  },
  "message": "Use providers instead of structs for `java_toolchain` tools (#397)\n\nBazel stores depsets in the fields of provider instances without their `Depset` wrapper objects, but it can\u0027t do so for structs. The tool structs of `java_toolchain` (`_javabuilder`, `_header_compiler`, `_header_compiler_direct`, `_bytecode_optimizer` and `_android_linter`) hold up to three depsets each and are retained for as long as the toolchain\u0027s configured target. Their fields stay the same, and Bazel\u0027s `JavaToolchainTool` reads them through `StructImpl`, which provider instances implement too.\n\nVerified with a heap dump of `bazel build --nobuild //src:bazel-dev` in the Bazel repo with this change overridden in, which no longer retains any `Depset` through a `struct(data, jvm_opts, tool)`.\n\n(ignore-relnotes)\n\nCloses #397\n\nCOPYBARA_INTEGRATE_REVIEW\u003dhttps://github.com/bazelbuild/rules_java/pull/397 from fmeum:java-toolchain-tool-provider d9917d12cca97b64cef439ca8e2f9a052af873ad\nPiperOrigin-RevId: 1033343641\nChange-Id: Idffbac74645ece9b2d04f9a1d5811bd51e4c56f4\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "aa982f540afb7d6f5cc0d561d04ae9a99170d5a4",
      "old_mode": 33188,
      "old_path": "java/common/rules/java_toolchain.bzl",
      "new_id": "d148e5ce5cfc87fbe369c59f4586cbf31324bb81",
      "new_mode": 33188,
      "new_path": "java/common/rules/java_toolchain.bzl"
    }
  ]
}
