Fix CRAN NOTE: Replace .attr() with Rf_setAttrib() to avoid non-API ATTRIB calls #170
+37
−19
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.
CRAN reported non-API calls to
ATTRIBin compiled code. Rcpp's.attr()setter internally uses the non-APIATTRIBfunction, violating portability requirements.Changes
Replaced attribute setters with R API calls
src/hmi.cpp: 5 replacements (var, sd, sem, samples, relativeError)src/reduce_tree.cpp: 5 replacements (class, order for phylo/multiPhylo)src/spr.cpp: 13 replacements (class, order, dim)Performance optimization
Cached symbol lookups as static SEXP to avoid repeated
Rf_install()calls:Note:
.attr()getters unchanged—only setters use non-API internals.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
i0.wp.com/usr/bin/pandoc /usr/bin/pandoc +RTS -K512m -RTS compare-treesets.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /home/REDACTED/work/TreeDist/TreeDist/TreeDist.Rcheck/vign_test/TreeDist/vignettes/compare-treesets.html --lua-filter /home/REDACTED/work/_temp/Library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /home/REDACTED/work/_temp/Library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --section-divs --template /home/REDACTED/work/_temp/Library/rmarkdown/rmd/h/default.html(dns block)ms609.github.io/opt/R/4.5.2/lib/R/bin/exec/R /opt/R/4.5.2/lib/R/bin/exec/R --no-restore --no-echo --args nextArgTreeDist_2.11.1.9000.tar.gznextArg--no-manual(dns block)/opt/R/4.5.2/lib/R/bin/exec/R /opt/R/4.5.2/lib/R/bin/exec/R --no-restore --no-echo --args nextArgTreeDist_2.11.1.9000.tar.gznextArg--no-manual --no-echo 4 rgo/bin/git eeTools/include'as e y/Rcpp/include /usr/bin/which unam�� c9f38aed7f7e0f7a-I(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.