Closed smingerson closed 3 years ago
Thanks for your precious feedback.
flow doesn't work on primitives like max, and indeed there is nothing to show there, but I need to put a better error message and I will.
I'm suprised about identity, good catch! It seems that I need an exception for flow_run when the body is a symbol (flow_view works)
ah, funny, about identity it's actually a base R bug, utils::isS3stdGeneric(identity) triggers an error.
It was easy to work around fortunately.
And functions without body, such as primitives like max
, now fail explicitly.
library(flow)
flow_view(identity)
flow_view(max)
#> Error in as.function.default(c(as.list(formals(fun)), list(value)), envir): l'utilisation de l'environnement NULL n'est plus autorisée
flow_run(identity(1))
#> Error in bdexpr[[1L]]: objet de type 'symbol' non indiçable
flow_run(max(1))
#> Error in while (as.character(bdexpr[[1L]]) == "{") bdexpr <- bdexpr[[2L]]: l'argument est de longueur nulle
Created on 2020-08-20 by the reprex package (v0.3.0)
https://github.com/moodymudskipper/flow/commit/a6585f14cf13e0f072b5a234838ef17b9320a8ff https://github.com/moodymudskipper/flow/commit/b920419655181d018a08773f630add5d0d7da7b2
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
Functions such as
identity()
andmax()
fail. Not that there's really anything useful to be gained from viewing the diagrams of these functions, but a more informative error would be great if diagrams for them don't pan out. Thank you!