)]}'
{
  "commit": "0b8ab6c71efb23845cfab57a588ac902bc6ad5aa",
  "tree": "1fcf3a97f4db6cdf61bc5e48b7bcb00431729530",
  "parents": [
    "8bb664ebb09f271a6cc2996e401d8ae9ebdef478"
  ],
  "author": {
    "name": "David Ostrovsky",
    "email": "david@ostrovsky.org",
    "time": "Mon Aug 31 15:28:02 2026 +0200"
  },
  "committer": {
    "name": "David Ostrovsky",
    "email": "david@ostrovsky.org",
    "time": "Mon Aug 31 15:42:21 2026 +0200"
  },
  "message": "Mark war-provided libraries as neverlink inside the Gerrit tree\n\nWhen Gitiles is built as a Gerrit plugin from source, the plugin jar was\npackaging the full transitive closure of libraries that Gerrit already\nships in gerrit.war (Guava, Gson, Soy, ICU4J, JGit, commons-lang3/io,\ntext/reload4j/flogger, ASM, html-types, ...). That inflated gitiles.jar\nto ~34 MB of classes that are already on the plugin\u0027s runtime classpath\nvia gerrit.war -- pure duplication.\n\nIntroduce lib/provided.bzl with a provided_java_library() wrapper: a\nsingle java_library whose neverlink attribute is a select() on the\nexisting @com_googlesource_gerrit_bazlets//flags:in_gerrit_tree flag.\n\nGerrit sets that flag in its .bazelrc; standalone Gitiles never does, so\nit defaults to false.\n\n* Standalone (flag false): the libraries are linked exactly as before\n  and bundled into gitiles.war -- no behavioral change, zero regression\n  risk.\n* In the Gerrit tree (flag true): they become neverlink, so their\n  classes are dropped from the plugin\u0027s runtime closure and are not\n  re-packaged into gitiles.jar. Gerrit already provides them.\n\nOnly libraries that gerrit.war actually ships are converted (lib/BUILD,\nlib/soy, lib/flogger). Gitiles-only libraries (the commonmark family,\njava-prettify and autolink) stay linked in both configurations.\n\nAlternative considered: exclude the same closure with deploy_env from\nwithin the Gerrit plugin\u0027s BUILD (the pattern used by other plugins). We\ndefer that here because in_gerrit_tree is more principled -- Gitiles\nitself declares \"these are provided when I\u0027m built inside Gerrit,\" so\nthe knowledge lives with the dependency declarations instead of being\nduplicated as an exclusion list in Gerrit\u0027s plugin wiring. deploy_env\nremains a viable follow-up if we later prefer to keep this decision\nentirely on the Gerrit side.\n\nChange-Id: I4f12d3a4be71a89df8830ecc872877f869997a8c\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bd8b90af9495ed5e087a88251f47ce27c3607550",
      "old_mode": 33188,
      "old_path": "lib/BUILD",
      "new_id": "3fd40f79368af3947097d105114d4108981ff912",
      "new_mode": 33188,
      "new_path": "lib/BUILD"
    },
    {
      "type": "modify",
      "old_id": "57c6e5afbecaed865fd19287d119461d26456216",
      "old_mode": 33188,
      "old_path": "lib/flogger/BUILD",
      "new_id": "e48dd3394e6e76ceaafd250318e59581beab6bdb",
      "new_mode": 33188,
      "new_path": "lib/flogger/BUILD"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "89d3712954ae6fea37fddcf6ba7c86c0e27a8752",
      "new_mode": 33188,
      "new_path": "lib/provided.bzl"
    },
    {
      "type": "modify",
      "old_id": "3b08e296683d2d9c570751d69b3f66a3d3847155",
      "old_mode": 33188,
      "old_path": "lib/soy/BUILD",
      "new_id": "ca6fdb4a08b722b08bbd0450da9a0c784d2c9745",
      "new_mode": 33188,
      "new_path": "lib/soy/BUILD"
    }
  ]
}
