Skip to content

fix: stop emitting deprecated ellmer .additional_properties argument - #666

Open
krlmlr wants to merge 3 commits into
mainfrom
claude/fix-cicd-failures-63v5pe
Open

fix: stop emitting deprecated ellmer .additional_properties argument#666
krlmlr wants to merge 3 commits into
mainfrom
claude/fix-cicd-failures-63v5pe

Conversation

@krlmlr

@krlmlr krlmlr commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the R CMD check failures on the rcc and rcc dev workflows (run 29805578246), all caused by updated upstream dependencies.

Before: [ FAIL 3 | WARN 2 | SKIP 10 | PASS 236 ]
After: [ FAIL 0 | WARN 0 | SKIP 17 | PASS 232 ] (extra skips are optional Suggests not installed in the local verification env)

Changes

ellmer — real code fix (R/s7-elmer_TypeObject.R)

ellmer deprecated the .additional_properties argument of type_object(), changing its formal default from FALSE to deprecated(). As a result keep_only_non_defaults() could no longer recognise FALSE as the default, so construct() emitted .additional_properties = FALSE for every reconstructed TypeObject and fired a deprecation warning. Since .additional_properties has always defaulted to FALSE for type_object(), we now emit it only when it is TRUE, producing idiomatic, warning-free code that round-trips again.

Snapshot refreshes (upstream output changes, not regressions)

  • test-s3-integer64.R: bit64::as.integer64() now warns NAs introduced by coercion to integer64 range for out-of-range strings; snapshot updated to capture the condition.
  • test-s3-tbl_df.R: tibble flipped the structure() argument order to row.names before class; snapshot updated (single line).

Test cleanup

  • Silenced the .additional_properties deprecation warning in the two test-s7-elmer_TypeBasic.R blocks that deliberately exercise the additional_properties = TRUE round-trip, via withr::local_options(lifecycle_verbosity = "quiet").

Verification

Reproduced all three failures locally (R 4.5.3, latest CRAN bit64 4.8.2, tibble 3.3.1, ellmer 0.4.2 — the deprecation is already active in 0.4.2) and confirmed a clean run after the fix. No roxygen/exports changed, so no document() needed; no air.toml present.

🤖 Generated with Claude Code

https://claude.ai/code/session_016BRYo2D5L4wpgaTFTHH2B7


Generated by Claude Code

@krlmlr
krlmlr requested a review from moodymudskipper July 21, 2026 21:23
claude and others added 2 commits July 22, 2026 20:58
`ellmer` 0.5.0 deprecated the `.additional_properties` argument of
`type_object()`, changing its formal default to `deprecated()`. As a
result `keep_only_non_defaults()` could no longer detect `FALSE` as the
default, so `construct()` emitted `.additional_properties = FALSE` for
every reconstructed `TypeObject` and triggered a deprecation warning.

`.additional_properties` has always defaulted to `FALSE` for
`type_object()`, so only emit it when it is `TRUE`, producing idiomatic,
warning-free code.

Also refresh snapshots for upstream changes:
- `bit64` now warns "NAs introduced by coercion to integer64 range" when
  coercing out-of-range strings (`test-s3-integer64.R`).
- `tibble` flipped the `structure()` argument order to
  `row.names` before `class` (`test-s3-tbl_df.R`).

Silence the `.additional_properties` deprecation warning in the tests
that deliberately exercise the `additional_properties = TRUE` round-trip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016BRYo2D5L4wpgaTFTHH2B7
@krlmlr
krlmlr force-pushed the claude/fix-cicd-failures-63v5pe branch from 6a1c355 to 1697466 Compare July 22, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants