Temporarily move nailgun flag registration to be global.

Review Request #1140 — Created Oct. 8, 2014 and submitted

benjyw
pants
9a46d83...
pants-reviews
jsirois, patricklaw

It was causing problems during option migration. This temporarily
widens an existing abstraction leak, but once we're fully over to
the new options system this naturally goes away.

Also - ensure task options are registered in proper scope order.

ci is baking.

BE
PA
  1. 
      
  2. src/python/pants/goal/goal.py (Diff revision 1)
     
     

    What was the motivation for this?

    1. For various reasons we have to register options on outer scopes before inner scopes. This ensures that. Normally this wouldn't be necessary because these are all siblings. However when a task has the same name as its goal then we hoist its scope to the goal scope (so we can do ./pants goal foo --flag instead of ./pants goal foo.foo --flag). And it turns out we have a case of a goal with multiple tasks, one of which has the same name as the goal (we have tasks 'binary' and 'dup' in goal 'binary').

    2. I will add a comment to this effect in the code.

  3. 
      
BE
Review request changed

Status: Closed (submitted)

Loading...