Default the nailgun workdir sensibly.

Review Request #141 — Created March 24, 2014 and submitted

jsirois
commons
jsirois/pants/fix_ng_default_workdir
267
pants-reviews
tejal, travis
commit 834e400cbe472c7cea8af3a69c4b103cfbfdef15
Author: John Sirois <jsirois@twitter.com>
Date:   Mon Mar 24 12:25:22 2014 -0600

    Default the nailgun workdir sensibly.
    
    Also kill cruft nailgun config settings in pants.ini.

 pants.ini                                      | 2 --
 src/python/twitter/pants/tasks/nailgun_task.py | 6 +++++-
 2 files changed, 5 insertions(+), 3 deletions(-)
$ rm pants.pex && ./pants.bootstrap clean-all
$ ./pants.bootstrap goal test tests/java/com/twitter/common/:all
$ tree .pants.d/ng/
.pants.d/ng/
├── AptCompile
│   ├── stderr
│   └── stdout
├── Checkstyle
│   ├── stderr
│   └── stdout
├── IvyResolve
│   ├── stderr
│   └── stdout
└── JavaCompile
    ├── stderr
    └── stdout

TE
  1. Ship It!
  2. 
      
JS
  1. Thanks - merged.
  2. 
      
LA
  1. If a solution leaps out, great. Meanwhile, I'll look around:
    
    $ ./pants goal run src/java/com/twitter/common/examples/pingpong/main
    
    13:32:50 00:00 [main]
                   (To run a reporting server: ./pants server)
    13:32:50 00:00   [setup]
    13:32:50 00:00     [bootstrap]
    13:32:50 00:00     [parse]
                   SUCCESS
    Traceback (most recent call last):
      File "/Users/lhosken/workspace/commons/build-support/pants.venv/bin/pants", line 9, in <module>
        load_entry_point('twitter.pants==0.0.17', 'console_scripts', 'pants')()
      File "/Users/lhosken/workspace/commons/build-support/pants.venv/lib/python2.7/site-packages/twitter/pants/bin/pants_exe.py", line 192, in main
        _run()
      File "/Users/lhosken/workspace/commons/build-support/pants.venv/lib/python2.7/site-packages/twitter/pants/bin/pants_exe.py", line 175, in _run
        result = command.run(lock)
      File "/Users/lhosken/workspace/commons/build-support/pants.venv/lib/python2.7/site-packages/twitter/pants/commands/goal.py", line 484, in run
        return Goal._execute(context, self.phases, print_timing=self.options.time)
      File "/Users/lhosken/workspace/commons/build-support/pants.venv/lib/python2.7/site-packages/twitter/pants/commands/goal.py", line 266, in _execute
        return engine.execute(context, phases)
      File "/Users/lhosken/workspace/commons/build-support/pants.venv/lib/python2.7/site-packages/twitter/pants/engine/engine.py", line 195, in execute
        self.attempt(timer, context, phases)
      File "/Users/lhosken/workspace/commons/build-support/pants.venv/lib/python2.7/site-packages/twitter/pants/engine/group_engine.py", line 269, in attempt
        phase_executors = self._prepare(context, phases)
      File "/Users/lhosken/workspace/commons/build-support/pants.venv/lib/python2.7/site-packages/twitter/pants/engine/group_engine.py", line 263, in _prepare
        task = goal.task_type(context)
      File "/Users/lhosken/workspace/commons/build-support/pants.venv/lib/python2.7/site-packages/twitter/pants/tasks/checkstyle.py", line 46, in __init__
        super(Checkstyle, self).__init__(context)
      File "/Users/lhosken/workspace/commons/build-support/pants.venv/lib/python2.7/site-packages/twitter/pants/tasks/nailgun_task.py", line 57, in __init__
        self._workdir = os.path.join(context.config.get('nailgun', 'workdir'), self.__class__.__name__)
      File "/Users/lhosken/workspace/commons/build-support/pants.venv/bin/../lib/python2.7/posixpath.py", line 77, in join
        elif path == '' or path.endswith('/'):
    AttributeError: 'NoneType' object has no attribute 'endswith'
    1. oh, I'm a dummy. running pants.bootstrap fixes it. 
  2. 
      
JS
Review request changed

Status: Closed (submitted)

Loading...