Have IntelliJ JUnit pick up pants exported manifest.jar

Review Request #3638 — Created April 1, 2016 and submitted

wisechengyi
intellij-pants-plugin
3650, 3626
pants-reviews
benjyw, nhoward_tw, peiyu, stuhood, zundel

Currently IntelliJ junit runner will load up classfiles for all targets imported in a project. For example, when x:: is imported to intellij, and user invokes a test that only concerns x/y/z:foo, classfiles for all targets in x:: will still be loaded.

This change will have the following benefits:
1. intellij junit runner will be as hygienic as pants junit run.
2. it simplifies the existing interface of classfile collection by target ids.
3. less time for intellij junit runner to find the classpath.
4. discover intellij junit runner stat based on this flag.

https://travis-ci.org/wisechengyi/intellij-pants-plugin/builds/121253087

ST
  1. Is it assumed that this will automatically be tested in CI because of the range of versions that is in use?

    1. yes once https://rbcommons.com/s/twitter/r/3626/ goes in. I will make sure to re-run the ci before merging this.

  2. Can you add a comment explaining the two implementations and how they differ?

  3. 
      
WI
NH
  1. Ship It!
  2. 
      
PE
  1. 
      
  2. very similar to PantsUtil.findDistExportClasspathDirectory, which also hardcode dist/export-classpath, might want to place next to each other

    1. used findDistExportClasspathDirectory, and refactored some code into PantsUtil and PantsOptions. Thanks for the pointing that out!

  3. IIUC, this is the first time the IJ ExecutionException is thrown by us.

    Anywhere when to throw what exceptions is documented, plus a few others?

    • ExternalSystemException
    • PantsExecutionException
    • PantsException

    code seems inconsistent

    1. Indeed. Filed https://github.com/pantsbuild/intellij-pants-plugin/issues/117

      The rule I am following now is to use whichever Exception the method can throw based on method inheritance.

  4. 
      
WI
PE
  1. Ship It!
  2. 
      
WI
Review request changed

Status: Closed (submitted)

Change Summary:

0ef6ae9e1f7e61503fbdbf9168ec4527bfb5c194

Loading...