Fix the ScroogeGen target selection predicate.

Review Request #1497 - Created Dec. 18, 2014 and submitted

Information
John Sirois
pants
jsirois/scrooge/fix_predicate
875
d753408...
Reviewers
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

John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Benjy Weinberger

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

Ity Kaul

Ship It!

Loading...