Comments (14)
Alternatively, since styler
is only used via style_file()
in lucode2::autoFormat()
, and since that function is called nowhere and only going to be invoked by the user, one can move styler
to Suggests:
and call styler::style_file()
, while guarding with rlang::check_installed('styler')
.
That way styler
is not uselessly attached every time lucode2
is attached, and doesn't fail fiddling with its cache for whatever reason.
from lucode2.
Seems like /home/lavinia/.cache/R/R.cache/styler
has too restrictive permissions, but that's in Lavinia's home folder (because cronjobs now run using her user account) so I cannot check or change that. Can you have a look @LaviniaBaumstark ?
from lucode2.
The strange thing is that this happens not every time. The other AMTs went well, same in the past. Same with the second attempt of the test. No idea what is going on there.
from lucode2.
Just deactivate the styler caching. It's not used anyway.
from lucode2.
@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q: How can this be done?
from lucode2.
echo 'options(R.cache.enable = FALSE)' >> .Rprofile
from lucode2.
options("styler.cache_name" = NULL)
I'll just put this into our global .Rprofile
. We're using styler so infrequently that I don't think small performance improvements justify dealing with weird errors like this. I checked with Lavinia and her file permissions on the folder seem fine.
from lucode2.
Seems like
/home/lavinia/.cache/R/R.cache/styler
has too restrictive permissions, but that's in Lavinia's home folder (because cronjobs now run using her user account) […]
So Lavinia's home directory has too restrictive permissions for the cron job running on her account?
from lucode2.
options("styler.cache_name" = NULL) I'll just put this into our global
.Rprofile
.
You can't set NULL
options. That won't work.
from lucode2.
Setting an option to NULL removes it altogether (as if it was not set at all). In this case it indeed doesn't work because styler checks onLoad whether the option is set. I don't see a way to disable the styler cache via options/envvars so I'll ask Lavinia to create the missing folder manually and hope for the best.
from lucode2.
echo 'options(R.cache.enable = FALSE)' >> .Rprofile
This does disable R.cache in general, not only for styler, so it seems overkill to put this into the global .Rprofile
from lucode2.
echo 'options(R.cache.enable = FALSE)' >> .Rprofile
This does disable R.cache in general, not only for styler, so it seems overkill to put this into the global .Rprofile
We don't use any other package that uses R.cache
.
from lucode2.
That's a good idea, will do that 👍
from lucode2.
Thank you both!
from lucode2.
Related Issues (20)
- getGitHubRepo() may return list of remotes, bedazzeling other functions HOT 1
- build library for windows broken
- lucode2 can't build itself (nor any other package) HOT 2
- tell people how to switch off linter warning HOT 2
- package2readme() fails with mrremind HOT 5
- check() does not stop on failed tests
- `package2readme()` writes wrong version number in README.md HOT 4
- .pre-commit-config related commit causes an issue HOT 5
- branch protection? HOT 1
- manipulateConfig() breaks REMIND code with slashes in comments HOT 2
- manipulateConfig.R does not warn if a supplied key is missing HOT 4
- manipulateConfig: doesn't handle GAMS comments properly HOT 3
- feature request for checkDeps.R HOT 2
- add Makefile for commonly used commands
- manipulateConfig / manipulateFile do not warn if config cannot be used HOT 1
- buildLibrary does work not with lib arg HOT 1
- running buildLibrary() introduces superfluous blanks in man files HOT 3
- False negative on R CMD check via buildLibrary() on Github Workflow
- manipulateConfig: doesn't handle GAMS unquoted comments that include "=" sign properly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lucode2.