#NEWLINE# def compile( self , args , classpath , sources , classes_output_dir , upstream_analysis , analysis_file , log_file , settings , fatal_warnings ) : #NEWLINE# #INDENT# self . _verify_zinc_classpath ( self . get_options ( ) . pants_workdir , classpath ) #NEWLINE# self . _verify_zinc_classpath ( self . get_options ( ) . pants_workdir , upstream_analysis . keys ( ) ) #NEWLINE# zinc_args = [ ] #NEWLINE# zinc_args . extend ( [ '-log-level' , self . get_options ( ) . level , '-analysis-cache' , analysis_file , '-classpath' , ':' . join ( classpath ) , '-d' , classes_output_dir ] ) #NEWLINE# if ( not self . get_options ( ) . colors ) : #NEWLINE# #INDENT# zinc_args . append ( '-no-color' ) #NEWLINE# #UNINDENT# if ( not self . get_options ( ) . name_hashing ) : #NEWLINE# #INDENT# zinc_args . append ( '-no-name-hashing' ) #NEWLINE# #UNINDENT# if log_file : #NEWLINE# #INDENT# zinc_args . extend ( [ '-capture-log' , log_file ] ) #NEWLINE# #UNINDENT# zinc_args . extend ( [ '-compiler-interface' , self . tool_jar ( 'compiler-interface' ) ] ) #NEWLINE# zinc_args . extend ( [ '-sbt-interface' , self . tool_jar ( 'sbt-interface' ) ] ) #NEWLINE# zinc_args . extend ( [ '-scala-path' , ':' . join ( self . compiler_classpath ( ) ) ] ) #NEWLINE# zinc_args += self . plugin_args #NEWLINE# if upstream_analysis : #NEWLINE# #INDENT# zinc_args . extend ( [ '-analysis-map' , ',' . join ( ( '{}:{}' . format ( * kv ) for kv in upstream_analysis . items ( ) ) ) ] ) #NEWLINE# #UNINDENT# zinc_args += args #NEWLINE# zinc_args . extend ( [ '-C-source' , '-C{}' . format ( settings . source_level ) , '-C-target' , '-C{}' . format ( settings . target_level ) ] ) #NEWLINE# zinc_args . extend ( settings . args ) #NEWLINE# if fatal_warnings : #NEWLINE# #INDENT# zinc_args . extend ( self . get_options ( ) . fatal_warnings_enabled_args ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# zinc_args . extend ( self . get_options ( ) . fatal_warnings_disabled_args ) #NEWLINE# #UNINDENT# jvm_options = list ( self . _jvm_options ) #NEWLINE# zinc_args . extend ( sources ) #NEWLINE# self . log_zinc_file ( analysis_file ) #NEWLINE# if self . runjava ( classpath = self . zinc_classpath ( ) , main = self . _ZINC_MAIN , jvm_options = jvm_options , args = zinc_args , workunit_name = 'zinc' , workunit_labels = [ WorkUnitLabel . COMPILER ] ) : #NEWLINE# #INDENT# raise TaskError ( 'Zinc compile failed.' )