Temporarily reduce method count limit for dexing. Summary: We have seen issues where Buck is not counting a reference to a method when tracking how full a .jar is. While debugging this issue, this change temporarily reduces the limit so the resulting .jar will have slightly fewer methods so dx can handle it.
diff --git a/src/com/facebook/buck/dalvik/DalvikAwareOutputStreamHelper.java b/src/com/facebook/buck/dalvik/DalvikAwareOutputStreamHelper.java index b732898..f560667 100644 --- a/src/com/facebook/buck/dalvik/DalvikAwareOutputStreamHelper.java +++ b/src/com/facebook/buck/dalvik/DalvikAwareOutputStreamHelper.java
@@ -38,7 +38,8 @@ */ public class DalvikAwareOutputStreamHelper implements ZipOutputStreamHelper { - private static final int MAX_METHOD_REFERENCES = 64 * 1024; + // TODO-mmarucheck (#3178515): remove the '-2' when we understand the missing references. + private static final int MAX_METHOD_REFERENCES = 64 * 1024 - 2; private final ZipOutputStream outStream; private final Set<String> entryNames = Sets.newHashSet();