Closed billdenney closed 3 years ago
This error happens during drake
's static code analysis to detect dependencies. Error messages are now improved:
foo <- function() scale_y_log10() + mod <- list()
drake::make(drake::drake_plan(bar = foo()))
#> Error: subscript out of bounds
#> Malformed code:
#> scale_y_log10() + mod <- list()
#>
#> Malformed code:
#> function () scale_y_log10() + mod <- list()
Created on 2021-07-02 by the reprex package (v2.0.0)
Thanks!
Prework
Description
I have a large (for me) plan with about 100 targets. While working on it, I had some subtly invalid code. The code parsed with the R parser, but it was definitely an error on my part. When I tried to run the plan, I got the error below. It took me a bit of time to find the problem because the error didn't give any real hints of where the problem started.
The request is to catch coding errors like this and give a more informative error than "subscript out of bounds".
Reproducible example
Created on 2021-07-01 by the reprex package (v2.0.0)