Suggest a fix if a mismatch in roxygen2 versions is found during check#2636
Merged
hadley merged 3 commits intor-lib:mainfrom Jan 21, 2026
Merged
Suggest a fix if a mismatch in roxygen2 versions is found during check#2636hadley merged 3 commits intor-lib:mainfrom
hadley merged 3 commits intor-lib:mainfrom
Conversation
jennybc
reviewed
Jan 13, 2026
R/check.R
Outdated
| cli::cli_inform(c( | ||
| i = "Installed roxygen2 version ({installed}) doesn't match required ({required})", | ||
| x = "{.fun check} will not re-document this package" | ||
| x = "{.fun check} will not re-document this package, use {.fun document} to update the {.file DESCRIPTION} file" |
Member
There was a problem hiding this comment.
I'm worried this is a case of being overly specific with the recommendation.
For example, for me, this is much more often a case of me running dev roxygen2. In which case, I usually want to downgrade the installed roxygen2 version to the released version.
I'm not totally convinced that more words are going to help. It's possible that seeing this a couple times, feeling puzzled, then figuring out how you want to proceed is sort of a package development rite of passage?
But we can discuss a different wording.
Member
There was a problem hiding this comment.
I tweaked the error to fit in more with our usual style (i.e. make it more of a hint) and did some refactoring to make it easier to test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Would such wording do? Does this deserve a NEWS item?
Fixes #2624.