-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-39147: [R] Add Bootstrap.r #39148
Conversation
|
@github-actions crossbow submit r-binary-packages |
Revision: b9c839c Submitted crossbow builds: ursacomputing/crossbow @ actions-c75677e771
|
I have removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I left some notes, including some about making this work on macOS. Since I know there are a few maintainers on macOS and likely to be some on a continuous basis, I think it'd be nice to address them.
After manually editing bootstrap.R and update-checksum.R to make them work on macOS, bootstrap.R ran successfully for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will give this a closer review on Monday; however, at a very high level, I think that bootstrap.R
should only be concerned with copying (and trimming) the cpp sources from elsewhere in the repository. I think currently that happens via sync-cpp
. The makefile also does other things before building...those things should, I think, stay in the makefile. In other words, bootstrap.R will get run on users' machines so it must have a more restricted scope...the makefile commands will only get run on developer machines.
For completeness...the purpose of the bootstrap.R is to enable developer tools that use pkgbuild::build()
to "just work". These include:
devtools::submit_cran()
,devtools::check_win_devel()
, etc.- R CMD check in the RStudio IDE
pak::pak()
(this worked already by building a tarball without C++ sources and relying on nightly static lib builds; however, with bootstrap.R you could change C++ code and have somebody install the pull request version of soemething to see if it fixed an issue)- Stock r-lib/actions workflows. This might mean that we can simplify/unify some of our actions-based workflows (it certainly did for nanoarrow and adbc/r)
In ADBC and nanoarrow I also run Rscript bootstrap.R
in configure
to catch the case where somebody does R CMD INSTALL .
, but I don't think we need that here.
At the moment if run on a dev version it will skip everything and the release tarball won't have the file so a cran source install via pak or so will also not run it. We could make everything outside of
Ah yes that sounds useful, so we want to change it to always vendor the cpp source (which also means that we probably want to use something other than |
I'll look at converting the rsync invocation to R next week, also: #39154 |
Yes! bootstrap.R is the only file where this can happen that's guaranteed to run during
I would say that automating all those steps is a good thing, but bootstrap.R is not the file to do it. These steps aren't things that you want to fail during package installation via
This mostly matters before we have released it to CRAN (allows, for example, that I or somebody could quickly install the about-to-be-released tarball to ensure that it fixed some problem). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this on!
I really like the idea of automating these pre-release checks; however, I think bootstrap.R is not the right place for them (for the reasons I noted above). I would propose:
- If you anticipate using the Rified release steps, move the existing bootstrap.R that you have here into
tools/experimental_release_automation.R
. After the 15.0.0 release process would be a good time to evaluate its utility. - Rewrite the sync-cpp in pure R and put it in bootstrap.R
I do wonder if having both the makefile and the Rified release steps are both useful or if it's a little confusing to have them both. You are the primary use of both of them, so I will leave it up to you to decide what the best division of responsibility is.
Moving everything outside of |
I think that's a good idea...continue to use My high-level comment of having |
@paleolimbot as discussed last year (wow!?) I have refactored this to just be the R version of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nits...thank you! The fact that it does not run in configure
is particularly helpful (isolates the place where it runs to R CMD check
in RStudio, and devtools::build()
, where you probably do want this to happen.
Co-authored-by: Dewey Dunnington <dewey@dunnington.ca>
After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit dc20d95. There were 2 benchmark results indicating a performance regression:
The full Conbench report has more details. |
Sorry this is post merge, I just saw it now while tracking something else down. I see that there was already some discussion about how this is duplicative of the sync-cpp step in the make file and it seemed everyone agreed that having this in two places wasn't ideal: but is there a ticket to clean that up? I don't think I see anything linked here, but I might have missed something |
Rationale for this change
Currently installing via github is not possible because the vendoring of the cpp source isn't happening. We can use bootstrap.R to do it. (Does not work for
devtools::install_local()
as that copies the source folder before running bootstrap.R)What changes are included in this PR?
An R'ified version of
make sync-cpp
Are these changes tested?
locally
Are there any user-facing changes?
Yes, installing via
devtools::install_github()
will now properly vendor the cpp files.