-
Notifications
You must be signed in to change notification settings - Fork 336
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
Add usethis as Config/Needs/website dependency #1572
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you merge, can you please adjust the commit message so that the title is:
Install usethis in pkgdown workflow
And the body is:
Ensures that usethis functions are autolinked. Fixes #1552.
In general I think "fixes #issue-number" should only ever go in the body, not the title.
for some reason the change wasn't enough, no auto-linking yet. 👀 |
I am still missing some understanding of how to tell pak to install |
Maybe I'll wait for actions/toolkit#713 to be fixed (to then exclude pak from the cache) |
.github/workflows/pkgdown.yaml
Outdated
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") | ||
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds") | ||
shell: Rscript {0} | ||
sudo R -q -e 'install.packages("pak", lib = .Library, repos = "https://r-lib.github.io/p/pak/dev/")' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need the sudo here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was an idea suggested by @gaborcsardi, because without sudo I was told the folder was not writable.
The whole problem in this workflow is that I want to install pak from its daily repo but pak is cached with all other packages and therefore the cached version overwrites the old version.
In the end I might just change the cache name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping the -1-
to -2-
cleared the cache already, I guess? But this is a general problem with this workflow: if the cache is restored then an older version of pak is potentially restored as well.
We tried to install pak into .Library
, so it is not cached. But that apparently needs sudo
, and then the cache files are owned by root, which causes different problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, I'd suggest eliminating everything from this PR except for the Needs field in the DESCRIPTION and opening an issue in r-lib/actions so we fix this upstream.
Related to #1552