Always migrate RoxygenNote to Config/roxygen2/version - #1911
Merged
Conversation
`update_roxygen_version()` did all its work, including deleting `RoxygenNote`, inside an `else if (!identical(cur, prev))` branch. Since `roxygen_version()` prefers `Config/roxygen2/version`, the migration was skipped whenever that field already matched the installed version, so a `RoxygenNote` re-added by a collaborator on roxygen2 7.x stayed forever. Decide from the actual DESCRIPTION fields instead, still guarding both writes so DESCRIPTION isn't touched when it's already up to date. This also fixes packages with only `RoxygenNote: <installed version>`, which were never migrated at all. Fixes #1876
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.
Fixes #1876.
update_roxygen_version()did all its work — including deletingRoxygenNote— inside anelse if (!identical(cur, prev))branch. Sinceroxygen_version()prefersConfig/roxygen2/version, the migration was skipped whenever that field already matched the installed version. So if a collaborator on roxygen2 7.x re-addedRoxygenNote, it stayed inDESCRIPTIONforever.Now the migration decides from the actual
DESCRIPTIONfields rather than fromprev, still guarding both writes soDESCRIPTIONisn't rewritten when nothing needs to change. This also fixes packages with onlyRoxygenNote: <installed version>and noConfigfield, which were never migrated at all.local_package_copy()now stampsConfig/roxygen2/versioninstead of the deprecated field, so the fixtures represent a post-8.0.0 package and don't all emit a migration message.🤖 Generated with Claude Code