fast-school-44220
09/02/2025, 5:47 PMoutput_snapshot = []
if result.exit_code == 0:
<http://logger.info|logger.info>(f"✓ Generated {output_file_name} from {source_file_name}")
output_snapshot = await Get(Snapshot, Digest, result.output_digest)
else:
logger.error(f"✗ Failed to generate {output_file_name}: {result.stderr}")
output_snapshot = await Get(Snapshot, Digest, EMPTY_DIGEST)
return GeneratedSources(output_snapshot)fast-nail-55400
09/02/2025, 6:07 PMfast-school-44220
09/02/2025, 6:07 PMfast-nail-55400
09/02/2025, 6:08 PMValueError is fine.fast-nail-55400
09/02/2025, 6:08 PMfast-school-44220
09/02/2025, 6:08 PMgorgeous-winter-99296
09/03/2025, 7:11 AMFallibleProcessResult which can be useful in some situations; f.ex. if you want to do analysis and pass more info up the stack. The regular Get(ProcessResult, Process) uses that as an intermediary:
https://github.com/pantsbuild/pants/blob/f1252a157ed28cba64ed5d670c55925b04256a53/src/python/pants/engine/process.py#L375-L397fast-school-44220
09/03/2025, 10:31 AM