Skip to content

Conversation

@yutannihilation
Copy link
Contributor

I found @paleolimbot invented a cool mechanism (r-lib/pkgbuild#157) that can be used for vendoring the necessary source code when installed via pkgbuild (i.e. pak). Currently, the README requires users to install the sedonadb R package by:

git clone https://github.com/apache/sedona-db.git
cd sedona-db/r/sedonadb
R CMD INSTALL .

This pull request will allows us to simplify the installation to this:

pak::pkg_install("apache/sedona-db/r/sedonadb")

(and probably enables it to publish the R package to R-universe?)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this file should be added to .Rbuildignore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks for catching!

Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

I have https://paleolimbot.r-universe.dev/builds set up that should sync once this merges and we'll see!

Comment on lines 98 to 100
- name: Test R Package
run: |
R -e 'library(testthat); test_local("r/sedonadb", MultiReporter$new(list(CheckReporter$new(), LocationReporter$new())))'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make sense to keep this and add the CMD check version in a separate workflow that doesn't run whenever somebody touches rust/**. I think the R CMD INSTALL version more effectively uses the cache (but if the CMD check version is still in the ~15 minute range we should totally do that).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, makes sense! I reverted r.yml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the CMD check version in a separate workflow

The reason I used the check-r-package action was simply that it looked easier to me. So, if not, I don't have strong opinion to use R CMD check.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, r-polars has two jobs: a fast job that builds in debug mode and runs only test, and a job workflow that builds in release mode and runs R CMD check.
If you're interested, check them out.
https://github.com/pola-rs/r-polars/blob/66d7b73b6496dc4494fae72f8540a6958cec0c9a/.github/workflows/test-r.yml#L47-L197

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get CMD check passing in a future PR! As I think you discovered here, there's some C file deep in the dependency stack that CMD check objects to (we either need to patch the file, remove the file after build, or ignore just that specific error).

Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jiayuasu jiayuasu merged commit d2ccd6e into apache:main Sep 24, 2025
6 checks passed
@yutannihilation yutannihilation deleted the feat/r-bootstrap branch September 24, 2025 22:02
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.

4 participants