From 8fbfc4b742c88669d4b010f5195612bcd869589f Mon Sep 17 00:00:00 2001 From: Tristan van Berkom Date: Tue, 22 Dec 2020 15:54:17 +0900 Subject: _pipeline.py: Remove load() method --- src/buildstream/_pipeline.py | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/buildstream/_pipeline.py b/src/buildstream/_pipeline.py index cd352579c..cab195895 100644 --- a/src/buildstream/_pipeline.py +++ b/src/buildstream/_pipeline.py @@ -19,7 +19,6 @@ # Jürg Billeter # Tristan Maat -import os import itertools from operator import itemgetter from collections import OrderedDict @@ -27,7 +26,6 @@ from collections import OrderedDict from pyroaring import BitMap # pylint: disable=no-name-in-module from ._exceptions import PipelineError -from ._profile import Topics, PROFILER from ._project import ProjectRefStorage from .types import _PipelineSelection, _Scope @@ -45,34 +43,6 @@ class Pipeline: self._project = project # The toplevel project self._artifacts = artifacts # The artifact cache - # load() - # - # Loads elements from target names. - # - # This function is called with a list of lists, such that multiple - # target groups may be specified. Element names specified in `targets` - # are allowed to be redundant. - # - # Args: - # target_groups (list of lists): Groups of toplevel targets to load - # - # Returns: - # (tuple of lists): A tuple of grouped Element objects corresponding to target_groups - # - def load(self, target_groups): - - # First concatenate all the lists for the loader's sake - targets = list(itertools.chain(*target_groups)) - - with PROFILER.profile(Topics.LOAD_PIPELINE, "_".join(t.replace(os.sep, "-") for t in targets)): - elements = self._project.load_elements(targets) - - # Now create element groups to match the input target groups - elt_iter = iter(elements) - element_groups = [[next(elt_iter) for i in range(len(group))] for group in target_groups] - - return tuple(element_groups) - # resolve_elements() # # Resolve element state and cache keys. -- cgit v1.2.1