Skip to content

Always migrate RoxygenNote to Config/roxygen2/version - #1911

Merged
hadley merged 1 commit into
mainfrom
roxygen-note-migration
Jul 27, 2026
Merged

Always migrate RoxygenNote to Config/roxygen2/version#1911
hadley merged 1 commit into
mainfrom
roxygen-note-migration

Conversation

@hadley

@hadley hadley commented Jul 27, 2026

Copy link
Copy Markdown
Member

Fixes #1876.

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 if a collaborator on roxygen2 7.x re-added RoxygenNote, it stayed in DESCRIPTION forever.

Now the migration decides from the actual DESCRIPTION fields rather than from prev, still guarding both writes so DESCRIPTION isn't rewritten when nothing needs to change. This also fixes packages with only RoxygenNote: <installed version> and no Config field, which were never migrated at all.

local_package_copy() now stamps Config/roxygen2/version instead 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

`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
@hadley
hadley merged commit 0db02fd into main Jul 27, 2026
13 checks passed
@hadley
hadley deleted the roxygen-note-migration branch July 27, 2026 13:41
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.

Migration may be skipped if DESCRIPTION has both pre-8.0.0 and 8.0.0 RoxygenNote entries

1 participant