Made a small change to stop problems we were getting compiling our annotation processors.
Review Request #708 - Created July 21, 2014 and submitted
|benjyw, jsirois, zundel|
This is related to the pants-devel discussion 'Nondeterministic Phase Execution Order'. Briefly: when the resources phase happens to precede the compile phase, resources in .pants.d pollute the jmake classpath when compiling some of Square's internal annotation processors. This makes jmake quite irate, so this code stops that from happening. This fix is not terribly elegant, in that it doesn't address the underlying problem of resources getting on the classpath in the first place. Perhaps this problem will go away when a formal classpath object is created.
Code which didn't compile now compiles. Ran test tests/python/pants_test:: and nothing fails that doesn't also fail on the master branch.
I'd prefer solving the ordering issue instead of these 2 hacks (resources path knowledge and knowledge of a task that jvm_compile doesn't rightly depend on). That could be done with exactly 1 hack - having PrepareResources.prepare express a data dependency on classes_by_target for example, with a clear TODO/comment.