Fix the ScroogeGen target selection predicate.

Review Request #1497 — Created Dec. 17, 2014 and submitted

jsirois
pants
jsirois/scrooge/fix_predicate
875
d753408...
pants-reviews
benjyw, ity, jinfeng

This also updates the release version and CHANGELOG
in anticipation of a quick release.

src/python/pants/CHANGELOG.rst | 9 +++++++++
src/python/pants/backend/codegen/tasks/scrooge_gen.py | 7 +++++++
src/python/pants/version.py | 2 +-
3 files changed, 17 insertions(+), 1 deletion(-)

Before this fix, reproed the current CI failures with:

$ pants.dev clean-all test examples/::
...
19:52:10 00:20         [compile]
19:52:10 00:20           [jmake]
                         warning: bootstrap class path not set in conjunction with -source 1.6
                         Jmake version 1.3.8-3
                         /home/jsirois/dev/3rdparty/pants/.pants.d/gen/scrooge/java-sync/com/pants/examples/distance/thriftjava/Distance.java:32: error: duplicate class: com.pants.examples.distance.thriftjava.Distance
                         public class Distance implements TBase<Distance, Distance._Fields>, java.io.Serializable, Cloneable {
                                ^
                         /home/jsirois/dev/3rdparty/pants/.pants.d/gen/scrooge/java-sync/com/pants/examples/precipitation/thriftjava/Precipitation.java:32: error: duplicate class: com.pants.examples.precipitation.thriftjava.Precipitation
                         public class Precipitation implements TBase<Precipitation, Precipitation._Fields>, java.io.Serializable, Cloneable {
                                ^
                         Writing project database...  Done.

FAILURE: compilation error
...
$ find .pants.d -type f | xargs grep "package com.pants.examples.distance.thriftjava"
.pants.d/gen/thrift/sessions/examples.src.thrift.com.pants.examples.precipitation.precipitation.thrift/gen-java/com/pants/examples/distance/thriftjava/Distance.java:package com.pants.examples.distance.thriftjava;
.pants.d/gen/thrift/combined/gen-java/com/pants/examples/distance/thriftjava/Distance.java:package com.pants.examples.distance.thriftjava;
.pants.d/gen/scrooge/java-sync/com/pants/examples/distance/thriftjava/Distance.java:package com.pants.examples.distance.thriftjava;
...

After the fix the examples run green and:

$ find .pants.d -type f | xargs grep "package com.pants.examples.distance.thriftjava"
.pants.d/gen/thrift/sessions/examples.src.thrift.com.pants.examples.precipitation.precipitation.thrift/gen-java/com/pants/examples/distance/thriftjava/Distance.java:package com.pants.examples.distance.thriftjava;
.pants.d/gen/thrift/combined/gen-java/com/pants/examples/distance/thriftjava/Distance.java:package com.pants.examples.distance.thriftjava;

CI went green here: https://travis-ci.org/pantsbuild/pants/builds/44412131

JS
JS
  1. Submitted TBR @ https://github.com/pantsbuild/pants/commit/4ba578e7361f8a346b1edfe66f42b478e409718c and tagged as release_0.0.26

  2. 
      
JS
Review request changed

Status: Closed (submitted)

BE
  1. Thanks for fixing, and sorry for the break. I couldn't for the life of me figure this one out.

  2. 
      
IT
  1. Ship It!

  2. 
      
Loading...