I’ve gotten two reports of this problem in the last week or so and was wondering Has anyone seen this kind of issue before?
We are using 1.1.0-pre9 with the two ANTLR patches that just got landed into 1.1.0
[1/3] Compiling 33 zinc sources in 1 target (siren/src/main/java:lib).[error] /Users/zundel/Development/java/siren/src/main/java/com/squareup/siren/server/csi/CsiModule.java:10: cannot access com.squareup.monitoring.graphite.GraphiteMetricsForwarder
[error] bad class file: /Users/zundel/Development/java/.pants.d/compile/zinc/252d64521cf9/monitoring.src.main.java.lib/current/z.jar(com/squareup/monitoring/graphite/GraphiteMetricsForwarder.class)
[error] unable to access file: corrupted zip file
[error] Please remove or make sure it appears in the correct subdirectory of the classpath.
[error] import com.squareup.monitoring.graphite.GraphiteMetricsForwarder;
[error] Compile failed at Aug 28, 2016 11:26:27 AM [4.029s]
compile(siren/src/main/java:lib) failed: Zinc compile failed.
FAILURE: Compilation failure: Failed jobs: compile(siren/src/main/java:lib)
07:26:27 00:16 [complete]
FAILURE
I’ve not heard of reports of this at Square before. Our CI builder seems to be running just fine. This problem occurs when I try to re-use the artifacts created in CI on our laptops.
Bumping cache_key_gen_version in pants.ini works around the problem.
https://rbcommons.com/s/twitter/r/4152/ - Refactor classpath consolidation into a separate task.
https://rbcommons.com/s/twitter/r/4184/ - Performance fix for consolidated class path
This problem cropped up after we moved from 1.1.0-rc9 to the latest version.
Is the bug triggering during a 'bundle' call? I believe the consolidate_classpath task is still tightly coupled to bundle and should only run during that goal.
That task jars up any loose files left on the classpath during bundle. If that lib in the trace is a Square java_library I would have thought it would be a jar already.
Had that task run earlier in that trace?