Skip to content

Update extendr-api to 0.9.0#28

Merged
dfalbel merged 3 commits into
mainfrom
bump-extendr-0.9.0
Apr 21, 2026
Merged

Update extendr-api to 0.9.0#28
dfalbel merged 3 commits into
mainfrom
bump-extendr-0.9.0

Conversation

@dfalbel

@dfalbel dfalbel commented Apr 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Bump extendr-api from 0.8.1 to 0.9.0 and rextendr config from 0.4.2 to 0.5.0
  • Fix breaking changes: qualify Result in trainers.rs, add TryFrom<&Robj> impls for custom types used with Nullable<T>
  • Re-vendor dependencies and update README badge

Test plan

  • cargo build compiles cleanly
  • R CMD INSTALL succeeds
  • All 47 tests pass via devtools::test()

dfalbel added 3 commits April 21, 2026 14:40
Breaking changes in extendr 0.9.0:
- Result removed from prelude (qualify as extendr_api::Result)
- Nullable<T> now requires T: TryFrom<&Robj> (add ref impls for
  custom types: RVocab, RMerges, RUnigramVocab, RPaddingParams,
  RTruncationParams)

Also updates rextendr version to 0.5.0, README badge, NEWS, and
re-vendors dependencies.
On macOS, R's Makeconf defines MACOSX_DEPLOYMENT_TARGET but make
doesn't export it to recipe subprocesses. This causes the cc crate
(used by onig_sys) to fall back to SDK version detection, producing
linker warnings about mismatched deployment targets.

Conditionally export the variable in the cargo build recipe so the
cc crate uses the correct target.
The cc crate (used by onig_sys) falls back to the SDK version when
MACOSX_DEPLOYMENT_TARGET is unset. This can be newer than what R's
clang defaults to, causing linker warnings about mismatched targets.

At configure time, detect R's deployment target by:
1. Checking the MACOSX_DEPLOYMENT_TARGET env var
2. Parsing -mmacosx-version-min from R CMD config CC/CFLAGS
3. Querying clang's __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro

Then inject it into Makevars so cargo and the cc crate use the same
deployment target as R.
@dfalbel dfalbel merged commit 6ab6e30 into main Apr 21, 2026
5 checks passed
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.

1 participant