Repository navigation
Conversation
Bundle nanoarrow 0.9.0 under src/vendor/nanoarrow/ and link it into the shared object, so that later changes can build Arrow arrays. Nothing calls it yet. The sources are those of the nanoarrow 0.9.0 CRAN package, with NANOARROW_NAMESPACE set to RSQLite so that its symbols cannot collide with the copies in nanoarrow or arrow, and -DNANOARROW_DLL= keeps them out of the exports. The object depends on nanoarrow.h, the one edited file, and cleanup and .Rbuildignore keep it out of the tarball. The Apache License 2.0 and nanoarrow's NOTICE are installed under licenses/, inst/COPYRIGHTS lists the terms of all bundled code, and DESCRIPTION names the Apache Software Foundation as copyright holder and points to COPYRIGHTS. src/vendor/nanoarrow/README.md records the origin, the delta and the update steps. Ported from #857. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
Nothing calls the library yet, so its lines would only lower the coverage figure. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
Question: keep a single copy of nanoarrow's licence and NOTICE?Carried over from #857's question, which nobody answered; this pull request ports #857 unchanged, so the default described below stands here too. The links below point at #857's lines. nanoarrow's
Kirill decides. If nobody decides, both copies stay, and the limitation stays checked in the "Accepted limitations". Generated by Claude Code |
Question: should
|
On Windows, R's generated .def file exports every global symbol. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
No change of behavior: this vendors the nanoarrow C library and compiles it into the package, with nothing calling it yet, so that the Arrow layers further up the chain can build Arrow arrays. Landing the build change alone shows that the C sources compile and link everywhere before any code depends on them.
What changes:
src/vendor/nanoarrow/holdsnanoarrow.c,nanoarrow.handnanoarrow.hppof nanoarrow 0.9.0, the current CRAN release and the version build: Vendor the nanoarrow C library #857 used, plusLICENSE.txt,NOTICE.txtand aREADME.mdthat records the origin, the delta and how to update. The sources are byte-identical tosrc/ofnanoarrow_0.9.0.tar.gzexcept for line 30 ofnanoarrow.h,#define NANOARROW_NAMESPACE RSQLite(upstreamRPkg, marked with a comment), which prefixes every symbol so that it cannot collide with the copies in the nanoarrow or arrow packages.LICENSE.txtandNOTICE.txtare byte-identical to the release tagapache-arrow-nanoarrow-0.9.0. When later layers add the nanoarrow R package toLinkingTo/Suggests, its version can follow this one; nothing ties them together, since the prefixed symbols never meet.src/Makevarslinksvendor/nanoarrow/nanoarrow.onext to the SQLite object, definesNANOARROW_DLLempty so that no nanoarrow symbol is exported, and makes the object depend onnanoarrow.h. There is noMakevars.win, so Windows uses the same file.cleanup,cleanup.ucrt,cleanup.winand.Rbuildignorekeep the object out of the tarball.inst/COPYRIGHTSandinst/licenses/install the Apache License 2.0 and nanoarrow's NOTICE with the package, so that binaries carry them, and list the terms of the other bundled code as far as the sources state them.DESCRIPTIONgainsCopyright: See file COPYRIGHTS.and the Apache Software Foundation ascphfor the included nanoarrow sources.License: LGPL (>= 2.1)is unchanged, so there is no NEWS bullet.UPDATE.mdlists nanoarrow as a third updatable component..covrignorekeeps the unused library out of the coverage report.The clang-format exclusions of #920 (
src/vendor/**in.clang-format-ignore) cover the new directory as they are, and the style action only formats top-levelsrc/*anyway, so nothing is added here for it.Tested:
R CMD INSTALLof this branch and its base; the shared object exports the same 131 dynamic symbols as the base, none containing "arrow", and grows by about 215 KB.nanoarrow.odefines onlyRSQLiteArrow*symbols and calls only memory and string functions from libc (noabort,printf,stderrorexit).nanoarrow.ccompiles without a warning with gcc and clang under-Wall -Wextra -pedantic -Wstrict-prototypesfor C99, gnu99 and gnu2x, andnanoarrow.hppwith g++ and clang++ for C++11 and C++17. Touchingnanoarrow.hrecompiles only that object. The package loads and works with the nanoarrow package in the same session, in either load order.R CMD buildputs the six vendored files and the two licence files into the tarball and no object file;R CMD check --no-manual(run before rebasing onto the base's latest commit, which touches no build file) reports Status: OK, with "compilation flags in Makevars", "GNU extensions in Makefiles" and "compiled code" OK (tests withoutNOT_CRAN: FAIL 0, WARN 3, SKIP 30, PASS 1589). The full suite withNOT_CRAN=trueon the head gives FAIL 0, WARN 4, SKIP 63, PASS 11457; three warnings are the known locale ones intest-encoding.R, and the fourth ("Unknown string format, NA is returned.") comes fromtest-out-of-memory.R:38as changed in the base (cfb7c5c), not from this pull request.Open questions carried over from #857, unanswered there, so their defaults apply here: whether to keep both copies of nanoarrow's
LICENSE.txtandNOTICE.txt(next to the sources and underinst/licenses/; default: keep both, the update steps refresh both; #857 (comment)), and whetherinst/COPYRIGHTSorLicense:should say that a build with nanoarrow is distributed under the LGPL 3 (default: leave both as they are; #857 (comment)). The question onextension-functions.cwas resolved in #880 (the note ininst/COPYRIGHTSstays).Layer R6 of the rebuilt chain, planned in #880; based on #952. Ported from #857 (draft).
Coordinating session: https://claude.ai/code/session_01Hr1rd7QnTD4acgzTUihnF4
Generated by Claude Code