Add a whitelist to jvm dependency analyzer

Review Request #888 — Created Aug. 13, 2014 and submitted

johanoskarsson
pants
2c51f2c...
pants-reviews
benjyw, jsirois, patricklaw, stuhood

The whitelist allows big repos to reduce dependency issues while stopping any new from being introduced. You can whitelist the projects that currently have issues and make the dependency checks fatal. All projects with current issues will still be able to build but new issues will result in breaking builds.

Also it seems like the direct dependency check would always fatal if set to fatal, fixed that.

Added two integration tests.

  • 1
  • 0
  • 1
  • 0
  • 2
Description From Last Updated
These two tests are almost identical... make one toplevel test with a private/local helper method? ST stuhood
BE
  1. Do we want the java sources used in the test to be in src/ or in test/? Or example/? Or a new source root? I really don't think they belong in src/ although I know there are other sources there already, so I wouldn't hold up this change on that. Maybe worth discussing on pants-devel.
    1. I think Eric was working on moving those into /testprojects or something similar. For now I'll just put them where the rest is.
    2. Still waiting for feedback on https://rbcommons.com/s/twitter/r/881/
      
      If my patch lands first, your src/java/com/pants/testproject changes should probably move to /testprojects/src.
        
      If your patch lands first, I'll move your new testproject stuff over to /testprojects/src
  2. Looks like you don't need this import.
  3. 
      
ZU
  1. It would be nice to add some documentation. I suggest adding it under the 'compile' goal under src/python/pants/doc/goals_reference.rst
    
    We haven't been all that great about documenting config settings but when cmdline ops and ini settings converge it should get easier.  
    1. The way to add docs for config entries seems to be to do: option_group.add_option with a help field? In jvm_compile that appears to add a flag for each subclass (java, scala etc): --compile-java-missing-deps-target-whitelist. Is there another way?
    2. Normally - yes - via the Task class-level pydoc: http://pantsbuild.github.io/goals_reference.html
      However jvm compile uses a GroupTask which doesn't allow for this :/
  2. 
      
ST
  1. 
      
  2. These two tests are almost identical... make one toplevel test with a private/local helper method?
  3. 
      
JS
  1. 
      
  2. I find this more readable: s/not x in y/x not in y/
  3. 
      
PA
  1. Sorry for the late review! lgtm
  2. 
      
JO
JO
Review request changed

Status: Closed (submitted)

LA
  1. seeing Travis-CI failure that looks like missing deps
    in missingdepswhitelist2/MissingDepsWhitelist2.java
    https://travis-ci.org/pantsbuild/pants/builds/35652819

    e.g., /home/travis/build/pantsbuild/pants/testprojects/src/java/com/pants/testproject/missingdepswhitelist2/MissingDepsWhitelist2.java:3: error: package com.pants.examples.hello.greet does not exist

    Looking now. Wouldn't mind the answer on a silver platter, tho.

  2. 
      
LA
  1. Mmmaybe it's surprising that CI is trying to build this testproject code at all? Like, ...maybe this change's testproject/ code is supposed to be broken?

    1. I'm hitting the error you hit Larry on a branch that changes how ci.sh selects unit and integration test targets. I'll be sorting this issue in order to get my branch in a reviewable state if no-one figures the issue out 1st.

    2. https://rbcommons.com/s/twitter/r/1049/

  2. 
      
Loading...