Skip to content

ARROW-17694: [C++] Remove std::optional backport - #14105

Merged
pitrou merged 10 commits into
apache:masterfrom
pitrou:ARROW-17694-std-optional
Sep 15, 2022
Merged

ARROW-17694: [C++] Remove std::optional backport#14105
pitrou merged 10 commits into
apache:masterfrom
pitrou:ARROW-17694-std-optional

Conversation

@pitrou

Copy link
Copy Markdown
Member

Just use the C++17 standard library version.

@pitrou
pitrouforce-pushed the ARROW-17694-std-optional branch from d0bdb0b to 9168b04CompareSeptember 13, 2022 08:11
@pitrou

This comment was marked as outdated.

@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

Comment thread.github/workflows/cpp.yml Outdated
@pitrou
pitrouforce-pushed the ARROW-17694-std-optional branch from 0809adb to 5bd1967CompareSeptember 13, 2022 14:27
@pitrou

This comment was marked as outdated.

@pitrou

This comment was marked as outdated.

@pitrou

Copy link
Copy Markdown
MemberAuthor

@assignUser Would you know how to change the macOS deployment target for autobrew? I tried to set it to 10.14 using the env var MACOSX_DEPLOYMENT_TARGET but it wasn't picked up:
https://github.com/ursacomputing/crossbow/actions/runs/3047525991/jobs/4911606506#step:8:6773

/Users/voltrondata/tmp/hbtmp/apache-arrow-20220913-7531-1f8l15l/cpp/src/arrow/memory_pool.cc:143:20: error: call to unavailable member function 'value': introduced in macOS 10.14
return backend.value();
~~~~~~~~^~~~~

@assignUser

Copy link
Copy Markdown
Member

Not of the bat, I'll look into it. I hope it is possible otherwise that might be an issue due to CRAN building on 10.13.

@assignUser

Copy link
Copy Markdown
Member

The envvar is correctly set in the wf and looking at our cmake it should get picked up. I wonder if the issue is that the deployment target can't be higher than the host? I haven't found anything documenting such behavior and the llvm/clang version installed should support c++17 (as we confirmed previously).

I also had a glance at autobrew and I don't think it is forcing the deployment target anywhere. Maybe passing it explicitly as a cmake arg in the formula works? https://github.com/pitrou/arrow/blob/ARROW-17694-std-optional/dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb

@pitrou

This comment was marked as outdated.

@pitrou

Copy link
Copy Markdown
MemberAuthor

@assignUser Well, it got even worse as there's now an error about something being available only in 10.12+:
https://github.com/ursacomputing/crossbow/actions/runs/3052496381/jobs/4921948251#step:7:6790

Yet as you can see the correct compiler command-line options seem to be given... I can only assume that homebrew is doing something horrible under the hood :-(

@pitrou

Copy link
Copy Markdown
MemberAuthor

Revision: 93f4f3e1ed45c9c045c8e279ce6d6b95addabf68

Submitted crossbow builds: ursacomputing/crossbow @ optional-4

TaskStatus
homebrew-cppGithub Actions
homebrew-cpp-autobrewGithub Actions
homebrew-r-autobrewGithub Actions
homebrew-r-brewGithub Actions

@assignUser

Copy link
Copy Markdown
Member

I looked at some other packages on CRAN using C++17 and found that httpgd uses std::optional IIUC https://github.com/nx10/httpgd/blob/ae03f478c0fa4cc09b729cc00738ad2c1ceba4ed/src/lib/belle.h#L353

I'll check their configure/autobrew script

@pitrou
pitrouforce-pushed the ARROW-17694-std-optional branch from 93f4f3e to a184425CompareSeptember 14, 2022 12:45
@pitrou

Copy link
Copy Markdown
MemberAuthor

Revision: a18442593ac0a2fc3654247706740b8699ea9537

Submitted crossbow builds: ursacomputing/crossbow @ optional-5

TaskStatus
homebrew-r-autobrewGithub Actions
homebrew-r-brewGithub Actions

@assignUser

Copy link
Copy Markdown
Member

That looks promising 🤞

@pitrou

This comment was marked as outdated.

@pitrou
pitrou requested a review from kouSeptember 14, 2022 15:54
@pitrou

Copy link
Copy Markdown
MemberAuthor

@kou Would you mind giving this another look?

kou
kou approved these changes Sep 15, 2022

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

Thanks!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you put this after -DARROW_CSV=ON to keep order?

@pitrou
pitrouforce-pushed the ARROW-17694-std-optional branch from 4941806 to 3566deeCompareSeptember 15, 2022 07:35
@pitrou

Copy link
Copy Markdown
MemberAuthor

Revision: 3566dee

Submitted crossbow builds: ursacomputing/crossbow @ optional-7

TaskStatus
almalinux-8-amd64Github Actions
almalinux-8-arm64TravisCI
almalinux-9-amd64Github Actions
almalinux-9-arm64TravisCI
amazon-linux-2-amd64Github Actions
amazon-linux-2-arm64TravisCI
centos-7-amd64Github Actions
centos-8-stream-amd64Github Actions
centos-8-stream-arm64TravisCI
centos-9-stream-amd64Github Actions
centos-9-stream-arm64TravisCI
conan-maximumGithub Actions
conan-minimumGithub Actions
conda-cleanAzure
conda-linux-gcc-py310-arm64Azure
conda-linux-gcc-py310-cpuAzure
conda-linux-gcc-py310-cudaAzure
conda-linux-gcc-py310-ppc64leAzure
conda-linux-gcc-py37-arm64Azure
conda-linux-gcc-py37-cpu-r40Azure
conda-linux-gcc-py37-cpu-r41Azure
conda-linux-gcc-py37-cudaAzure
conda-linux-gcc-py37-ppc64leAzure
conda-linux-gcc-py38-arm64Azure
conda-linux-gcc-py38-cpuAzure
conda-linux-gcc-py38-cudaAzure
conda-linux-gcc-py38-ppc64leAzure
conda-linux-gcc-py39-arm64Azure
conda-linux-gcc-py39-cpuAzure
conda-linux-gcc-py39-cudaAzure
conda-linux-gcc-py39-ppc64leAzure
conda-osx-arm64-clang-py310Azure
conda-osx-arm64-clang-py38Azure
conda-osx-arm64-clang-py39Azure
conda-osx-clang-py310Azure
conda-osx-clang-py37-r40Azure
conda-osx-clang-py37-r41Azure
conda-osx-clang-py38Azure
conda-osx-clang-py39Azure
conda-win-vs2019-py310Azure
conda-win-vs2019-py37-r40Azure
conda-win-vs2019-py37-r41Azure
conda-win-vs2019-py38Azure
conda-win-vs2019-py39Azure
debian-bookworm-amd64Github Actions
debian-bookworm-arm64TravisCI
debian-bullseye-amd64Github Actions
debian-bullseye-arm64TravisCI
example-cpp-minimal-build-staticGithub Actions
example-cpp-minimal-build-static-system-dependencyGithub Actions
example-python-minimal-build-fedora-condaGithub Actions
example-python-minimal-build-ubuntu-venvGithub Actions
homebrew-cppGithub Actions
homebrew-r-autobrewGithub Actions
homebrew-r-brewGithub Actions
java-jarsGithub Actions
nugetGithub Actions
python-sdistGithub Actions
r-binary-packagesGithub Actions
test-alpine-linux-cppGithub Actions
test-build-cpp-fuzzGithub Actions
test-build-vcpkg-winGithub Actions
test-conda-cppGithub Actions
test-conda-cpp-valgrindAzure
test-conda-python-3.10Github Actions
test-conda-python-3.7Github Actions
test-conda-python-3.7-hdfs-2.9.2Github Actions
test-conda-python-3.7-hdfs-3.2.1Github Actions
test-conda-python-3.7-kartothek-latestGithub Actions
test-conda-python-3.7-kartothek-masterGithub Actions
test-conda-python-3.7-pandas-0.24Github Actions
test-conda-python-3.7-pandas-latestGithub Actions
test-conda-python-3.7-spark-v3.1.2Github Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-hypothesisGithub Actions
test-conda-python-3.8-pandas-latestGithub Actions
test-conda-python-3.8-pandas-nightlyGithub Actions
test-conda-python-3.8-spark-v3.2.0Github Actions
test-conda-python-3.9Github Actions
test-conda-python-3.9-dask-latestGithub Actions
test-conda-python-3.9-dask-masterGithub Actions
test-conda-python-3.9-pandas-masterGithub Actions
test-conda-python-3.9-spark-masterGithub Actions
test-debian-10-cpp-amd64Github Actions
test-debian-10-cpp-i386Github Actions
test-debian-11-cpp-amd64Github Actions
test-debian-11-cpp-i386Github Actions
test-debian-11-go-1.17Azure
test-debian-11-python-3Azure
test-debian-c-glibGithub Actions
test-debian-rubyGithub Actions
test-fedora-35-cppGithub Actions
test-fedora-35-python-3Azure
test-fedora-r-clang-sanitizerAzure
test-r-arrow-backwards-compatibilityGithub Actions
test-r-depsource-bundledAzure
test-r-depsource-systemGithub Actions
test-r-dev-duckdbGithub Actions
test-r-devdocsGithub Actions
test-r-gcc-11Github Actions
test-r-gcc-12Github Actions
test-r-install-localGithub Actions
test-r-linux-as-cranGithub Actions
test-r-linux-rchkGithub Actions
test-r-linux-valgrindAzure
test-r-minimal-buildAzure
test-r-offline-maximalGithub Actions
test-r-offline-minimalAzure
test-r-rhub-debian-gcc-devel-lto-latestAzure
test-r-rhub-debian-gcc-release-custom-ccacheAzure
test-r-rhub-ubuntu-gcc-release-latestAzure
test-r-rocker-r-base-latestAzure
test-r-rstudio-r-base-4.1-opensuse153Azure
test-r-rstudio-r-base-4.2-centos7-devtoolset-8Azure
test-r-rstudio-r-base-4.2-focalAzure
test-r-ubuntu-22.04Github Actions
test-r-versionsGithub Actions
test-skyhook-integrationGithub Actions
test-ubuntu-18.04-cppGithub Actions
test-ubuntu-18.04-cpp-releaseGithub Actions
test-ubuntu-18.04-cpp-staticGithub Actions
test-ubuntu-18.04-r-sanitizerAzure
test-ubuntu-20.04-cppGithub Actions
test-ubuntu-20.04-cpp-17Github Actions
test-ubuntu-20.04-cpp-bundledGithub Actions
test-ubuntu-20.04-cpp-thread-sanitizerGithub Actions
test-ubuntu-20.04-python-3Azure
test-ubuntu-22.04-cppGithub Actions
test-ubuntu-c-glibGithub Actions
test-ubuntu-default-docsAzure
test-ubuntu-rubyGithub Actions
ubuntu-bionic-amd64Github Actions
ubuntu-bionic-arm64TravisCI
ubuntu-focal-amd64Github Actions
ubuntu-focal-arm64TravisCI
ubuntu-jammy-amd64Github Actions
ubuntu-jammy-arm64TravisCI
wheel-macos-big-sur-cp310-arm64Github Actions
wheel-macos-big-sur-cp310-universal2Github Actions
wheel-macos-big-sur-cp38-arm64Github Actions
wheel-macos-big-sur-cp39-arm64Github Actions
wheel-macos-big-sur-cp39-universal2Github Actions
wheel-macos-mojave-cp310-amd64Github Actions
wheel-macos-mojave-cp37-amd64Github Actions
wheel-macos-mojave-cp38-amd64Github Actions
wheel-macos-mojave-cp39-amd64Github Actions
wheel-manylinux2014-cp310-amd64Github Actions
wheel-manylinux2014-cp310-arm64TravisCI
wheel-manylinux2014-cp37-amd64Github Actions
wheel-manylinux2014-cp37-arm64TravisCI
wheel-manylinux2014-cp38-amd64Github Actions
wheel-manylinux2014-cp38-arm64TravisCI
wheel-manylinux2014-cp39-amd64Github Actions
wheel-manylinux2014-cp39-arm64TravisCI
wheel-windows-cp310-amd64Github Actions
wheel-windows-cp37-amd64Github Actions
wheel-windows-cp38-amd64Github Actions
wheel-windows-cp39-amd64Github Actions

@pitrou

Copy link
Copy Markdown
MemberAuthor

The test failures seem the same as usual, so I'm going to merge.

@pitrou
pitrou merged commit 5e49174 into apache:masterSep 15, 2022
@pitrou
pitrou deleted the ARROW-17694-std-optional branch September 15, 2022 10:37
@ursabot

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = 2749fef and contender = 5e49174. 5e49174 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️0.51% ⬆️0.03%] test-mac-arm
[Failed ⬇️0.56% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.6% ⬆️0.39%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 5e49174d ec2-t3-xlarge-us-east-2
[Finished] 5e49174d test-mac-arm
[Failed] 5e49174d ursa-i9-9960x
[Finished] 5e49174d ursa-thinkcentre-m75q
[Finished] 2749fef9 ec2-t3-xlarge-us-east-2
[Failed] 2749fef9 test-mac-arm
[Failed] 2749fef9 ursa-i9-9960x
[Finished] 2749fef9 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

zagto pushed a commit to zagto/arrow that referenced this pull request Oct 7, 2022
Just use the C++17 standard library version.
Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@pitrou@assignUser@ursabot@kou