bored-art-40741
09/20/2021, 11:42 PMNone
, I want to return it and I don't want to propagate the Optional
in my return type"hundreds-father-404
09/20/2021, 11:46 PMwitty-crayon-22786
09/20/2021, 11:50 PMcast
, right? is the type-ignore preferred?bored-art-40741
09/20/2021, 11:52 PMNone
bored-art-40741
09/20/2021, 11:54 PMFallibleJavaSourceDependencyAnalysisResult
here: https://github.com/pantsbuild/pants/pull/12890/files#diff-a3ed131ee51e1222afe5bb72399706ad9aa596af614fc1237c2e7e5f3d19a498enough-analyst-54434
09/20/2021, 11:59 PMnot None
instead of testing the exit code? The real answer here would be for rule return types to support Union, but they don't.bored-art-40741
09/21/2021, 12:00 AMnot None
and just assuming that implies a non-zero exit code, although it would workenough-analyst-54434
09/21/2021, 12:00 AMFallibleJavaSourceDependencyAnalysisResult
have a single union field.enough-analyst-54434
09/21/2021, 12:00 AMbored-art-40741
09/21/2021, 12:00 AMbored-art-40741
09/21/2021, 12:01 AMenough-analyst-54434
09/21/2021, 12:01 AMbored-art-40741
09/21/2021, 12:35 AManalysis
in the fallible result at all, I'd might as well have that only hold the process result, then having the enriching rule encapsulate the business logic of extracting the digest from a successful process executionbored-art-40741
09/21/2021, 12:41 AMresult = await Get(ProcessResult, FallibleProcessResult, fallible_result.process_result)
bored-art-40741
09/21/2021, 12:42 AMbored-art-40741
09/21/2021, 12:43 AMraise_process_execution_if_failed
method on FallibleProcessResult
witty-crayon-22786
09/21/2021, 12:43 AMbored-art-40741
09/21/2021, 12:43 AMaverage-vr-56795
09/21/2021, 8:14 AMProcess.platform
field as the basis for the runner-selection, or needing a new field?witty-crayon-22786
09/21/2021, 4:09 PMProcess.platform
seems fine i think?witty-crayon-22786
09/21/2021, 4:10 PM