• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 6458 / 3
0%
master: 0%

Build:
DEFAULT BRANCH: master
Ran 26 Aug 2015 06:48PM UTC
Files 375
Run time 11s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Aug 2015 05:57PM UTC coverage: 70.185% (+0.02%) from 70.169%
CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'"

push

travis-ci

gmalmquist
Requiring explicit dependency on the DistributionLocator subsystem.

This includes adding DistributionLocator as subsystem dependency of
IvySubsystem, and requiring a distribution input to execute_java in
pants.java.util.

The latter change is obviously the more distruptive, and due to how
the default parameters work, it is difficult to see that
distribution is necessary when trying to use that function, unless
you read the pydocs carefully.

To alleviate this, I've added an execute_java method to
Distribution, which just calls util.execute_java, passing itself
as the distribution.

This way, instead of importing pants.java.util, you just import
DistributionLocator, and use something like:

    DistributionLocator.cached().execute_java(...)

Which is more verbose, but requires one less import and makes it
obvious that you need a subsystem dependency on
DistributionLocator.

It makes sense to me that the Distribution should be able to invoke
its own java binary, and the actual meat-and-potatoes code is still
in pants.java.util, so I don't think this pollutes the primarily
information-holder functionality of Distribution too much. But I am
open to changing it if people find it offensive.

Regardless, this change also has the nice side-effect of making it
much more explicit that you're using an arbitrary cached version of
the jvm whenever you run java, which should make it easier and more
maintainable to use more constrained versions if necessary.

Testing Done:
Added unit tests to pants_test/java/test_executor.py.

CI went green here: https://travis-ci.org/gmalmquist/pants/builds/77366143

Bugs closed: 2072

Reviewed at https://rbcommons.com/s/twitter/r/2707/

15798 of 22509 relevant lines covered (70.19%)

0.7 hits per line

Source Files on job 6458.3 (CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'")
  • List 375
  • Changed 14
  • Source Changed 13
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 6458
  • Travis Job 6458.3
  • d3987fc2 on github
  • Prev Job for CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'" on master (#6438.3)
  • Next Job for CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'" on master (#6465.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2024 Coveralls, Inc