Remove docgen from list of default packages, don't deprecate the --default-backend-packages option.

Review Request #3988 — Created June 8, 2016 and submitted

zundel
pants
zundel/default-backends
3572
75ab2ff...
pants-reviews
benjyw, jsirois, mateor, patricklaw, stuhood

In https://rbcommons.com/s/twitter/r/3972/ we added this option but left it deprecated. As per conversation on the pants-devel@ list, we don't want pants to be useless by default, so this change will allow this option to stay in place permanently, with the caveat that we are removing docgen from the list (mostly tasks only used to publish the Pants doc site.)

  • Removes the docgen backend from the list of --default-backend-packages
  • Removes the deprecation code around --default-backend-packages
  • Updates our release scripting to add pants.backend.docgen back in for testing purposes
  • Remove the page() target for the root README.md file to allow contrib packages to perform integration tests that don't bake in the docgen backend

CI green at https://travis-ci.org/pantsbuild/pants/builds/136449213

  1. Ship It!
  2. 
      
  1. You'll still get deprecation messages for things in --default-backend-packages that are not in --backend-packages, because of the deprecated_conditional check.

    --default-backend-packages was supposed to only exist as a migration aid, since we already have --backend-packages. It seems weird to have these two options in perpetuity. It will never be clear what the distinction between them is (because there isn't really one).

    What we really want is a way to subtract from list-valued options.

  2. 
      
  1. Ship It!
  2. 
      
  1. I think this is right. I love being able to disable backends but I also love curl -L -O https://pantsbuild.github.io/setup/pants && chmod +x pants && touch pants.ini and they're off.

  2. 
      
  1. I had to remove the page() target from the root BUILD file. This was interfering with testing contrib modules. The contrib tests get launched with the backend enabled, but when they perform integration testing with a version of pants that doesn't incude the docgen backend by default, the page() target in the root BUILD file trips it up:

                  contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks/test_thrift_linter_integration.py:69: 
                         _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
                         .pants.d/python-setup/chroots/3e99710be47c6091803d73b3a193a63d506fd14b/pants_test/pants_run_integration_test.py:252: in assert_success
                             self.assert_result(pants_run, self.PANTS_SUCCESS_CODE, expected=True, msg=msg)
                         .pants.d/python-setup/chroots/3e99710be47c6091803d73b3a193a63d506fd14b/pants_test/pants_run_integration_test.py:275: in assert_result
                             assertion(value, pants_run.returncode, error_msg)
                         E   AssertionError: /home/travis/build/pantsbuild/pants/pants --no-pantsrc --pants-workdir=/home/travis/build/pantsbuild/pants/.pants.d/tmp/tmp4d8uJb.pants.d --kill-nailguns --print-exception-stacktrace --pants-config-files=[] --no-cache-read --no-cache-write --cache-bootstrap-read --cache-bootstrap-write --config-override=/home/travis/build/pantsbuild/pants/.pants.d/tmp/tmp4d8uJb.pants.d/pants.ini thrift-linter contrib/scrooge/tests/thrift/org/pantsbuild/contrib/scrooge/thrift_linter:bad-thrift-non-strict
                         E   returncode: 1
                         E   stdout:
                         E      
                         E      13:54:35 00:00 [main]
                         E                     (To run a reporting server: ./pants server)
                         E      13:54:35 00:00   [setup]
                         E      13:54:35 00:00     [parse]
                         E      FAILURE: 
                         E             Failed to resolve target for tool: //:scrooge-gen. This target was obtained from
                         E             option scrooge-gen in scope gen.scrooge. You probably need to add this target to your tools
                         E             BUILD file(s), usually located in BUILD.tools in the workspace root.
                         E             Exception AddressLookupError: name 'page' is not defined
                         E      while executing BUILD file BuildFile(BUILD, FileSystemProjectTree(/home/travis/build/pantsbuild/pants))
                         E      Loading addresses from '' failed.
                         E      
                         E      
                         E      
                         E      13:54:35 00:00   [complete]
                         E                     FAILURE
    
  2. 
      
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks Stu, Benjy, Mateo. Commit 500dd5f

Loading...