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

Use CLI errors #241

Closed
EmilHvitfeldt opened this issue Jul 25, 2024 · 2 comments · Fixed by #244
Closed

Use CLI errors #241

EmilHvitfeldt opened this issue Jul 25, 2024 · 2 comments · Fixed by #244
Labels
feature a feature request or enhancement

Comments

@EmilHvitfeldt
Copy link
Member

EmilHvitfeldt commented Jul 25, 2024

Ref: tidymodels/rsample#457

Most or all errors thrown in this package are made via rlang::abort(). We are transitioning to cli::cli_abort() to make use of the richer styling options for errors via cli (which calls rlang under the hood).

The package itself uses abort() and warn() fairly straightforwardly so I don't think this will be challenging.

All warn() calls are in remove_* functions, doing the same thing.

took a look and found https://github.com/tidymodels/workflows/blob/main/R/broom.R#L38 which won't be reached because of arg_match()

This issue is deliberately not a tidy-dev-day issue because {workflows} imports dev versions of {hardhat}, {parsnip}, {recipes}, and {rsample}. And imports the pre-CRAN package {tailor}

@EmilHvitfeldt EmilHvitfeldt added the feature a feature request or enhancement label Jul 25, 2024
@simonpcouch
Copy link
Contributor

Ah, should not have actually closed. Those were just the namespaced calls!

Copy link

This issue 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 Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants