def add_dependency(self, address):
    """Add a dependency to this target.  This will deduplicate existing dependencies."""
    if address in self._dependencies_by_address:
      if self._dependencies_by_address[address].has_comment():
        logger.warn('BuildFileManipulator would have added {address} as a dependency of '
                    '{target_address}, but that dependency was already forced with a comment.'
                    .format(address=address.spec, target_address=self.target_address.spec))
        return
    spec = address.reference(referencing_path=self.build_file.spec_path)
    self._dependencies_by_address[address] = DependencySpec(spec)
def add_dependency ( self , address ) : if address in self . _dependencies_by_address : if self . _dependencies_by_address [ address ] . has_comment ( ) : logger . warn ( 'BuildFileManipulator would have added {address} as a dependency of ' '{target_address}, but that dependency was already forced with a comment.' . format ( address = address . spec , target_address = self . target_address . spec ) ) return spec = address . reference ( referencing_path = self . build_file . spec_path ) self . _dependencies_by_address [ address ] = DependencySpec ( spec )
Add a dependency to this target.  This will deduplicate existing dependencies.