This is an automated email from the ASF dual-hosted git repository.
brycemecum pushed a commit to branch maint-19.0.1-r
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/maint-19.0.1-r by this push:
new c47a0227d6 GH-45605: [R][C++] Fix identifier ... preceded by
whitespace warnings (#45606)
c47a0227d6 is described below
commit c47a0227d681514895e225255e9415d62ca90ea6
Author: Jonathan Keane <[email protected]>
AuthorDate: Mon Feb 24 11:30:51 2025 -0600
GH-45605: [R][C++] Fix identifier ... preceded by whitespace warnings
(#45606)
### Rationale for this change
Fix warnings, pass on CRAN
### What changes are included in this PR?
Removing some whitespace
### Are these changes tested?
Yes
### Are there any user-facing changes?
No, other than being releasable on CRAN
* GitHub Issue: #45605
Authored-by: Jonathan Keane <[email protected]>
Signed-off-by: Bryce Mecum <[email protected]>
---
ci/scripts/r_test.sh | 4 +++-
cpp/src/arrow/vendored/datetime/README.md | 3 +++
cpp/src/arrow/vendored/datetime/date.h | 8 ++++----
dev/tasks/r/github.linux.cran.yml | 21 +++++++++++----------
dev/tasks/tasks.yml | 2 --
r/src/filesystem.cpp | 2 +-
6 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/ci/scripts/r_test.sh b/ci/scripts/r_test.sh
index d5fd789147..67142b66dd 100755
--- a/ci/scripts/r_test.sh
+++ b/ci/scripts/r_test.sh
@@ -91,7 +91,9 @@ export TEXMFVAR=/tmp/texmf-var
BEFORE=$(ls -alh ~/)
SCRIPT="as_cran <- !identical(tolower(Sys.getenv('NOT_CRAN')), 'true')
- if (as_cran) {
+ # generally will be false, but we can override it by setting
SKIP_VIGNETTES=true
+ skip_vignettes <- identical(tolower(Sys.getenv('SKIP_VIGNETTES')), 'true')
+ if (as_cran && !skip_vignettes) {
args <- '--as-cran'
build_args <- character()
} else {
diff --git a/cpp/src/arrow/vendored/datetime/README.md
b/cpp/src/arrow/vendored/datetime/README.md
index 89132d9cba..4399191b73 100644
--- a/cpp/src/arrow/vendored/datetime/README.md
+++ b/cpp/src/arrow/vendored/datetime/README.md
@@ -23,6 +23,9 @@ of the above project.
The following changes are made:
- fix internal inclusion paths (from "date/xxx.h" to simply "xxx.h")
- enclose the `date` namespace inside the `arrow_vendored` namespace
+- fix 4 declarations like `CONSTCD11 date::day operator "" _d(unsigned long
long d) NOEXCEPT;`
+ to not have offending whitespace for modern clang:
+ `CONSTCD11 date::day operator ""_d(unsigned long long d) NOEXCEPT;`
## How to update
diff --git a/cpp/src/arrow/vendored/datetime/date.h
b/cpp/src/arrow/vendored/datetime/date.h
index c17d6f3f7a..1b06182a6d 100644
--- a/cpp/src/arrow/vendored/datetime/date.h
+++ b/cpp/src/arrow/vendored/datetime/date.h
@@ -963,8 +963,8 @@ operator<<(std::basic_ostream<CharT, Traits>& os, const
year_month_weekday_last&
inline namespace literals
{
-CONSTCD11 date::day operator "" _d(unsigned long long d) NOEXCEPT;
-CONSTCD11 date::year operator "" _y(unsigned long long y) NOEXCEPT;
+CONSTCD11 date::day operator ""_d(unsigned long long d) NOEXCEPT;
+CONSTCD11 date::year operator ""_y(unsigned long long y) NOEXCEPT;
} // inline namespace literals
#endif // !defined(_MSC_VER) || (_MSC_VER >= 1900)
@@ -1972,7 +1972,7 @@ inline namespace literals
CONSTCD11
inline
date::day
-operator "" _d(unsigned long long d) NOEXCEPT
+operator ""_d(unsigned long long d) NOEXCEPT
{
return date::day{static_cast<unsigned>(d)};
}
@@ -1980,7 +1980,7 @@ operator "" _d(unsigned long long d) NOEXCEPT
CONSTCD11
inline
date::year
-operator "" _y(unsigned long long y) NOEXCEPT
+operator ""_y(unsigned long long y) NOEXCEPT
{
return date::year(static_cast<int>(y));
}
diff --git a/dev/tasks/r/github.linux.cran.yml
b/dev/tasks/r/github.linux.cran.yml
index 8f56bf771d..435e37fc53 100644
--- a/dev/tasks/r/github.linux.cran.yml
+++ b/dev/tasks/r/github.linux.cran.yml
@@ -21,20 +21,21 @@
jobs:
as-cran:
- name: "rhub/{{ MATRIX }}"
+ name: "rhub/{{ '${{ matrix.config.r_image }}' }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- # See https://hub.docker.com/r/rhub
- r_image:
- - ubuntu-gcc12 # ~ r-devel-linux-x86_64-debian-gcc
- - ubuntu-clang # ~ r-devel-linux-x86_64-debian-clang
- - ubuntu-next # ~ r-patched-linux-x86_64
- - ubuntu-release # ~ r-release-linux-x86_64
+ config:
+ # See https://r-hub.github.io/containers/
+ - { r_image: "ubuntu-gcc12" } # ~ r-devel-linux-x86_64-debian-gcc
+ - { r_image: "ubuntu-clang" } # ~ r-devel-linux-x86_64-debian-clang
+ - { r_image: "ubuntu-next" } # ~ r-patched-linux-x86_64
+ - { r_image: "ubuntu-release" } # ~ r-release-linux-x86_64
+ - { r_image: "clang20", skip_vignettes: true } # ~
r-devel-linux-x86_64-fedora-clang
env:
R_ORG: "rhub"
- R_IMAGE: {{ MATRIX }}
+ R_IMAGE: {{ '${{ matrix.config.r_image }}' }}
R_TAG: "latest"
ARROW_R_DEV: "FALSE"
steps:
@@ -46,7 +47,7 @@ jobs:
env:
{{ macros.github_set_sccache_envvars()|indent(8)}}
# setting ARROW_SOURCE_HOME='' here ensures that we use the cpp source
copied into tools/
- run: archery docker run -e ARROW_SOURCE_HOME='' r
+ run: archery docker run -e ARROW_SOURCE_HOME='' -e SKIP_VIGNETTES={{
'${{ matrix.config.skip_vignettes }}' }} r
- name: Dump install logs
run: cat arrow/r/check/arrow.Rcheck/00install.out
if: always()
@@ -57,5 +58,5 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
- name: test-output-{{ "${{ matrix.r_image }}" }}
+ name: test-output-{{ "${{ matrix.config.r_image }}" }}
path: arrow/r/check/arrow.Rcheck/tests/testthat.Rout*
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index c43df2b6f2..a224d64cf0 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -1198,8 +1198,6 @@ tasks:
test-r-linux-as-cran:
ci: github
template: r/github.linux.cran.yml
- params:
- MATRIX: {{ "${{ matrix.r_image }}" }}
test-r-macos-as-cran:
ci: github
diff --git a/r/src/filesystem.cpp b/r/src/filesystem.cpp
index 95f19e4f2f..d941ce4d3f 100644
--- a/r/src/filesystem.cpp
+++ b/r/src/filesystem.cpp
@@ -258,7 +258,7 @@ std::string fs___SubTreeFileSystem__base_path(
// [[arrow::export]]
cpp11::writable::list fs___FileSystemFromUri(const std::string& path) {
- using cpp11::literals::operator"" _nm;
+ using cpp11::literals::operator""_nm;
std::string out_path;
auto io_context = MainRThread::GetInstance().CancellableIOContext();