Skip to content

Handle ellmer >= 0.4.2 deprecation of type_object(.additional_properties) - #665

Open
thisisnic wants to merge 4 commits into
cynkra:mainfrom
thisisnic:ellmer-0.4.2
Open

Handle ellmer >= 0.4.2 deprecation of type_object(.additional_properties)#665
thisisnic wants to merge 4 commits into
cynkra:mainfrom
thisisnic:ellmer-0.4.2

Conversation

@thisisnic

Copy link
Copy Markdown

Fixes #664

ellmer 0.4.2 deprecates the .additional_properties argument to type_object(). This PR updates the type_object constructor to only include .additional_properties on older ellmer versions, and version-gates the corresponding tests.

@github-actions

Copy link
Copy Markdown
Contributor

Formatting suggestions available

A patch file with formatting suggestions has been generated. You can apply it using one of these methods:

Method 1: Apply via gh CLI

# Download and apply the patch directly
gh run download 29255951386 --repo cynkra/constructive --name changes-patch && patch -p1 < changes.patch && rm changes.patch

Repo owners can also apply the patch automatically. Click the button to jump to the comment box, then post:

/apply-patch

Apply patch

Method 2: View the patch

Click to see the patch contents
diff --git a/DESCRIPTION b/DESCRIPTION
index 01e01a2..cd771d1 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -59,4 +59,4 @@ Config/Needs/website: cynkra/cynkratemplate
 Config/testthat/edition: 3
 Encoding: UTF-8
 Roxygen: list(markdown = TRUE)
-RoxygenNote: 7.3.3.9000
+Config/roxygen2/version: 8.0.0.9000
diff --git a/NAMESPACE b/NAMESPACE
index 196dde1..1411ee7 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -554,9 +554,19 @@ export(opts_yearqtr)
 export(opts_zoo)
 export(opts_zooreg)
 import(rlang)
-importFrom(grDevices,dev.off)
-importFrom(grDevices,pdf)
+importFrom(grDevices,
+  dev.off,
+  pdf
+)
 importFrom(methods,getSlots)
 importFrom(stats,setNames)
+importFrom(utils,
+  capture.output,
+  getFromNamespace,
+  head,
+  methods,
+  packageDescription,
+  tail
+)
 useDynLib("")
 useDynLib(constructive)

This comment was automatically generated by the commit-suggester workflow.

@krlmlr

krlmlr commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Thanks, Nic. This drops an entire test. Intended?

@thisisnic

Copy link
Copy Markdown
Author

Hmm, looking at it again, I think I dropped it as it looked the same as the one above but with .additional_properties added, but now I see there's also the required parameter in there. My bad, will add it back in minus additional_properties.

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.

test-s7-elmer_TypeBasic failure with ellmer 0.4.2

2 participants