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

tolerate errors when querying available packages #1589

Merged
merged 3 commits into from
Jul 25, 2023

Conversation

kevinushey
Copy link
Collaborator

Closes #1578.

@kevinushey kevinushey requested a review from hadley July 25, 2023 00:25
skip_on_cran()
skip_if_not(grepl("\\bbinary\\b", .Platform$pkgType))

dbs <- available_packages(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add snapshot test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should the snapshot capture? (since the set of available packages from CRAN will change over time)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also possible that drat could start providing binaries in the future (or at least provide the infrastructure so available.packages() doesn't complain) so I think a snapshot test doesn't quite fit.

Copy link
Member

@hadley hadley Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking you'd want to capture the "renv was unable to query available package" message (and couldn't you just use a url that was guaranteed not to be a repo?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a very good point! I'll update in a separate PR.

@kevinushey kevinushey merged commit dc09173 into main Jul 25, 2023
12 checks passed
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.

renv::install() fails when CRAN-like repositories are in renv.lock
2 participants