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

Add a better error for pin_versions() #657

Merged
merged 4 commits into from Sep 30, 2022
Merged

Conversation

juliasilge
Copy link
Member

Closes #656

library(pins)
tmp <- tempdir()
board <- board_folder(tmp, versioned = TRUE)
pin_write(board, mtcars, 'my-beautiful-cars')
#> Guessing `type = 'rds'`
#> Creating new version '20220930T035916Z-66143'
#> Writing to pin 'my-beautiful-cars'
pin_versions(board)
#> Error in `pin_versions()`:
#> ! Argument `name` is missing, with no default

#> Backtrace:
#>     ▆
#>  1. └─pins::pin_versions(board)
#>  2.   └─rlang::abort("Argument `name` is missing, with no default") at pins-r/R/pin_versions.R:42:4
pin_versions(board, 'my-beautiful-cars')
#> # A tibble: 1 × 3
#>   version                created             hash 
#>   <chr>                  <dttm>              <chr>
#> 1 20220930T035916Z-66143 2022-09-29 21:59:16 66143

Created on 2022-09-29 with reprex v2.0.2

We decided that we're not ready to deprecate or remove any of the code that keeps the v0 interface working, so for the time being, let's add more logic for this improved error.

@juliasilge juliasilge merged commit bb200b0 into main Sep 30, 2022
@juliasilge juliasilge deleted the better-error-versions branch September 30, 2022 22:36
@github-actions
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uninformative error when missing name for pin_versions()
1 participant