Skip to content
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-41783: [C++] Make git-dependent definitions internal #41781

Merged
merged 1 commit into from
May 22, 2024

Conversation

pitrou
Copy link
Member

@pitrou pitrou commented May 22, 2024

Rationale for this change

Exposing the ARROW_GIT_ID and ARROW_GIT_DESCRIPTION preprocessor variables in our public headers tends to make incremental builds less efficient, since those values change very often during development.

Also, these values don't need to be preprocessor variables since they're just strings: you can't write useful #if directives with them. Instead, they can be inspected using GetBuildInfo().

Are these changes tested?

By existing builds and tests.

Are there any user-facing changes?

Use cases depending on these preprocessor variables, which is unlikely, may break. They can be fixed by calling arrow::GetBuildInfo() instead.

Copy link

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

In the case of PARQUET issues on JIRA the title also supports:

PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

See also:

@pitrou
Copy link
Member Author

pitrou commented May 22, 2024

@github-actions crossbow submit -g cpp

Copy link

Revision: 1f2709b

Submitted crossbow builds: ursacomputing/crossbow @ actions-500c735934

Task Status
test-alpine-linux-cpp GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-cuda-cpp GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-fedora-39-cpp GitHub Actions
test-ubuntu-20.04-cpp GitHub Actions
test-ubuntu-20.04-cpp-bundled GitHub Actions
test-ubuntu-20.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-20.04-cpp-thread-sanitizer GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions

@pitrou pitrou changed the title [C++] Make git-dependent definitions internal GH-41783: [C++] Make git-dependent definitions internal May 22, 2024
Copy link

⚠️ GitHub issue #41783 has been automatically assigned in GitHub to PR creator.

@pitrou pitrou force-pushed the git-config-internal branch from 1f2709b to bf026f7 Compare May 22, 2024 16:02
Exposing the ARROW_GIT_ID and ARROW_GIT_DESCRIPTION preprocessor variables in our public headers tends to make incremental builds less efficient, since those values change very often during development.

Also, these values don't need to be preprocessor variables since they're just strings: you can't write useful `#if` directives with them. Instead, they can be inspected using `GetBuildInfo()`.
@pitrou pitrou force-pushed the git-config-internal branch from bf026f7 to 2d21b2e Compare May 22, 2024 16:11
@pitrou
Copy link
Member Author

pitrou commented May 22, 2024

@kou Does this look ok to you?

@pitrou pitrou marked this pull request as ready for review May 22, 2024 16:12
@pitrou pitrou requested review from assignUser, kou and raulcd as code owners May 22, 2024 16:12
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

Ah, good point. I missed it.

@kou kou merged commit 9185d7d into apache:main May 22, 2024
39 of 40 checks passed
@kou kou removed the awaiting review Awaiting review label May 22, 2024
@github-actions github-actions bot added the awaiting merge Awaiting merge label May 22, 2024
Copy link

After merging your PR, Conbench analyzed the 7 benchmarking runs that have been run so far on merge-commit 9185d7d.

There weren't enough matching historic benchmark results to make a call on whether there were regressions.

The full Conbench report has more details.

@pitrou pitrou deleted the git-config-internal branch May 23, 2024 08:49
vibhatha pushed a commit to vibhatha/arrow that referenced this pull request May 25, 2024
…#41781)

### Rationale for this change

Exposing the ARROW_GIT_ID and ARROW_GIT_DESCRIPTION preprocessor variables in our public headers tends to make incremental builds less efficient, since those values change very often during development.

Also, these values don't need to be preprocessor variables since they're just strings: you can't write useful `#if` directives with them. Instead, they can be inspected using `GetBuildInfo()`.

### Are these changes tested?

By existing builds and tests.

### Are there any user-facing changes?

Use cases depending on these preprocessor variables, which is unlikely, may break. They can be fixed by calling `arrow::GetBuildInfo()` instead.

* GitHub Issue: apache#41783

Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
Sign up for free to 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.

2 participants