Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Empty meta file causes failure #1523

@dakvid

Description

@dakvid

Prework

  • I have read and understand help guide.
  • I understand and agree to contributing guide.
  • I am confident this issue is a bug in targets itself, not a user error or a bug in a different package. I have done troubleshooting on my own to verify this. User questions which are not bugs in targets should be posted as discussions instead of bug reports.
  • I am posting a runnable reprex to help others troubleshoot.

Description

If the _targets/meta/meta file is empty then targets fails with an uninformative subscript out of bounds error.

It sounds like an unlikely scenario, but I just hit it creating a fresh copy of an existing pipeline (as a new git worktree), running tar_make() and almost immediately hitting Control-C when I remembered I meant to change something in .env. After that it kept failing and it took me a depressingly long time to figure out where the error was coming from - hopefully it's something targets would be able to detect and recover from to avoid confusion.

reprex

  1. Create new directory
  2. run targets::use_targets()
  3. in shell, mkdir -p _targets/meta; touch _targets/meta/meta
  4. run targets::tar_make()

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions