def _instantiate_app(self, target_cls: Type[TargetV1], kwargs) -> TargetV1: """For App targets, convert BundleAdaptor to BundleProps.""" parse_context = ParseContext(kwargs["address"].spec_path, dict()) bundleprops_factory = Bundle(parse_context) kwargs["bundles"] = [ bundleprops_factory.create_bundle_props(bundle) for bundle in kwargs["bundles"] ] return target_cls(build_graph=self, **kwargs)
def _instantiate_app(self, target_cls, kwargs): """For App targets, convert BundleAdaptor to BundleProps.""" parse_context = ParseContext(kwargs['address'].spec_path, dict()) bundleprops_factory = Bundle(parse_context) kwargs['bundles'] = [ bundleprops_factory.create_bundle_props(bundle) for bundle in kwargs['bundles'] ] return target_cls(build_graph=self, **kwargs)
def _bundle(rel_path): pc = ParseContext(rel_path=rel_path, type_aliases={}) return Bundle(pc)