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

Targets no longer in the pipeline are recycled anyway #191

Closed
6 tasks done
wlandau opened this issue Oct 15, 2020 · 0 comments
Closed
6 tasks done

Targets no longer in the pipeline are recycled anyway #191

wlandau opened this issue Oct 15, 2020 · 0 comments
Assignees

Comments

@wlandau
Copy link
Collaborator

wlandau commented Oct 15, 2020

Prework

  • Read and agree to the code of conduct and contributing guidelines.
  • If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
  • Post a minimal reproducible example so the maintainer can troubleshoot the problems you identify. A reproducible example is:
    • Runnable: post enough R code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the tidyverse style guide.

Description

If I remove a target from tar_pipeline(), tar_make() still tries to use it.

Reproducible example

library(targets)
tar_script({
  options(crayon.enabled = FALSE)
  tar_pipeline(
    tar_target(a, 1),
    tar_target(b, a)
  )
})

tar_make()
#> ● run target a
#> ● run target b

tar_script({
  options(crayon.enabled = FALSE)
  tar_pipeline(
    tar_target(b, a)
  )
})

tar_make()
#> ✓ skip target b
#> ✓ Already up to date.

Created on 2020-10-15 by the reprex package (v0.3.0)

Expected result

tar_make() should have thrown an error because target a is no longer in the pipeline.

@wlandau wlandau self-assigned this Oct 15, 2020
wlandau-lilly pushed a commit that referenced this issue Oct 15, 2020
@wlandau wlandau changed the title Recycled targets no longer in the pipeline Targets no longer in the pipeline are recycled anyway Oct 15, 2020
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