# NOT RUN {
tar_dir({
tar_script(
tar_pipeline(
tar_target(y1, 1 + 1),
tar_target(y2, 1 + 1),
tar_target(z, y1 + y2)
)
)
tar_make()
tar_invalidate(starts_with("y")) # Only invalidates y1 and y2.
tar_make() # y1 and y2 rebuild but return same values, so z is up to date.
})
# }
Run the code above in your browser using DataLab