327a8d989f986623b258d5926142333d80697e4c,src/python/pants/init/options_initializer.py,OptionsInitializer,_install_options,#OptionsInitializer#Any#Any#,98

Before Change


    known_scope_infos = [GlobalOptionsRegistrar.get_scope_info()]

    // Add scopes for all needed subsystems via a union of all known subsystem sets.
    subsystems = Subsystem.closure(
      GoalRunner.subsystems() | Goal.subsystems() | build_configuration.subsystems()
    )
    for subsystem in subsystems:
      known_scope_infos.append(subsystem.get_scope_info())

    // Add scopes for all tasks in all goals.

After Change


                             set(Goal.get_optionables()))

    known_scope_infos = sorted({
      si for optionable in top_level_optionables for si in optionable.known_scope_infos()
    })

    // Now that we have the known scopes we can get the full options.
    options = options_bootstrapper.get_full_options(known_scope_infos)

    distinct_optionable_classes = sorted({si.optionable_cls for si in known_scope_infos},
                                         key=lambda o: o.options_scope)
    for optionable_cls in distinct_optionable_classes:
      optionable_cls.register_options_on_scope(options)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: 327a8d989f986623b258d5926142333d80697e4c
Time: 2018-03-09
Author: benjyw@gmail.com
File Name: src/python/pants/init/options_initializer.py
Class Name: OptionsInitializer
Method Name: _install_options


Project Name: pantsbuild/pants
Commit Name: 327a8d989f986623b258d5926142333d80697e4c
Time: 2018-03-09
Author: benjyw@gmail.com
File Name: tests/python/pants_test/base_test.py
Class Name: BaseTest
Method Name: context


Project Name: pantsbuild/pants
Commit Name: 327a8d989f986623b258d5926142333d80697e4c
Time: 2018-03-09
Author: benjyw@gmail.com
File Name: src/python/pants/init/plugin_resolver.py
Class Name: PluginResolver
Method Name: _options