Skip to content

chore(fork): Rebuild the integration branch on upstream 0.5.5.9000 - #11

Open
krlmlr wants to merge 10 commits into
forkfrom
claude/fork-42ve6t
Open

chore(fork): Rebuild the integration branch on upstream 0.5.5.9000#11
krlmlr wants to merge 10 commits into
forkfrom
claude/fork-42ve6t

Conversation

@krlmlr

@krlmlr krlmlr commented Aug 17, 2026

Copy link
Copy Markdown
Owner

The integration branch: r-lib/cpp11@7d0e4ac plus all ten patches, squashed in lexicographic branch order. This is what krlmlr.r-universe.dev builds and what duckdb-r vendors.

fork is created here at upstream's tip, so this PR shows the ten patches and nothing else. Once patchstack-sync.yml is running, this branch is rebuilt from scratch on every sync and should never be merged into by hand — this PR exists to review the first build, not to establish a habit.

The ten, in the order they integrate:

  • #1 a-fork-infra — Pull config, sync workflow, docs
  • #2 b-extptr-leak — premature release on move
  • #3 b-proxy-default-constructor — defaulted copy constructor
  • #4 b-warning-copy — copy the message before unwinding
  • #5 f-deprecate-explicit[[deprecated]] on the implicit conversions
  • #6 f-end-cpp11-exEND_CPP11_EX()
  • #7 f-extptr-protprot argument
  • #8 f-multi-dotgsub() for the symbol prefix
  • #9 f-types-src-include — types header in src/include/
  • #10 f-vendor-datedate and overwrite

All ten cherry-pick cleanly onto upstream in this order, so the stack has no internal conflicts — worth knowing, since #2 and #7 both touch external_pointer.hpp.

f-source-vectorize is not here. Upstream r-lib#492 supersedes it completely — cpp_source() takes multiple files natively now, including the all(file.exists()) check and the shared-library naming the patch was working around. Its branch is untouched, and the next patchstack sync would detect it as empty and delete it.

Verification

Against an install of this branch: the full R suite passes, and the whole cpp11test C++ suite passes after clean_dll()external_pointer-C++ included. clang-format is clean across every touched header.

🤖 Generated with Claude Code

https://claude.ai/code/session_01K8MneV8KqHYUuC8fWV3X5Q


Generated by Claude Code

krlmlr and others added 10 commits August 17, 2026 20:59
Three files that make this fork maintainable without hand-holding.

`.github/pull.yml` lets the Pull app hard-reset `main` from r-lib/cpp11,
so `main` is a mirror and nothing else.

`.github/workflows/patchstack-sync.yml` rebuilds `fork` -- the default
branch -- as `main` plus the squashed stack, nightly and on demand. It
takes `b-*` and `f-*` as the stack, so a working branch under another
name is left alone.

`.github/PATCHSTACK.md` says what the branches are and how to add a
patch. It lives under `.github/`, which `.Rbuildignore` already covers.

R-CMD-check also runs on `fork` now: the integration is the thing that
has to build, and nothing else was checking it.
The move constructor and move assignment operator went through
`reset(rhs.release())`, which dropped the SEXP's attributes and released
the pointer before the new owner had taken it over. Move the `data_`
member directly instead, and clear the right-hand side afterwards.

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Lets the caller keep an R object alive for as long as the external
pointer lives, which is what `R_MakeExternalPtr()`'s `prot` slot is for.
`cpp_register()` looked for `{package}_types.h(pp)` in `src/` and in
`inst/include/` only, so a package whose generated `src/cpp11.cpp` must
include that header had to install it -- turning a private header into
part of the package's public interface.

Add `src/include/` to the search, and include the header by its path
relative to `src/` so no extra include flag is needed.

See duckdb/duckdb-r#2501
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