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

Long filepaths (over 100 bytes) fail R CMD check #64

Open
flodel opened this issue Sep 16, 2021 · 1 comment
Open

Long filepaths (over 100 bytes) fail R CMD check #64

flodel opened this issue Sep 16, 2021 · 1 comment

Comments

@flodel
Copy link

flodel commented Sep 16, 2021

Hello, I am hoping that in a future release you can reduce the length of the filepaths/filenames that are generated for storing the response data. Currently, you are including the URL in the filepath, which is leading to very long filepaths. When a file path reaches 100 bytes, it causes warnings in the R CMD check of a package I am writing:

Tarballs are only required to store paths of up to 100 bytes and cannot store those of more than 256 bytes, with restrictions including to 100 bytes for the final component.
See section 'Package structure' in the 'Writing R extensions' manual.

I guess you could shorten the filepaths by using hash signatures. Or you could create random short filenames but keep a mapping in a central file. Just throwing some ideas.

Thanks for the useful package.

@maelle
Copy link
Contributor

maelle commented Apr 27, 2022

@flodel you might find https://enpiar.com/r/httptest/index.html#how-do-i-fix-non-portable-file-paths useful

Now if you're using with_mock_dir(), see #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants