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

update caching workflow; use universe #13

Merged
merged 2 commits into from
May 28, 2021
Merged

update caching workflow; use universe #13

merged 2 commits into from
May 28, 2021

Conversation

zkamvar
Copy link
Contributor

@zkamvar zkamvar commented May 28, 2021

This updates the workflow and depends on the success of carpentries/sandpaper-docs#32

The following changes are made:

  • Creation of cache restore files now comes before the cache mechanism
  • I have switched from our drat repository to our R universe because it builds every hour
  • I have removed the Install mac deps step because we have added {textshaping}, {gert}, and {stringi} to our dependencies.

This will really speed up our build process!

@zkamvar
Copy link
Contributor Author

zkamvar commented May 28, 2021

This appears to be working... kind of, so I'm going to merge it.

@zkamvar zkamvar merged commit 19f0f5f into main May 28, 2021
@zkamvar zkamvar deleted the fix-cache-again branch May 28, 2021 21:41
@zkamvar
Copy link
Contributor Author

zkamvar commented May 28, 2021

Note: The kind of part was due to me expecting that we could restore the packages discovered in the dependency query step. It turns out that this creates a loop where you are forever installing packages.

The reason for this is that the cache is restored based on the key which is controlled by the R version and the output of remotes::package_deps(), which tells you what packages need to be updated based on the current state of packages in your library. We query the dependencies before the cache is restored, so this gives us a snapshot of ALL the packages we need.

My thought was that I would be able to use that object downstream to update the packages, but because it queried the packages when we didn't have anything in the library, it would cause a situation where ALL of the packages would be updated. The solution (in b3cbea8) was to re-query the the packages AFTER the cache was restored to get an accurate assessment of what packages (if any) needed updating.

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

Successfully merging this pull request may close these issues.

1 participant