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

Supply scratch directory through tar_resources() #893

Closed
4 tasks done
wlandau opened this issue Aug 1, 2022 · 1 comment
Closed
4 tasks done

Supply scratch directory through tar_resources() #893

wlandau opened this issue Aug 1, 2022 · 1 comment
Assignees

Comments

@wlandau
Copy link
Member

wlandau commented Aug 1, 2022

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.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a "trouble" or "other" issue so we can discuss your use case and search for existing solutions first.
  • Format your code according to the tidyverse style guide.

Proposal

Currently, the scratch directory is always file.path(tar_config_get("store"), "scratch"). This is and #891 may contribute to #889. It would be better to supply scratch through tar_resources() (after #892 is implemented). This also makes it easier to make sure the internals of each target object know about a good scratch directory.

@wlandau wlandau self-assigned this Aug 1, 2022
wlandau pushed a commit that referenced this issue Aug 1, 2022
@wlandau
Copy link
Member Author

wlandau commented Aug 1, 2022

Deciding against this because it gets really messy. Local targets can use the local data store for scratch files, and cloud targets can use files in tempdir(). All this is managed through path_scratch_dir() in R/utils_path.R.

@wlandau wlandau closed this as completed Aug 1, 2022
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