Filter inactive goals from `Goal.all`.

Review Request #4298 - Created Oct. 12, 2016 and submitted

Information
John Sirois
pants
jsirois/issues/3945
3945, 3949
150ee3d...
Reviewers
pants-reviews
benjyw, mateor
Introduce the concept of a goal's `active` status.  Most goals are in
fact active (have at least 1 task installed), but some may not if there
are no plugins providing tasks to the goal installed.

 src/python/pants/goal/goal.py                         | 21 +++++++++++++++++++--
 tests/python/pants_test/core_tasks/BUILD              |  2 ++
 tests/python/pants_test/core_tasks/test_list_goals.py | 32 +++++++++++++++++++++++---------
 3 files changed, 44 insertions(+), 11 deletions(-)

Local ad-hoc:

$ ./pants goals | grep buildgen
               buildgen: Automatically generate BUILD files.
$ git diff -U1
diff --git a/pants.ini b/pants.ini
index e859654..ac08cec 100644
--- a/pants.ini
+++ b/pants.ini
@@ -46,3 +46,3 @@ backend_packages: +[
     "pants.contrib.findbugs",
-    "pants.contrib.go",
+#    "pants.contrib.go",
     "pants.contrib.scalajs",
@@ -272,6 +272,6 @@ timeout_default: 60

-[buildgen.go]
-materialize: True
-remote: True
-fail_floating: True
+#[buildgen.go]
+#materialize: True
+#remote: True
+#fail_floating: True

$ ./pants goals | grep buildgen
^$

CI went green here:
https://travis-ci.org/pantsbuild/pants/builds/167457316

Mateo Rodriguez
John Sirois
Nick Howard (Twitter)
John Sirois
Nick Howard (Twitter)
Stu Hood
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit 1485434d282f3430c9d30642f3b10b7a0f07c0ab
Author: John Sirois <john.sirois@gmail.com>
Date:   Thu Oct 13 14:50:25 2016 -0600

    Filter inactive goals from `Goal.all`.
    
    Introduce the concept of a goal's `active` status.  Most goals are in
    fact active (have at least 1 task installed), but some may not if there
    are no plugins providing tasks to the goal installed.
    
    Testing Done:
    Local ad-hoc:
    ```
    $ ./pants goals | grep buildgen
                   buildgen: Automatically generate BUILD files.
    $ git diff -U1
    diff --git a/pants.ini b/pants.ini
    index e859654..ac08cec 100644
    --- a/pants.ini
    +++ b/pants.ini
    @@ -46,3 +46,3 @@ backend_packages: +[
         "pants.contrib.findbugs",
    -    "pants.contrib.go",
    +#    "pants.contrib.go",
         "pants.contrib.scalajs",
    @@ -272,6 +272,6 @@ timeout_default: 60
    
    -[buildgen.go]
    -materialize: True
    -remote: True
    -fail_floating: True
    +#[buildgen.go]
    +#materialize: True
    +#remote: True
    +#fail_floating: True
    
    $ ./pants goals | grep buildgen
    ^$
    ```
    
    CI went green here:
      https://travis-ci.org/pantsbuild/pants/builds/167457316
    
    Bugs closed: 3945, 3949
    
    Reviewed at https://rbcommons.com/s/twitter/r/4298/
Loading...