I just noticed that <fallible_to_exec_result_or_ra...
# development
h
I just noticed that fallible_to_exec_result_or_raise is a
@rule
but is not
async
, and yet we await it explicltly in a few places and I guess that works… 🤷
I’m wondering what the call-by-name idiom should be for Process->ProcessResult. That is extremely common, so it seems like we should have a direct rule for it, rather than awaiting on this and having to implicitly go from Process->FallibleProcessResult
b
Re async/sync, I guess you may've found that the rule decorator makes the final function
async
even if the input is sync: https://github.com/huonw/pants/blob/fa583d6b36df4c7bb1c560dc5429d1bfb474ba51/src/python/pants/engine/rules.py#L204
Wrapper call-by-name functions for common compositions sounds good to me!
h
Yeah, that seems wonky, we should require rules to be defined as async…