GithubHelp home page GithubHelp logo

Comments (14)

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q avatar 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented on August 17, 2024 1

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.

pfuehrlich-pik avatar pfuehrlich-pik commented on August 17, 2024

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.

orichters avatar orichters commented on August 17, 2024

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.

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q avatar 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented on August 17, 2024

Just deactivate the styler caching. It's not used anyway.

from lucode2.

orichters avatar orichters commented on August 17, 2024

@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q: How can this be done?

from lucode2.

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q avatar 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented on August 17, 2024

echo 'options(R.cache.enable = FALSE)' >> .Rprofile

from lucode2.

pfuehrlich-pik avatar pfuehrlich-pik commented on August 17, 2024

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.

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q avatar 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented on August 17, 2024

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.

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q avatar 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented on August 17, 2024

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.

pfuehrlich-pik avatar pfuehrlich-pik commented on August 17, 2024

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.

pfuehrlich-pik avatar pfuehrlich-pik commented on August 17, 2024

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.

0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q avatar 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q commented on August 17, 2024

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.

pfuehrlich-pik avatar pfuehrlich-pik commented on August 17, 2024

That's a good idea, will do that 👍

from lucode2.

orichters avatar orichters commented on August 17, 2024

Thank you both!

from lucode2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.