Skip to content

GH-55279: [C++] Match compute-testing definitions to test linkage - #55280

Open
ConnorQi01 wants to merge 1 commit into
apache:mainfrom
ConnorQi01:fix/compute-test-linkage-20261027
Open

ConnorQi01 wants to merge 1 commit into
apache:mainfrom
ConnorQi01:fix/compute-test-linkage-20261027

Conversation

@ConnorQi01

@ConnorQi01 ConnorQi01 commented Oct 27, 2026 •

Copy link
Copy Markdown

Rationale for this change

Closes #55279.

ARROW_BUILD_STATIC indicates library availability, not selected test
linkage. When shared-linked Windows tests inherit static API definitions
through arrow_compute_testing, arrow-dlpack-test fails with duplicate
arrow::Status definitions.

What changes are included in this PR?

Select the helper's Windows static API definitions using
ARROW_TEST_LINKAGE STREQUAL "static" instead of ARROW_BUILD_STATIC.
No library variant is disabled and no test is removed.

Are these changes tested?

The real DLPack target at d228ba5 reproduces the original LNK2005/LNK1169.
After the change, rebuilding in the same directory succeeds and all
39 DLPack tests from 10 suites pass.

The extracted exact target section additionally passes shared-tests with both
variants, static-tests, and shared-only linkage controls. The patch also
applies to current main 4a6ebc06. The full Arrow suite was not run.

Are there any user-facing changes?

Only the Windows test helper's compile definitions change. No public API or
library-build option changes.

Was AI used for this PR?

Copilot assisted with diagnosis, the conditional change, the targeted
validation workflow, and this description. No internal compiler inputs or
private pipeline logs are included.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

Use selected test linkage instead of static-library availability for Windows API definitions. The original DLPack target link failure reproduces; the patched target passes all 39 tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 04:55
@github-actions

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #55279 has no components, please add labels for components.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The narrow condition change matches test linkage, preserves static-test behavior, and has no identified blocking issues.

No open issues 🎉

What changed in this PR

Fixes GH-55279 by aligning the Windows compute-testing helper’s static API definitions with the selected test linkage, preventing shared-linked tests from inheriting static declarations.

Changes:

  • Uses ARROW_TEST_LINKAGE STREQUAL "static" instead of ARROW_BUILD_STATIC.
  • Preserves library availability and test coverage; only the helper’s compile-definition condition changes.
File Description
cpp/​src/​arrow/​compute/​CMakeLists.txt Gates Windows static API definitions on selected test linkage.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #55279 has no components, please add labels for components.

@tadeja

tadeja commented Oct 27, 2026

Copy link
Copy Markdown
Member

fyi @Reranko05, @kou this would change: https://github.com/apache/arrow/pull/50606/changes#diff-a2a36a692f60885b3c84c80b663cd2730bf3d5e5809755e4559bdafe2006c64dR49 (and perhaps needed for engine/CMakeLists.txt too, not just compute/CMakeLists.txt?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++] Windows compute testing helper exports static API definitions to shared-linked tests

3 participants