Skip to content

build: Vendor the nanoarrow C library - #857

Draft
krlmlr wants to merge 11 commits into
claude/arrow-result-ptrfrom
claude/arrow-vendor-nanoarrow
Draft

krlmlr wants to merge 11 commits into
claude/arrow-result-ptrfrom
claude/arrow-vendor-nanoarrow

Conversation

@krlmlr

@krlmlr krlmlr commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Third step of the Arrow rework (plan: #829 (comment)): vendor the nanoarrow C library and compile it into the package, with nothing calling it yet. Landing the build change alone is meant to prove that the C sources compile and link on every CI platform before any code depends on them; the full CI matrix (Windows and macOS included) will be run on this branch before merging.

What changes:

  • src/vendor/nanoarrow/ holds nanoarrow.c, nanoarrow.h and nanoarrow.hpp of nanoarrow 0.9.0 (the current CRAN release), plus LICENSE.txt, NOTICE.txt and a README.md that records the origin, the delta and how to update. The three sources are byte-identical to src/ of the nanoarrow 0.9.0 CRAN tarball except for one line, #define NANOARROW_NAMESPACE RSQLite (upstream RPkg), which prefixes every exported symbol so that it cannot collide with the nanoarrow package's own copy or the one in arrow. LICENSE.txt and NOTICE.txt match the release tag apache-arrow-nanoarrow-0.9.0.
  • src/Makevars defines NANOARROW_DLL empty so that the symbols are not exported from the shared object, makes the object depend on nanoarrow.h, and links vendor/nanoarrow/nanoarrow.o next to vendor/sqlite3/sqlite3.o, the same way (there is no src/Makevars.win, so Windows uses the same file).
  • cleanup, cleanup.ucrt, cleanup.win and .Rbuildignore also remove and ignore the nanoarrow object file, so that it does not end up in the source tarball.
  • inst/COPYRIGHTS and inst/licenses/ install the Apache-2.0 licence and the 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; DESCRIPTION has Copyright: See file COPYRIGHTS., and lists the Apache Software Foundation as copyright holder (cph) for the included nanoarrow sources.

Deliberately left out:

  • nanoarrow is not added to Imports or LinkingTo: nothing uses its R-side helpers (nanoarrow/r.h) yet, and those come in with the first code that needs them.
  • A new .covrignore keeps src/vendor/nanoarrow/ out of the coverage report, so that the unused library does not lower the project number on Codecov; the bundled SQLite is left as it was.
  • No .dd file for the vendored object: src/Makevars.deps only includes the .dd files of the package's own objects, and the existing src/vendor/sqlite3/sqlite3.dd is not read by anything.

Tested:

  • The symbols are prefixed RSQLite and, with NANOARROW_DLL empty, none of them is exported: nm -D --defined-only on the built RSQLite.so lists the same 129 symbols as the base. Touching nanoarrow.h recompiles the object.
  • The package loads with the nanoarrow package and with arrow in the same session, in either load order, and both are used there.
  • The installed .so grows by about 215 KB (11.67 MB to 11.89 MB, +1.9%); compiling nanoarrow.c takes about 1.3 s, which is lost in the noise of the whole build.
  • R CMD build puts the six files under src/vendor/nanoarrow/ into the tarball and no object files; R CMD check --no-manual passes with no error or warning, and no compiler warning from nanoarrow (the one NOTE is a .git file that comes from building out of a git worktree).

Sits on #856, which is on #855, #830 and #850.

Review

Two review rounds (first, second) led to 40678e2, f4e09f5 and 62e252d; see the accepted limitations, which include two questions about bundled code that predate this pull request.

https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE


Generated by Claude Code

Add nanoarrow 0.9.0 under `src/vendor/nanoarrow/` and link its object into the package, with nothing calling it yet.
The sources are the nanoarrow R package's bundled copy,
unchanged except for `NANOARROW_NAMESPACE`, which is `RSQLite` so that exported symbols cannot collide with the nanoarrow package or arrow.

`cleanup*` and `.Rbuildignore` keep the object file out of the tarball,
and DESCRIPTION names the Apache Software Foundation as copyright holder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
@krlmlr
krlmlr added this pull request to stack #851 November 12, 2026 17:46
List `src/vendor/nanoarrow/` in `.covrignore`, which covr reads when it builds the report,
so that the file never reaches the Codecov upload.
Its code is unused for now and would otherwise count as uncovered.
`.covrignore` itself is excluded from the tarball.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE

krlmlr commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

Review of this pull request at 2136852, by a Claude Code reviewer with clean context that read the description, the diff of its own commit against #856 (2f319a7..2136852), the surrounding build files, workflows and vendored sources, compared them with nanoarrow's CRAN tarball, the upstream release tag and #795 at 43db19f, built the pull request and its base, and ran the checks and reproducers below. I posted nothing on GitHub and changed no branch.

What was run

  • R CMD INSTALL of base and PR into separate libraries, nm -D --defined-only on both shared objects, and nm/readelf on nanoarrow.o.
  • A load test of RSQLite with nanoarrow 0.9.0 and arrow 26.0.1 in both orders, using all three (including an arrow-to-nanoarrow stream).
  • nanoarrow.c compiled alone with gcc 13 and clang 18 under CRAN's Debian and Fedora flag sets, -Wextra, -Wstrict-prototypes, -flto, and C99 to C23; with mingw-w64 gcc 13 under CRAN's Windows flags; nanoarrow.hpp from C++11 and C++17.
  • R CMD build of base and PR from git archive exports, plus two builds of the PR with the base's cleanup and .Rbuildignore.
  • R CMD check --no-manual on both tarballs; devtools::test() with NOT_CRAN=true on the PR (no test changed, so there was nothing to run on its own).
  • Reproducers for the header dependency and for hidden visibility. No ASan or valgrind: nothing calls nanoarrow and nanoarrow.o has no constructors, so no nanoarrow code runs.

What holds

  • nanoarrow.c and nanoarrow.hpp are byte-identical to src/ of nanoarrow_0.9.0.tar.gz (the current CRAN version); nanoarrow.h differs only at line 30 (RPkg to RSQLite). LICENSE.txt and NOTICE.txt are byte-identical to tag apache-arrow-nanoarrow-0.9.0. All five files, the cph entry and the build lines match feat: Implement the DBI Arrow interface natively #795 at 43db19f. Every source file carries only ASF headers.
  • The shared object gains 71 dynamic symbols, all T and all RSQLiteArrow*; nanoarrow.o has no unprefixed global and calls nothing that R CMD check flags. The load test passes in both orders.
  • No compiler warning from nanoarrow under any of the flag sets above, including Windows. CRAN reports nanoarrow 0.9.0 OK on all 13 flavours.
  • Windows uses src/Makevars (there is no .win or .ucrt variant); cleanup, cleanup.win and cleanup.ucrt carry the same line. With both the old cleanup and the old .Rbuildignore, nanoarrow.o ends up in the tarball; with only the new .Rbuildignore line it does not (Confirmed). So on R 4.5.3 that line does the work and cleanup is a second guard.
  • The tarball gains the six files and no object, growing by 68 KB (4.33 to 4.40 MB). RSQLite.so grows by 203 KB (11.67 to 11.88 MB), and nanoarrow.c compiles in about 0.9 s.
  • R CMD check reports Status: OK for both, with identical test counts (FAIL 3 | WARN 6 | SKIP 61 | PASS 10650). devtools::test() has 10628 passes, and both runs show only the three known test-httpvfs.R errors.
  • The commit touches no .dd file. A dev build rewrites src/cpp11.dd with absolute paths on the base too, so that is not from this pull request. The clang-format action only formats top-level src/*.

High

None.

Medium

  1. The installed package and every binary build contain nanoarrow's object code but no copy of its license or NOTICE, and DESCRIPTION does not say that part of the package is Apache-2.0. DESCRIPTION#L23-L35. LICENSE.txt and NOTICE.txt live under src/, which binaries do not carry: the installed library has no license, notice or COPYRIGHTS file (Confirmed). Apache-2.0 §4(a) and §4(d) ask redistributors to give recipients the license and the NOTICE attributions, in object form too. This is new for RSQLite: SQLite and the extensions are public domain, and Boost's BSL-1.0 exempts object code. The ASF's own nanoarrow package ships neither file, but the ASF is the licensor there. The cph entry is what CRAN's policy asks for copyright holders, so CRAN itself does not require more. But that policy also has the maintainer warrant use "in accordance with the license", and WRE §1.1.2 asks that restrictions on included code be "evident to people reading your DESCRIPTION file". The FSF considers Apache-2.0 compatible with GPL version 3 but not version 2. LGPL (>= 2.1) leaves the version-3 route open, but no reader of DESCRIPTION learns that part of the package is Apache-2.0 (by reading). Suggested fix: install the terms, for example with an inst/COPYRIGHTS that names src/vendor/nanoarrow as Apache-2.0 by the ASF and quotes its NOTICE, an installed copy of LICENSE.txt, and a Copyright: See file COPYRIGHTS field. Whether License or a LICENSE.note should say more is for the maintainer to decide.

Low

  1. RSQLite.so now exports 71 nanoarrow functions that nothing outside the package needs. nanoarrow.h#L1259-L1265. NANOARROW_DLL adds visibility("default"), which overrides the -fvisibility=hidden that PKG_CFLAGS sets, so the dynamic symbol count rises from 129 to 200. The prefix makes this harmless (Confirmed by the load test), so this is hygiene. Suggested fix: add -DNANOARROW_DLL= to PKG_CPPFLAGS. With it, a shared object built from nanoarrow.c exports none of the 71 symbols, and mingw compiles it without warning (Confirmed). Step 4 of the README then becomes "no Arrow symbol at all".

  2. nanoarrow.o does not depend on nanoarrow.h, the one file with a local edit. src/Makevars#L29-L34. I changed the namespace line and reinstalled from the built tree: the object was not recompiled, and the shared object kept the old prefix (Confirmed). This bites load_all()/incremental builds, for example when step 2 of the update runs after a build. Fresh installs are not affected. Suggested fix: add vendor/nanoarrow/nanoarrow.o: vendor/nanoarrow/nanoarrow.h to src/Makevars. With that line, touching the header recompiles the object (Confirmed).

  3. The update procedure works, but UPDATE.md does not mention it, its symbol check needs eyeballing, and the edited header is not marked as changed. README.md#L10-L15. The steps match the 0.9.0 tarball layout. But UPDATE.md still lists only two updatable components. Step 4's nm -D … | grep ' T ' prints 78 lines (including R_init_RSQLite and six sqlite3_*_init) and works only on Linux. Line 30 of nanoarrow.h also has no in-file note, which Apache-2.0 §4(b) asks for when a file is modified (by reading, apart from the Confirmed nm output). Suggested fix: list nanoarrow in UPDATE.md with a link to this README. Add a trailing comment on line 30, such as // RSQLite: upstream RPkg, see README.md. Give commands with an empty expected output, such as diff -r against the tarball's src/ showing only line 30, and nm -D --defined-only RSQLite.so | grep Arrow | grep -v ' RSQLiteArrow'.

  4. CI has not yet built this on Windows or macOS, although the description says landing it alone proves that. R-CMD-check.yaml#L156-L166. On a same-repository pull request, the versions matrix runs only for cran-* branches. For 2136852 only "Smoke test: stock R" ran, and the rcc matrix jobs were skipped (Confirmed via the checks API). My mingw cross-compile and CRAN's nanoarrow results make a failure unlikely, but the Windows link and the DLL export list are untested. Suggested fix: run the R-CMD-check workflow with ref set to this branch and versions-matrix: true before merging. Otherwise, reword the description.


Generated by Claude Code

Install `inst/COPYRIGHTS` and copies of nanoarrow's `LICENSE.txt` and `NOTICE.txt` under `inst/licenses/`,
so that binaries carry the Apache-2.0 terms, and add `Copyright: See file COPYRIGHTS.` to DESCRIPTION.
Define `NANOARROW_DLL` empty so that the object exports no symbol,
make `nanoarrow.o` depend on `nanoarrow.h`,
mark the one changed line of `nanoarrow.h`, and list nanoarrow in `UPDATE.md` and the vendored README.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE

krlmlr commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

Review of the fixes in this pull request at db8fbdb (the commits since 2136852), by a Claude Code reviewer with clean context that read the description, the first review, 40678e2 and f4e09f5, the bundled sources that the new inst/COPYRIGHTS describes, covr 3.6.5 and the cynkratemplate covr action, R's winshlib.mk, WRE §1.1.1–1.1.2 and the CRAN policy, built the head and its base #856 (e5b871d), and ran the checks and reproducers below. The merge db8fbdb has the tree of a fresh git merge-tree of its parents and differs from the base only in this pull request's 17 files. I posted nothing on GitHub and changed no branch.

What was run

  • R CMD INSTALL of head and base into separate libraries, and nm -D --defined-only on both.
  • Rebuilds after touching nanoarrow.h, after editing its namespace line, and with nothing changed.
  • A load test of RSQLite with nanoarrow 0.9.0 and arrow 26.0.1 in both orders, using all three.
  • A mingw-w64 gcc 13 link that mimics winshlib.mk (export list built from $(OBJECTS)), with and without -DNANOARROW_DLL=.
  • covr::package_coverage() on a git archive export, with the repository's .covrignore applied as package_coverage() applies it, and to_cobertura().
  • Steps 4 and 5 of the vendored README against nanoarrow_0.9.0.tar.gz from CRAN.
  • R CMD build and R CMD check --no-manual on the head; devtools::test() with NOT_CRAN=true; test-dbClearResult.R and its changed block alone after pkgload::load_all(), on head and base.
  • g++ -MM over all src/*.cpp to list the Boost headers the build includes.

What holds

  • Apache-2.0 §4 is met: (a) the license is installed as licenses/nanoarrow-LICENSE.txt, byte-identical to the vendored copy; (b) the changed line of nanoarrow.h says so; (c) all ASF headers are untouched; (d) the NOTICE is installed as licenses/nanoarrow-NOTICE.txt and quoted in COPYRIGHTS (Confirmed in the installed library). Copyright: See file COPYRIGHTS. is the convention WRE §1.1.1 names and the alternative to cph that CRAN's policy offers. Whether License should say more stays the maintainer's call, as in the first review.
  • COPYRIGHTS is accurate for what it lists. The amalgamation, csv.c, regexp.c, series.c, uuid.c and sqlite3ext.h carry the SQLite blessing, http.c says "Public domain / CC0 style", and all 1554 Boost files name BSL-1.0 (inlined from BH in Inline BH #362). extension-functions.c indeed states no license. A GitHub mirror's README says that https://sqlite.org/contrib gives none either (sqlite.org is not reachable from here).
  • Head and base export the same 129 dynamic symbols. nm -D --defined-only RSQLite.so | grep -i arrow prints nothing, and the 75 RSQLiteArrow* functions are now local. The load test passes in both orders (Confirmed). No other translation unit includes nanoarrow.h or names NANOARROW_DLL, so the flag changes nothing else (by reading). On Windows, R's export list comes from $(OBJECTS) only, and nanoarrow.o is linked through PKG_LIBS, so its symbols are not exported with or without the flag. mingw compiles it without warning and the DLL exports no Arrow symbol either way (Confirmed).
  • The new Makevars rule works: touching nanoarrow.h recompiles only nanoarrow.o and relinks, editing the namespace line changes the prefix in the shared object, and an unchanged rebuild compiles nothing (Confirmed). It is a plain POSIX prerequisite line, and the tarball has no objects, so tarball and Windows builds are unaffected.
  • covr reads .covrignore from the package root (withr::with_dir(root, parse_covr_ignore())), which is the root with the action's defaults. The glob drops nanoarrow.c (2426 lines) and nanoarrow.h (375 lines), and cobertura.xml has no nanoarrow entry (Confirmed). .covrignore is not in the tarball. The bundled sqlite3.c stays in the report with 69074 lines, as before.
  • README step 4 prints only the line-30 difference and step 5 prints nothing (Confirmed). UPDATE.md lists nanoarrow.
  • No .dd file changes, and none has an absolute path.
  • R CMD check --no-manual reports Status: OK (FAIL 0 | WARN 3 | SKIP 20 | PASS 978 without NOT_CRAN), with "compilation flags in Makevars" and "GNU extensions in Makefiles" OK and no compiler warning from nanoarrow. The tarball (4.40 MB) has the licence files and no .covrignore or object. devtools::test() shows only the three known test-httpvfs.R errors. The changed test-dbClearResult.R passes on head and base (39 expectations), and its changed block passes alone (8). The shared object grows by 220 KB, as the description says.
  • CI run 43278691220 on db8fbdb: the smoke test (with coverage) and 14 of 15 matrix jobs succeeded: Ubuntu x64 R 4.2 to 4.6 and devel, Ubuntu arm64 4.6 and devel, Windows x64 4.5, 4.6 and devel, Windows arm64 4.6, macOS 4.5. The logs I read show no nanoarrow warning. macOS 4.6 was cancelled because no runner took it ("not acquired by Runner of type hosted even after multiple attempts"), so the run reads "failure"; re-running that job would complete the matrix.

High

None.

Medium

None.

Low

  1. inst/COPYRIGHTS credits extension-functions.c to Liam Healy alone and does not say that RSQLite changed it. inst/COPYRIGHTS#L24-L25. The file's own history ends with "2007-02-07 posted by Mikey C to sqlite mailing list. Original code 2006 June 05 by relicoder." (L104-L105), and Healy cleaned it up later. RSQLite's help says it ships "a slightly modified version of the original code" (R/initExtension.R#L7-L9). The only statement of terms upstream seems to be the 2007 post ("if anyone wants the code, please take it"), which the mirror quotes. CRAN's policy asks that "authorship is not misrepresented" (by reading). Suggested fix: name the original authors and the post (relicoder and Mikey C, sqlite-users 2007, cleaned up by Liam Healy for sqlite.org/contrib, modified by RSQLite), and quote that remark as the only statement of terms. The ctb comment for Healy in DESCRIPTION, "for the included SQLite sources", could say extension-functions.c instead.

  2. inst/COPYRIGHTS leaves out third-party code outside src/vendor/, and one extra notice in a Boost header. inst/COPYRIGHTS#L1-L2. src/import-file.c is "Copyright (C) 1999-2003 The Omega Project for Statistical Computing" under LGPL (>= 2) and says its code "comes directly from SQLite's shell.c" (L1-L26). The Omega Project is not in Authors@R, which is the case the Copyright field is for. src/affinity.c is "Extracted from sqlite3.c". boost/intrusive/detail/function_detector.hpp, which the build includes (Confirmed with g++ -MM), adds a 2007 permission by Alexandre Courpron "provided that this copyright notice appears on all copies" to its BSL header. That header is compile-time only, so the object-code sentence in L30 still holds in practice. Suggested fix: add entries for src/import-file.c (The Omega Project, LGPL (>= 2), partly from SQLite's shell.c) and src/affinity.c (from SQLite, public domain), and note the extra notice under Boost.

  3. Step 4 of the update procedure works only with the tarball unpacked into the RSQLite checkout, which then holds an untracked nanoarrow/ directory. src/vendor/nanoarrow/README.md#L18-L19. The loop reads nanoarrow/src/$f and src/vendor/nanoarrow/$f from the same directory, so "the directory with the unpacked tarball" must be the package root (Confirmed). Neither .gitignore nor .Rbuildignore covers nanoarrow/, so it can end up in a commit or a tarball (by reading). Suggested fix: unpack elsewhere and say where the command runs, for example "from the package root, after tar -xzf nanoarrow_X.Y.Z.tar.gz -C /tmp: for f in …; do diff /tmp/nanoarrow/src/$f src/vendor/nanoarrow/$f; done".


Generated by Claude Code

krlmlr commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

The full matrix (run 43278691220, dispatched by hand on db8fbdb, since same-repository pull requests only get the smoke test) passed 14 of 15 jobs: Ubuntu x64 R 4.2 to 4.6 and devel, Ubuntu arm64 4.6 and devel, Windows x64 4.5, 4.6 and devel, Windows arm64 4.6, and macOS 4.5. The red rcc status comes from macOS 4.6, which was cancelled because no runner picked it up ("not acquired by Runner … after multiple attempts"), not from this pull request; that one job is re-running now.


Generated by Claude Code

Credit `extension-functions.c` to its original authors as its history does,
add `src/import-file.c`, `src/affinity.c` and the extra notice in a Boost header to `inst/COPYRIGHTS`,
and make the nanoarrow update steps unpack the tarball into a temporary directory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE

krlmlr commented Nov 12, 2026 •

Copy link
Copy Markdown
Member Author

Superseded: Accepted limitations

Two review rounds: the first found that neither the installed package nor a binary carried nanoarrow's licence and NOTICE (Medium), plus four Lows; f4e09f5 added inst/COPYRIGHTS, inst/licenses/ and a Copyright: field, hid the nanoarrow symbols, made nanoarrow.o depend on its header and tightened the update steps, and 40678e2 keeps the vendored code out of coverage. The second found nothing above Low; its three documentation points are fixed in 62e252d. These remain:

  • inst/COPYRIGHTS#L24-L28: src/vendor/extensions/extension-functions.c, bundled long before this pull request, states no licence or copyright terms; its history credits "relicoder" (2006), "Mikey C" (2007, "if anyone wants the code, please take it") and Liam Healy, and COPYRIGHTS says so without guessing. Whether that needs more is the maintainer's decision. Relevance: medium; reviewer's confidence: medium (sqlite.org itself was not reachable from the review). (recorded)
  • DESCRIPTION#L22-L36: src/import-file.c names "The Omega Project for Statistical Computing" as copyright holder (LGPL (>= 2)), which Authors@R does not list, as before this pull request; COPYRIGHTS now mentions it. License: LGPL (>= 2.1) stays as it is, with Copyright: See file COPYRIGHTS. pointing to the Apache-2.0 parts. Relevance: low; reviewer's confidence: high. (recorded)
  • src/vendor/nanoarrow/README.md: nanoarrow's LICENSE.txt and NOTICE.txt exist twice, next to the sources and under inst/licenses/; the update steps say to refresh both. Relevance: low; reviewer's confidence: high. (recorded)
  • run 43278691220: same-repository pull requests only get the smoke test, so the full matrix was dispatched by hand on db8fbdb; 14 of 15 jobs passed, and macOS 4.6, which no runner picked up, is re-running. Relevance: low; reviewer's confidence: high.

Generated by Claude Code

krlmlr commented Nov 12, 2026 •

Copy link
Copy Markdown
Member Author

Superseded: Accepted limitations

Superseded by the current copy.

Two review rounds: the first found that neither the installed package nor a binary carried nanoarrow's licence and NOTICE (Medium), plus four Lows; f4e09f5 added inst/COPYRIGHTS, inst/licenses/ and a Copyright: field, hid the nanoarrow symbols, made nanoarrow.o depend on its header and tightened the update steps, and 40678e2 keeps the vendored code out of coverage. The second found nothing above Low; its three documentation points are fixed in 62e252d. The full CI matrix, dispatched by hand on db8fbdb because same-repository pull requests only get the smoke test, passed all 15 jobs (run 43278691220; macOS 4.6 after one re-run, since no runner had picked it up). These remain:

  • inst/COPYRIGHTS#L24-L28: src/vendor/extensions/extension-functions.c, bundled long before this pull request, states no licence or copyright terms; its history credits "relicoder" (2006), "Mikey C" (2007, "if anyone wants the code, please take it") and Liam Healy, and COPYRIGHTS says so without guessing. Whether that needs more is the maintainer's decision. Relevance: medium; reviewer's confidence: medium (sqlite.org itself was not reachable from the review). (recorded)
  • DESCRIPTION#L22-L36: src/import-file.c names "The Omega Project for Statistical Computing" as copyright holder (LGPL (>= 2)), which Authors@R does not list, as before this pull request; COPYRIGHTS now mentions it. License: LGPL (>= 2.1) stays as it is, with Copyright: See file COPYRIGHTS. pointing to the Apache-2.0 parts. Relevance: low; reviewer's confidence: high. (recorded)
  • src/vendor/nanoarrow/README.md: nanoarrow's LICENSE.txt and NOTICE.txt exist twice, next to the sources and under inst/licenses/; the update steps say to refresh both. Relevance: low; reviewer's confidence: high. (recorded)

Generated by Claude Code

krlmlr commented Nov 13, 2026 •

Copy link
Copy Markdown
Member Author

Moved: does extension-functions.c, which states no licence, need more than the note in inst/COPYRIGHTS?

Moved to #880: #880 (comment). Please answer there.

src/vendor/extensions/extension-functions.c was bundled long before this pull request and states no licence or copyright terms. Its history credits the original code to "relicoder" (2006), posted to the sqlite-users mailing list by "Mikey C" (2007, "if anyone wants the code, please take it"), and later versions to Liam Healy, whom Authors@R lists as a contributor. The new inst/COPYRIGHTS says so without guessing terms (inst/COPYRIGHTS#L24-L27). The review could not reach sqlite.org's contrib page, where the file comes from, to check whether terms are stated there.

  • Keep the note in inst/COPYRIGHTS as it is, which states what the sources say (recommended)
  • Look up the terms on sqlite.org's contrib page and in the mailing list post, and state them in inst/COPYRIGHTS if there are any
  • Treat the terms as unclear and replace the extension, whose math functions SQLite now partly has built in (Enable built-in math functions #349); this changes what users can call

Kirill decides, as the maintainer. If nobody decides, the note stays as it is, and the pull request proceeds without a change to the extension.


Generated by Claude Code

krlmlr commented Nov 13, 2026 •

Copy link
Copy Markdown
Member Author

Question: keep a single copy of nanoarrow's licence and NOTICE?

nanoarrow's LICENSE.txt and NOTICE.txt exist twice: next to the sources in src/vendor/nanoarrow/, and under inst/licenses/, so that the installed package and binaries carry them. Step 3 of the update steps says to refresh both (src/vendor/nanoarrow/README.md#L17-L18). A copy forgotten in an update would go stale without notice.

  • Keep both copies, with the update step that refreshes both (recommended)
  • Keep only the copies under inst/licenses/ and point src/vendor/nanoarrow/README.md to them, or check in CI that the two copies are identical

Kirill decides. If nobody decides, both copies stay, and the limitation stays checked in the "Accepted limitations".


Generated by Claude Code

krlmlr commented Nov 13, 2026 •

Copy link
Copy Markdown
Member Author

Superseded: Accepted limitations

Superseded by the copy of 2026-11-29.

Two review rounds: the first found that neither the installed package nor a binary carried nanoarrow's licence and NOTICE (Medium), plus four Lows; f4e09f5 added inst/COPYRIGHTS, inst/licenses/ and a Copyright: field, hid the nanoarrow symbols, made nanoarrow.o depend on its header and tightened the update steps, and 40678e2 keeps the vendored code out of coverage. The second found nothing above Low; its three documentation points are fixed in 62e252d. The full CI matrix, dispatched by hand on db8fbdb because same-repository pull requests only get the smoke test, passed all 15 jobs (run 43278691220; macOS 4.6 after one re-run, since no runner had picked it up). This remains:

Two findings about bundled code that predate this pull request:


Generated by Claude Code

krlmlr commented Nov 29, 2026

Copy link
Copy Markdown
Member Author

Question: should inst/COPYRIGHTS or License: say that a build with nanoarrow is distributed under the LGPL 3?

The clean review of 2026-11-29 raised this as a Low, for the maintainer to judge; it fails no CRAN check. RSQLite is License: LGPL (>= 2.1) (DESCRIPTION#L35), and this pull request bundles nanoarrow under the Apache License 2.0 (inst/COPYRIGHTS#L4-L16). The FSF considers the Apache License 2.0 incompatible with the GPL and LGPL version 2.x but compatible with version 3, so a binary that links both can be passed on under the LGPL 3 only, which (>= 2.1) permits. Neither file says so today. This session cannot give legal advice; the options only differ in what the package states.

A sentence in inst/COPYRIGHTS that a build including nanoarrow is distributed under the LGPL 3 or later, as the "or later" clause allows, costs one line and changes nothing for users of the source package. Changing License: to LGPL (>= 3) states it for the package as a whole, also for code that never touches nanoarrow, and shows in CRAN's metadata. Leaving it relies on recipients reading the two licences together.

  • Add one sentence to inst/COPYRIGHTS that a build including nanoarrow is distributed under the LGPL 3 or later (recommended: states the effect where the licences are listed, and nothing else changes)
  • Change License: to LGPL (>= 3)
  • Leave both files as they are

Kirill decides, as the maintainer and licensor. If nobody decides, both files stay as they are.


Generated by Claude Code

krlmlr commented Nov 29, 2026

Copy link
Copy Markdown
Member Author

Accepted limitations

Two review rounds: the first found that neither the installed package nor a binary carried nanoarrow's licence and NOTICE (Medium), plus four Lows; f4e09f5 added inst/COPYRIGHTS, inst/licenses/ and a Copyright: field, hid the nanoarrow symbols, made nanoarrow.o depend on its header and tightened the update steps, and 40678e2 keeps the vendored code out of coverage. The second found nothing above Low; its three documentation points are fixed in 62e252d. The full CI matrix, dispatched by hand on db8fbdb because same-repository pull requests only get the smoke test, passed all 15 jobs (run 43278691220; macOS 4.6 after one re-run, since no runner had picked it up). This remains:

The clean review of 2026-11-29, after main (3.54.1) was merged up the stack, read this pull request at abab619 and found nothing above Low here; one new Low on the licences is listed below. From #830 up, five expectations in test-dbBind.R from #868 fail until the question on the state after a failed dbBind() is answered. This copy replaces the copy of 2026-11-13.

  • src/vendor/nanoarrow/README.md#L17-L18: nanoarrow's LICENSE.txt and NOTICE.txt exist twice, next to the sources and under inst/licenses/ (question). Relevance: low; reviewer's confidence: high. (recorded)
  • DESCRIPTION#L35: License: LGPL (>= 2.1) and inst/COPYRIGHTS don't say that a build bundling Apache-2.0 nanoarrow is passed on under the LGPL 3 (question). Relevance: low; reviewer's confidence: medium.

Two findings about bundled code that predate this pull request:


Generated by Claude Code

@krlmlr
krlmlr marked this pull request as draft November 30, 2026 23:27

This branch has not been deployed

No deployments
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.

2 participants