onetime (development version)
Not setting
idexplicitly is now deprecated with a warning. Doing this is brittle: it can lead to silent errors when you use onetime functions in more than one place.New function
onetime_mark_as_done()to manually mark an action as done.New function
onetime_dir("dirname")returns a path to an arbitrary subdirectory of the onetime base directory for lockfiles.onetime_message_confirm()now prints its message by default in non-interactive sessions, along with instructions on how to hide the message usingonetime_mark_as_done().onetime_message_confirm()now passes multiple arguments tomessage()using.... This makes it easier to pass long messages. Using a namedmessageargument is soft-deprecated.onetime_only()gains adefaultargument which is returned by the wrapper function if the inner function was not called. The defaultdefaultisNULL.onetime_message()and friends all now return their results invisibly. This is nicer for use in rmarkdown documents.onetime_do()now always returns invisibly, even whendefaultis returned.onetime_only()now respects the visibility of the wrapped function.New vignette.