Correctness fix for ScroogeGen - namespace_map's were not being translated for uniform equals behavior.

Review Request #127 — Created March 20, 2014 and submitted

jsirois
commons
jsirois/pants/scrooge_nm
259
pants-reviews
skumaran, travis
commit 6febc5b0614d87ffad09f68b8e2887333b1218b7
Author: John Sirois <jsirois@twitter.com>
Date:   Thu Mar 20 15:46:09 2014 -0600

    Correctness fix for ScroogeGen - namespace_map's were not being translated for uniform equals behavior.

 src/python/twitter/pants/tasks/scrooge_gen.py | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
This was discovered when working an internal project blowup yesterday evening by inspection - no actual testing done besides that project now working with this (unrelated) fix amongst other fixes.
JS
SK
  1. Could you share more information on "internal project blowup yesterday evening by inspection" - OR - what does this fix changes by making a sorted tuple?
    1. Sorry for the project red herring - this did not break any project since we no longer use namespace maps.  The issue is PartialCmd is a namedtuple so has value-equals semantics.  The namespace_map value was not guaranteed stable previously - now it is since the dict tuple entries now get sorted and that works together with the way tuple calculates equals to give how dict happens to iterate item tuple order-independence.
    2. Ok. Got the context and understood the reasoning. Thanks!
  2. 
      
SK
  1. Ship It!
  2. 
      
JS
  1. Thanks - merged
  2. 
      
JS
Review request changed

Status: Closed (submitted)

Loading...