Ensure caliper is shaded in bench, add bench desc, use RUN so that output is printed

Review Request #2353 — Created June 12, 2015 and submitted

nhoward_tw
pants
1674
5194a39...
pants-reviews
benjyw, fkorotkov, ity, jsirois, stuhood, tejal, zundel

caliper depends on guava 11 which is incompatible with guavas above 15 due to deprecated method removals, adding main to the jvm tool registration causes it to be shaded, which means the older guava won't interfer with code under test that depends on newer guava versions.

I also added a description and set the WorkUnit.RUN label so that the caliper output will be printed to the console by default.

tested against a target with a dependency on guava 16, which failed to run without shading. CI in PR

  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
ST
  1. Ship It!
    1. To fix this in pantsbuild/pants, I think you'd additionally need to make the BUILD file changes you mention here?

    2. Oh, good point.

  2. 
      
NH
NH
ST
  1. 
      
  2. BUILD.tools (Diff revision 2)
     
     

    interfere

    Also, if true the force shouldn't be necessary.

  3. 
      
NH
NH
JS
  1. 
      
  2. BUILD.tools (Diff revision 3)
     
     
    There is no need to exclude and re-add guava at all anymore: https://repo1.maven.org/maven2/com/google/caliper/caliper/0.5-rc1/caliper-0.5-rc1.pom
    
    Just let it pick up what it wants for 3rdparty deps since it will be shaded.
  3. I was suspicious, but it looks like all the user API is also in the com.google.caliper package so the simple shading works.

  4. 
      
NH
NH
Review request changed

Status: Closed (submitted)

NH
  1. submitted at https://github.com/pantsbuild/pants/commit/cb0cc7a6517f996a162027dab17c083fa9990bf3

  2. 
      
Loading...