Embedded the transcript rather than writing it directly to make the info string issue visible.
A block like
``` ucm :error
scratch/main> this isn’t a command
will allow the transcript to succeed, since the error happens when the
transcript is run.
However, a block like
///> this isn’t a command
should succeed, but won’t, because we only return a structure containing the
info flags (:error) if the content also parses successfully.
We should instead return different errors for failing to parse the structure of
the block vs failing to parse its content, with the latter preserving the flags
so we can still handle :error properly when the content fails to parse.
More reasonably, a block like
scratch/main> this isn’t a command
won’t succeed, because we have a parse error before we even finish the info
string, so we can’t know that we expect the block to error. I think we could
rescue some of these cases as well (unknown tags vs completely unrecognizable
info string), but it’s probably worth waiting for #5214 for that.
Embedded the transcript rather than writing it directly to make the info string issue visible.
will allow the transcript to succeed, since the error happens when the transcript is run.
However, a block like
should succeed, but won’t, because we only return a structure containing the info flags (
:error
) if the content also parses successfully.We should instead return different errors for failing to parse the structure of the block vs failing to parse its content, with the latter preserving the flags so we can still handle
:error
properly when the content fails to parse.More reasonably, a block like
won’t succeed, because we have a parse error before we even finish the info string, so we can’t know that we expect the block to error. I think we could rescue some of these cases as well (unknown tags vs completely unrecognizable info string), but it’s probably worth waiting for #5214 for that.