Skip to content

Commit f669b9f

Browse files
authored
GH-47942: [R] CRAN 22.0.0 R package release fails on Winbuilder due to "non-API call to R: 'Rf_lazy_duplicate'" (#47943)
### Rationale for this change CRAN 22.0.0 R package release fails on Winbuilder due to "non-API call to R: 'Rf_lazy_duplicate'" ### What changes are included in this PR? Change function used for altrep code to not use `Rf_lazy_duplicate` ### Are these changes tested? No ### Are there any user-facing changes? No * GitHub Issue: #47942 Authored-by: Nic Crane <[email protected]> Signed-off-by: Nic Crane <[email protected]>
1 parent d9697b1 commit f669b9f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.github/workflows/dev.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ jobs:
6060
- name: Cache pre-commit
6161
uses: actions/cache@v4
6262
with:
63-
path: ~/.cache/pre-commit
63+
path: |
64+
~/.cache/pre-commit
65+
~/.local/share/renv/cache
6466
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
6567
- name: Install Air
6668
uses: posit-dev/setup-air@63e80dedb6d275c94a3841e15e5ff8691e1ab237 # v1.0.0

r/.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ STYLE.md
3131
^PACKAGING\.md$
3232
^inst/__pycache__$
3333
^bootstrap.R$
34+
air.toml

r/src/altrep.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ struct AltrepFactor : public AltrepVectorBase<AltrepFactor> {
572572

573573
static SEXP Duplicate(SEXP alt, Rboolean /* deep */) {
574574
// the representation integer vector
575-
SEXP dup = PROTECT(Rf_lazy_duplicate(Materialize(alt)));
575+
SEXP dup = PROTECT(Rf_shallow_duplicate(Materialize(alt)));
576576

577577
// additional attributes from the altrep
578578
SEXP atts = PROTECT(Rf_duplicate(ATTRIB(alt)));

0 commit comments

Comments
 (0)