fix(ci): Exempt deprecation warnings from the roxygenize warning gate - #114
Merged
Conversation
The gate added in #111 fails the roxygenize step on any warning from `roxygen2::roxygenize()`. That catches deprecation warnings raised inside third-party roclets, which a consumer package cannot act on: in rigraph, `devtag` calls roxygen2's deprecated `tag_words_line()`, and the resulting `lifecycle` warning turned `main` red with no fix available in the repo. Deprecation warnings are now collected separately. They are still echoed as `::warning::` annotations, so they stay visible and can be chased in the roclet that raises them, but they no longer fail the step. Every other warning fails it exactly as before. The match is on the condition class, not the message text: `.Deprecated()` signals a `deprecatedWarning` and `lifecycle::deprecate_warn()` a `lifecycle_warning_deprecated`, while an ordinary `warning()` is a bare `simpleWarning`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hcbd7RdNjqre33JRgc86j8
krlmlr
added a commit
to cynkra/munch
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to cynkra/indiedown
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to cynkra/constructive
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to igraph/igraphdata
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to cynkra/dd
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to cynkra/fledge
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to cynkra/dm
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to duckdb/duckdb-r
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to cynkra/lazytest
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to krlmlr/bindr
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to krlmlr/duckdbneo
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to igraph/rigraph
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to krlmlr/mockr
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to krlmlr/bindrcpp
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to mlfit/mlfit
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to krlmlr/kimisc
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to krlmlr/utf8
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to krlmlr/wrswoR
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to moodymudskipper/boomer
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to moodymudskipper/powerjoin
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to moodymudskipper/nakedpipe
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to moodymudskipper/flow
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to moodymudskipper/unglue
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to moodymudskipper/tricks
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to moodymudskipper/typed
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-dbi/adbi
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-dbi/DBI
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-dbi/DBItest
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-dbi/dblog
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-lib/here
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-dbi/RKazam
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-lib/pillar
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-dbi/RSQLite
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-lib/roxygen2md
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-dbi/RMariaDB
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-dbi/RPostgres
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-prof/procmaps
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-lib/rprojroot
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-prof/profile
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to renkun-ken/formattable
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to tidyverse/blob
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to r-prof/winch
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to tidyverse/hms
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to tidyverse/tibble
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to tidyverse/duckplyr
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com>
krlmlr
added a commit
to krlmlr/duckdb-r
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit 1b871c9)
krlmlr
added a commit
to krlmlr/duckdb-r
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit 1b871c9)
krlmlr
added a commit
to krlmlr/duckdb-r
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit 1b871c9)
krlmlr
added a commit
to krlmlr/duckdb-r
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit 1b871c9)
krlmlr
added a commit
to krlmlr/duckdb-r
that referenced
this pull request
Sep 13, 2026
…cynkra/cynkratemplate#114) Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit 1b871c9)
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.
What this does
#111 wrapped
roxygen2::roxygenize()in awithCallingHandlers()that collects every warning and then fails the step. This PR carves deprecation warnings out of that gate. They are still echoed to the job log as::warning::annotations, so they stay visible and can be chased upstream, but they no longer fail the step. Every other warning fails it exactly as before — the gate itself stays.Why deprecation warnings are different
The gate asks the consumer repo to fix what roxygen2 reports. That is the right ask for a malformed tag or a missing
@param, but not for a deprecation warning raised inside a third-party roclet package. When a roclet calls a roxygen2 function that roxygen2 has since deprecated, the call site is in the roclet, not in the package being documented. There is nothing to fix in the consumer repo, so the gate is a false positive there — and it is a false positive for every repo on the kit that uses that roclet, not just one.In igraph/rigraph the gate turned twelve pre-existing warnings into a red
main. Eleven are actionable in principle. The twelfth is alifecycledeprecation fromdevtagcalling roxygen2's deprecatedtag_words_line(). That one cannot be fixed in rigraph at all, so under the current gate rigraph could never get back to green by its own effort.How the match is made
On the condition class, never on the message text. The classes were checked against R 4.5.3 rather than recalled:
lifecycle::deprecate_warn()→lifecycle_warning_deprecated,rlang_warning,warning,condition.Deprecated()→deprecatedWarning,warning,conditionwarning()→simpleWarning,warning,conditionSo
deprecatedWarningandlifecycle_warning_deprecatedseparate the two deprecation paths from an ordinary warning, and both are matched.Test
The handler logic from the action was run verbatim against the three inputs, plus the mixed case that matches the rigraph situation:
All three kinds are echoed to the log. The two deprecation kinds pass the gate, the ordinary warning still fails it, and a deprecation alongside an ordinary warning does not mask the failure.
Note on the diff
escape()moved out of theelsebranch to the top level of the script, because the deprecation annotations need it too. It is otherwise unchanged. The "no warnings" message now reads "no warnings that fail the step", since deprecations may have been reported just above it.🤖 Generated with Claude Code
https://claude.ai/code/session_01Hcbd7RdNjqre33JRgc86j8
Generated by Claude Code