Replies: 1 comment 4 replies
-
That excerpt from the documentation is about what happens if you set the |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue
Currently nodes returning
NULL
will be considered "invalid":As a result, even if the underlying result should be
NULL
, the pipeline will still consider the node to be invalid. One of the consequences I often find is when making targets withshortcut=TRUE
, the pipeline raises errors ifNULL
values are encountered.Is there any way to avoid raising errors in such cases? Maybe users can set options to ignore NULL... but then I found out if a node is truly invalid, then we still need to raise errors.... Duh
Propose
Maybe we can consider a less frequently used symbol (you can create it via
alist(a=)[[1]]
) to store "invalid results"? This symbol is very special, normally you are unlikely to create it elsewhere in base R (for example,str2lang("")
andquote()
will raise errors) unless using the low-levelC
interface viaR_MissingArg
symbol. Also trying to evaluate this symbol will trigger "missing" error (instead of "object not found"):This symbol perfectly fits in the situation where a target is errored (the corresponding value is missing!).
One propose I want to make is to
NULL
andR_MissingArg
symbols as invalid values by default, so current users won't be affectedR_MissingArg
as "invalid" node values instead ofNULL
. The hash values of errored nodes will change, but the value is out-dated anyway, so...NULL
as valid. This can be enabled by default, or just in shortcut mode.If you don't like
alist(a=)[[1]]
, I thinkrlang::sym("")
also generates the symbol.Beta Was this translation helpful? Give feedback.
All reactions