jonkeane commented on a change in pull request #10841:
URL: https://github.com/apache/arrow/pull/10841#discussion_r680595069



##########
File path: ci/scripts/r_deps.sh
##########
@@ -25,7 +25,12 @@ source_dir=${1}/r
 pushd ${source_dir}
 
 # Install R package dependencies
-${R_BIN} -e "install.packages('remotes'); remotes::install_cran(c('glue', 
'rcmdcheck', 'sys'))"
-${R_BIN} -e "remotes::install_deps(dependencies = TRUE)"
+# install.packages() emits warnings if packages fail to install,
+# but we want to error/fail the build.
+# options(warn=2) turns warnings into errors
+${R_BIN} -e "options(warn=2); install.packages('remotes'); 
remotes::install_cran(c('glue', 'rcmdcheck', 'sys')); remotes::install_deps()"
+# Separately install the optional/test dependencies but don't error on them,
+# they're not available everywhere and that's ok
+${R_BIN} -e "remotes::install_deps(dependencies = 'Suggests')"

Review comment:
       ```suggestion
   ${R_BIN} -e "remotes::install_deps(dependencies = TRUE)"
   ```
   
   I think that we don't actually want to use "Suggests" here, because it 
appears that in remotes, that is then [used recursively with all of the 
Suggested packages if I'm reading 
correctly](https://github.com/r-lib/remotes/blob/3e35a1f41ce4923088a4c2b0ca463ea1d81377cb/R/install.R#L198)
 which is why we are suddenly installing many more packages + seeing failures 
we didn't have before.
   
   Using `dependencies = TRUE` is a little silly since part of them were 
already installed in the line above, but should restore the behavior we want of 
only installing our Suggests + their (hard) dependencies rather than our 
Suggests + their Suggests + ...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to