chilly-magazine-21545
10/13/2020, 3:37 AMawait Get(...)
, which allows `@rule`s to raise exceptions without necessarily making pants exit immediately. i think this will be very useful for plugin authors, but it is easy to wait if we'd prefer to get 2.0 out the door firstfast-nail-55400
10/13/2020, 3:45 AMmaster
changes shouldn’t need to waitchilly-magazine-21545
10/13/2020, 3:45 AMhundreds-breakfast-49010
10/13/2020, 3:46 AMchilly-magazine-21545
10/13/2020, 3:46 AMchilly-magazine-21545
10/13/2020, 3:46 AMchilly-magazine-21545
10/13/2020, 3:47 AMhundreds-father-404
10/13/2020, 3:51 AMOptional
. But also Python != Rust (e.g. no Result
type), and it’s likely very valuable to have the mechanism, even if we discourage it.chilly-magazine-21545
10/13/2020, 3:52 AMhundreds-breakfast-49010
10/13/2020, 3:54 AMhundreds-breakfast-49010
10/13/2020, 3:55 AMchilly-magazine-21545
10/13/2020, 3:55 AMhundreds-father-404
10/13/2020, 3:56 AMMergeDigests
, for example. If anything, it would allow us to write much better error messages.
(For example, it’s possible with the output_path
field for the user to introduce conflicting paths from different assets. It would be AWESOME if we could try except
that one await Get
, and print a custom error message upon failure.)
A big issue with error messages in the engine right now is that they have to be hyper generic, so they often miss valuable contextchilly-magazine-21545
10/13/2020, 3:56 AMhundreds-breakfast-49010
10/13/2020, 3:57 AMchilly-magazine-21545
10/13/2020, 3:58 AMhundreds-father-404
10/13/2020, 4:16 AMchilly-magazine-21545
10/13/2020, 4:16 AMchilly-magazine-21545
10/13/2020, 4:16 AMMergedDigest
errorchilly-magazine-21545
10/13/2020, 4:35 AMhundreds-breakfast-49010
10/13/2020, 4:55 AMPyObject
instead of Value
. not sure to what extent this is going to interfere with your code in this PR @chilly-magazine-21545chilly-magazine-21545
10/13/2020, 4:59 AMhundreds-breakfast-49010
10/13/2020, 5:00 AMchilly-magazine-21545
10/13/2020, 5:02 AMhundreds-breakfast-49010
10/14/2020, 6:18 AMhundreds-breakfast-49010
10/14/2020, 6:20 AMgenerator_send
and generator_throw
, which to me suggests that we might be able to refactor generator_send_or_throw_impl
into a few, simpler functions with simpler type inputs/outputs. but I can't immediately see a way to do this, so I might be wrong and this complexity is actually necessary