You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GH-55454: [R][C++] Vendor URI parser for the R library - #55461
The reason will be displayed to describe this comment to others. Learn more.
🟢 Approval recommended
The offline R package CI coverage change has no active review issues.
No open issues 🎉
What changed in this PR
Adds offline R package CI coverage for GH-55454, checking that CRAN-style builds fall back to a minimal configuration when dependency downloads are unavailable.
Changes:
Adds a minimal offline R build task with CRAN checks enabled and vignettes skipped.
Adds an opt-in test mode that disables DNS, verifies connectivity is unavailable, clears remote-cache settings, and restores DNS after the check.
File
Description
dev/tasks/tasks.yml
Defines the offline minimal R build task.
ci/scripts/r_test.sh
Implements offline simulation and connectivity verification around R package checks.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unconditional vendoring breaks source installs from unsynced checkouts, and incorrect environment-variable overrides cause the tools test suite to fail in a clean environment.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Critical issues remain: archive cleanup can delete unrelated files in an existing DESTDIR, and source installs fail after make clean because metadata lookup assumes the removed tools/cpp tree exists.
No open issues 🎉
2 previously missed issues
In code that hasn't changed since last review
Handle missing synced metadata when installing from a checkout
r/tools/nixlibs.R:891
After make sync-cpp && make clean, tools/vendored remains but tools/cpp is removed, so a direct source install from the checkout now aborts in get_component_names() despite find_local_source() supporting ../cpp. Skip this lookup when the synced metadata is absent, or read metadata from the selected C++ source tree. If adding a metadata-existence guard, update the mocked tests in tools/test-nixlibs.R so they still exercise vendored dependency selection without a synced tree.
Restrict DESTDIR cleanup to uriparser and xsimd archives
r/tools/vendor_dependencies.sh:91
The optional DESTDIR can point to an existing download directory, but this loop silently deletes unrelated files, including other dependencies' archives and README files. Please restrict cleanup to older uriparser/xsimd archives instead of deleting everything outside keep.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Source installations can fail after make sync-cpp followed by make clean because tools/vendored remains while the metadata required by its dependency lookup is removed.
@thisisnic@amoeba this is ready for review. It vendors both uriparser and xsimd for the R package so that we can at least have a clean minimal build.
Now that we have this R-specific vendoring step, I'm separately researching how much we could get away with vendoring into the package to support more features. I suspect it's a no-go from a size perspective, but if we could get parquet support without adding a huge amount of size to the source tarball, that might be worth it.
The other option that WRE suggests is that we host these dependencies somewhere we control:
If the bundle is too large to be included in the package sources, it could be hosted at a long-term secure site under the maintainer’s control.
When a package bundles code under several licenses, the LICENSE file MUST contain details of all these licenses. For each component which is not Apache licensed, details of the component MUST be appended to the LICENSE file. The component license itself MUST either be appended or else stored elsewhere in the package with a pointer to it from the LICENSE file, e.g. if the license is long.
The ownership of copyright and intellectual property rights of all components of the package must be clear and unambiguous (including from the authors specification in the DESCRIPTION file). Where code is copied (or derived) from the work of others (including from R itself), care must be taken that any copyright/license statements are preserved and authorship is not misrepresented.
Preferably, an ‘Authors@R’ field would be used with ‘ctb’ roles for the authors of such code. Alternatively, the ‘Author’ field should list these authors as contributors.
Where copyrights are held by an entity other than the package authors, this should preferably be indicated via ‘cph’ roles in the ‘Authors@R’ field, or using a ‘Copyright’ field (if necessary referring to an inst/COPYRIGHTS file).
Trademarks must be respected.
(’All components’ includes any downloaded at installation or during use.)
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
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.
Rationale for this change
Make sure we can build on CRAN.
What changes are included in this PR?
A test for offline installations of the R package
Are these changes tested?
So far, all tests!
Are there any user-facing changes?
No
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by: