fd3a865b4b7130ee64aaee259f40d3c425021484,src/python/pants/option/compiler_option_sets_mixin.py,CompilerOptionSetsMixin,get_merged_args_for_compiler_option_sets,#CompilerOptionSetsMixin#Any#,59

Before Change


      compiler_option_sets = self.get_options().default_compiler_option_sets
      logger.debug("using default option sets: {}".format(compiler_option_sets))

    compiler_options = set()

    // Set values for enabled options.
    for option_set_key in compiler_option_sets:
      val = self.get_options().compiler_option_sets_enabled_args.get(option_set_key, ())

After Change


      compiler_option_sets = self.get_options().default_compiler_option_sets
      logger.debug("using default option sets: {}".format(compiler_option_sets))

    compiler_options = []

    // Set values for disabled options (they will come before the enabled options). This allows
    // enabled option sets to override the disabled ones, if the underlying command has later
    // options supersede earlier options.
    compiler_options.extend(
      disabled_arg
      for option_set_key, disabled_args in self.get_options().compiler_option_sets_disabled_args.items()
      if option_set_key not in compiler_option_sets
      for disabled_arg in disabled_args
    )

    // Set values for enabled options.
    compiler_options.extend(
      enabled_arg
      for option_set_key in compiler_option_sets
      for enabled_arg in self.get_options().compiler_option_sets_enabled_args.get(option_set_key, [])
    )

    return compiler_options
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: fd3a865b4b7130ee64aaee259f40d3c425021484
Time: 2019-05-14
Author: 1305167+cosmicexplorer@users.noreply.github.com
File Name: src/python/pants/option/compiler_option_sets_mixin.py
Class Name: CompilerOptionSetsMixin
Method Name: get_merged_args_for_compiler_option_sets


Project Name: pyinstaller/pyinstaller
Commit Name: 98100abde55f1fb0ab455f95b9259c3adcdbab2c
Time: 2015-10-19
Author: h.goebel@crazy-compilers.com
File Name: PyInstaller/building/imphook.py
Class Name: ImportHook
Method Name: _process_excludedimports


Project Name: pantsbuild/pants
Commit Name: f262b5f4e19953a084a4064d5ce0857143c01134
Time: 2013-03-04
Author: benjy@foursquare.com
File Name: src/python/twitter/pants/tasks/code_gen.py
Class Name: CodeGen
Method Name: execute