Only request the `classes_by_source` product if it is necessary

Review Request #2939 - Created Oct. 7, 2015 and submitted

Information
Stu Hood
pants
2334
6b27548...
Reviewers
pants-reviews
jsirois, mateor, patricklaw

The classes_by_source product is expensive to compute, and was only (really) used to provide source-to-classnames lookups in cases where a sourcefile was specified to the --test option.

Dropping this dependency means that we will not parse zinc analysis files or iterate over classnames for unchanged targets during incremental compiles. I haven't done any benchmarking, but from previous profiling sessions I expect that it's significant.

  • Use the runtime_classpath rather than classes_by_source to compute coverage patterns
  • Extract the intepret_test_spec method for reuse
  • Make requesting classes_by_source optional, and test this

https://github.com/pantsbuild/pants/pull/2334

Patrick Lawson
John Sirois
Stu Hood
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as 9a9656c664ac27d85c62347eb03ad021cfd175e9

Benjy Weinberger

Can we consider dropping the ability to specify tests by sourcefile, and instead require specfying them by FQCN? Then we could remove a little bit of complexity entirely.

Loading...