Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning when detecting lots of input files #896

Closed
3 tasks done
wlandau opened this issue Jun 5, 2019 · 1 comment
Closed
3 tasks done

Warning when detecting lots of input files #896

wlandau opened this issue Jun 5, 2019 · 1 comment
Assignees

Comments

@wlandau
Copy link
Member

wlandau commented Jun 5, 2019

Prework

Description

When we pass a large-ish character to file_in(), we get a warning. All the right files seem to be detected anyway, but we should still remove the causej of the warning.

Reproducible example

library(drake)
plan <- drake_plan(x = file_in(!!letters))
config <- drake_config(plan)
#> Warning in if (nzchar(expr)) {: the condition has length > 1 and only the
#> first element will be used
deps <- deps_target(x, config)
deps <- deps[order(deps$name), ]
head(deps)
#> # A tibble: 6 x 2
#>   name  type   
#>   <chr> <chr>  
#> 1 a     file_in
#> 2 b     file_in
#> 3 c     file_in
#> 4 d     file_in
#> 5 e     file_in
#> 6 f     file_in
tail(deps)
#> # A tibble: 6 x 2
#>   name  type   
#>   <chr> <chr>  
#> 1 u     file_in
#> 2 v     file_in
#> 3 w     file_in
#> 4 x     file_in
#> 5 y     file_in
#> 6 z     file_in

Created on 2019-06-05 by the reprex package (v0.3.0)

Expected output

No warning.

@wlandau wlandau self-assigned this Jun 5, 2019
@wlandau
Copy link
Member Author

wlandau commented Jun 5, 2019

Fixed in 16c4324.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant