)]}'
{
  "commit": "dfe23d9d6c5d9e17be95628b6ad12f5a490f0249",
  "tree": "e3f84a36be8e29d57ebc9a4d2dcfc6ade1ec97d2",
  "parents": [
    "843f71792cb5820ca9fc98e0054ce018d5752be9"
  ],
  "author": {
    "name": "Michael Bolin",
    "email": "mbolin@fb.com",
    "time": "Sun Nov 03 15:39:33 2013 -0800"
  },
  "committer": {
    "name": "Michael Bolin",
    "email": "mbolin@fb.com",
    "time": "Mon Nov 04 11:18:09 2013 -0800"
  },
  "message": "Fix a cache corruption bug caused by including a rule\u0027s output on its classpath.\n\nSummary:\nApparently, a `java_library` was including its output JAR on the classpath when\nbuilding itself. This means that removing `srcs` from a `java_library` and then rebuilding\nthe rule would still succeed if the output JAR was still around from the previous build.\nThis would explain some rebuild issues that we have received anecdotal reports of,\nbut have not been able to reproduce.\n\nThis diff solves the bug by fixing `DefaultJavaLibraryRule.getDeclaredClasspathEntries()`\nso that its return value matches that which is required by its Javadoc:\n\n```\n/**\n * @return The set of entries to pass to {@code javac}\u0027s {@code -classpath} flag in order to\n *     compile the {@code srcs} associated with this rule.  This set only contains the classpath\n *     entries for those rules that are declared as direct dependencies of this rule.\n */\npublic ImmutableSetMultimap\u003cJavaLibraryRule, String\u003e getDeclaredClasspathEntries();\n```\n\nTest Plan:\nAdded an integration test to make sure changing the set of files in a java_library\u0027s srcs\ncauses a rebuild.\nAdded a unit test to make sure the `-classpath` argument passed to `javac` does not include\nthe output JAR of the `java_library` rule being built.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cdd64ab751da605f99d8be0eeb906766d868c0fc",
      "old_mode": 33188,
      "old_path": "src/com/facebook/buck/java/DefaultJavaLibraryRule.java",
      "new_id": "5e87343e9df83fc7ca8a3075cf74cbaa808848b7",
      "new_mode": 33188,
      "new_path": "src/com/facebook/buck/java/DefaultJavaLibraryRule.java"
    },
    {
      "type": "modify",
      "old_id": "385179b496f151927b26d81f27389d28f42687de",
      "old_mode": 33188,
      "old_path": "src/com/facebook/buck/java/PrebuiltJarRule.java",
      "new_id": "616ed6af1f0585d94d2f25c754465861bad8d9c7",
      "new_mode": 33188,
      "new_path": "src/com/facebook/buck/java/PrebuiltJarRule.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "88f11faa127434633c9efa5ce43aba37ecef5f92",
      "new_mode": 33188,
      "new_path": "test/com/facebook/buck/java/CleanClasspathIntegrationTest.java"
    },
    {
      "type": "modify",
      "old_id": "8baffea392281abdb8fe3db2fc0aba5a77799204",
      "old_mode": 33188,
      "old_path": "test/com/facebook/buck/java/DefaultJavaLibraryRuleTest.java",
      "new_id": "e2414fef351cefbd2c9a172fff1c38e4120ca2d9",
      "new_mode": 33188,
      "new_path": "test/com/facebook/buck/java/DefaultJavaLibraryRuleTest.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2f71c07d3f47117a70ffa74d13a3993763a77a2e",
      "new_mode": 33188,
      "new_path": "test/com/facebook/buck/java/testdata/classpath_corruption_regression/BUCK"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "51142c5469a2557c2f9d59d07e247580f66bc482",
      "new_mode": 33188,
      "new_path": "test/com/facebook/buck/java/testdata/classpath_corruption_regression/Bar.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2bf22b894722cd5d70e6e2a3336badcf5c0fae17",
      "new_mode": 33188,
      "new_path": "test/com/facebook/buck/java/testdata/classpath_corruption_regression/Foo.java"
    }
  ]
}
