chore(fork): Rebuild the integration branch on upstream 0.5.5.9000 - #11
Open
krlmlr wants to merge 10 commits into
Open
chore(fork): Rebuild the integration branch on upstream 0.5.5.9000#11krlmlr wants to merge 10 commits into
krlmlr wants to merge 10 commits into
Conversation
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
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.
The integration branch:
r-lib/cpp11@7d0e4acplus all ten patches, squashed in lexicographic branch order. This is whatkrlmlr.r-universe.devbuilds and whatduckdb-rvendors.forkis created here at upstream's tip, so this PR shows the ten patches and nothing else. Oncepatchstack-sync.ymlis 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:
a-fork-infra— Pull config, sync workflow, docsb-extptr-leak— premature release on moveb-proxy-default-constructor— defaulted copy constructorb-warning-copy— copy the message before unwindingf-deprecate-explicit—[[deprecated]]on the implicit conversionsf-end-cpp11-ex—END_CPP11_EX()f-extptr-prot—protargumentf-multi-dot—gsub()for the symbol prefixf-types-src-include— types header insrc/include/f-vendor-date—dateandoverwriteAll 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-vectorizeis not here. Upstream r-lib#492 supersedes it completely —cpp_source()takes multiple files natively now, including theall(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
cpp11testC++ suite passes afterclean_dll()—external_pointer-C++included.clang-formatis clean across every touched header.🤖 Generated with Claude Code
https://claude.ai/code/session_01K8MneV8KqHYUuC8fWV3X5Q
Generated by Claude Code