richfitz / remake

Make-like declarative workflows in R
Other
340 stars 32 forks source link

``check: code`` doesn't check "I" arguments #169

Open kendonB opened 7 years ago

kendonB commented 7 years ago

R:

test_function <- function(x){
  Sys.sleep(2)
  x
}

remake.yml:

sources: test_function.R
targets:
  all:
    depends:
    - test
  test:
    depends: remake.yml
    command: test_function(I(3))
    check: code
make()
#> [  LOAD ] 
#> [  READ ]       |  # loading sources
#> <  MAKE > all
#> [ BUILD ] test  |  test <- test_function(3)
#> [  READ ]       |  # loading packages
#> [ ----- ] all

New remake.yml:

sources: test_function.R
targets:
  all:
    depends:
    - test
  test:
    depends: remake.yml
    command: test_function(I(2))
    check: code
make()
#> [  LOAD ] 
#> [  READ ]       |  # loading sources
#> <  MAKE > all
#> [    OK ] test
#> [ ----- ] all

check: all seems to work.

krlmlr commented 7 years ago

Thanks, this seems wrong indeed.