@@ -16,12 +16,8 @@ class _Element:
1616 name : str
1717 description : str
1818 workspace : any
19- key : str
20- key_full : str
21- # state: str
2219 environment : dict [str , str ]
2320 variables : dict [str , str ]
24- artifact : any
2521 dependencies : list [str ]
2622 build_dependencies : list [str ]
2723 runtime_dependencies : list [str ]
@@ -201,34 +197,9 @@ def __init__(self, stream, project, context):
201197 self .project = project
202198 self .context = context
203199
204- def _elements (self , dependencies , with_state = False ):
200+ def _elements (self , dependencies ):
205201 for element in dependencies :
206202
207- # These operations require state and are only shown if requested
208- key = None
209- key_full = None
210- state = None
211- artifact = None
212-
213- if with_state :
214- key = element ._get_display_key ().brief
215-
216- key_full = element ._get_display_key ().full
217-
218- # BUG: Due to the assersion within .get_artifact this will
219- # error but there is no other way to determine if an artifact
220- # exists and we only want to show this value for informational
221- # purposes.
222- try :
223- _artifact = element ._get_artifact ()
224- if _artifact .cached ():
225- artifact = {
226- "files" : artifact .get_files (),
227- "digest" : artifact_files ._get_digest (),
228- }
229- except :
230- pass
231-
232203 sources = []
233204 for source in element .sources ():
234205 source_infos = source .collect_source_info ()
@@ -260,10 +231,6 @@ def _elements(self, dependencies, with_state=False):
260231 runtime_dependencies = lambda element : [
261232 dependency ._get_full_name () for dependency in element ._dependencies (_Scope .RUN , recurse = False )
262233 ],
263- key = key ,
264- key_full = key_full ,
265- # state=state,
266- artifact = artifact ,
267234 )
268235
269236 def _get_projects (self ) -> [_Project ]:
@@ -361,23 +328,20 @@ def _get_user_config(self) -> _UserConfig:
361328 remote_action_cache_service = remote_action_cache_service ,
362329 )
363330
364- def _get_output (self , dependencies , with_state = False ) -> _InspectOutput :
331+ def _get_output (self , dependencies ) -> _InspectOutput :
365332 return _InspectOutput (
366333 project = self ._get_projects (),
367334 user_config = self ._get_user_config (),
368- elements = [element for element in self ._elements (dependencies , with_state = with_state )],
335+ elements = [element for element in self ._elements (dependencies )],
369336 )
370337
371- def dump_to_stdout (self , elements = [], selection = _PipelineSelection .NONE , with_state = False ):
338+ def dump_to_stdout (self , elements = [], selection = _PipelineSelection .NONE ):
372339 if not elements :
373340 elements = self .project .get_default_targets ()
374341
375342 dependencies = self .stream .load_selection (
376- elements , selection = selection , except_targets = [], need_state = with_state
343+ elements , selection = selection , except_targets = []
377344 )
378345
379- if with_state :
380- self .stream .query_cache (dependencies , need_state = True )
381-
382- output = self ._get_output (dependencies , with_state )
346+ output = self ._get_output (dependencies )
383347 json .dump (_dump_dataclass (output ), sys .stdout )
0 commit comments