Skip to content

GH-45796: [C++] Add integration directory to Meson configuration - #45797

Merged
WillAyd merged 3 commits into
apache:mainfrom
WillAyd:meson-add-integration-directory
Apr 10, 2025
Merged

WillAyd merged 3 commits into
apache:mainfrom
WillAyd:meson-add-integration-directory

Conversation

@WillAyd

@WillAyd WillAyd commented Mar 14, 2025 •

Copy link
Copy Markdown
Contributor

Rationale for this change

This continues to add features to the Meson build configuration

What changes are included in this PR?

The integration directory has been added

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

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

Comment thread cpp/src/arrow/integration/meson.build Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@kou there is some inconsistency in the tests here that you alluded to before. Most tests do not define a main function and therefore use gtest_main_dep as a dependency. However, this JSON integration test does define its own main, so you have to link just gtest_dep or you end up with duplicate main symbols.

I don't know the history of this test enough to know if it is intentional that some tests define their own main function while others do not. Does it make sense to have two different dependencies or should we consider removing main from this test module?

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.

I think that this is intentional. The test is used for an unit test and an integration test with other implementations. If the test is used for an integration test with other implementations, we pass a custom --integration flag. So we have a custom main().

Could you use gtest_dep not gtest_main_dep here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good - yes this is already using gtest_dep :-)

Comment thread cpp/src/arrow/meson.build Outdated

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.

Why do we need to remove the if needs_json check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The integration tests requires RapidJSON but does not require the JSON option to be set, so to get that to work without disabling the integration test I think this need to exist without branching

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.

OK. Then can we use if needs_json or needs_integration instead of removing this condition?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No problem - done

Comment thread cpp/src/arrow/integration/meson.build Outdated

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.

I think that this is intentional. The test is used for an unit test and an integration test with other implementations. If the test is used for an integration test with other implementations, we pass a custom --integration flag. So we have a custom main().

Could you use gtest_dep not gtest_main_dep here?

@WillAyd

WillAyd commented Mar 16, 2025

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit *meson

@github-actions

Copy link
Copy Markdown

Revision: 1311f6eb53071b11090b0285eaaa5d32c3cb63d8

Submitted crossbow builds: ursacomputing/crossbow @ actions-d35184ccea

Task Status
test-conda-cpp-meson GitHub Actions

@WillAyd

WillAyd commented Mar 18, 2025

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit *meson

@github-actions

Copy link
Copy Markdown

Revision: d10ffa78f0163ad85347355f2ce68003413c3abc

Submitted crossbow builds: ursacomputing/crossbow @ actions-c950246fa9

Task Status
test-conda-cpp-meson GitHub Actions

@WillAyd
WillAyd force-pushed the meson-add-integration-directory branch from d10ffa7 to 92d190f Compare April 9, 2025 19:28
@WillAyd

WillAyd commented Apr 9, 2025

Copy link
Copy Markdown
Contributor Author

@github-actions crossbow submit *meson

@github-actions

github-actions Bot commented Apr 9, 2025

Copy link
Copy Markdown

Revision: 92d190f

Submitted crossbow builds: ursacomputing/crossbow @ actions-b70760d18c

Task Status
test-conda-cpp-meson GitHub Actions

link_with: [arrow_test_lib],
)

if needs_tests

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.

Can we remove this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In this particular case I don't think so - the CMake configuration compiles json_integration_test.cc into an executable, but only makes it a test if ARROW_BUILDS_TESTS is true, leaving it as a standalone executable otherwise.

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.

Ah, I see. We use the executable for integration test too.

Comment thread cpp/meson.options Outdated
type: 'boolean',
description: 'Build the Arrow IPC extensions',
value: false,
value: true,

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.

Why do we need this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Rebase mistake - thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Errr...actually this is intentional. It looks like ARROW_IPC is ON by default in the CMake configuration. I can split this off into a separate PR if needed though

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.

Ah, OK. Could you split this off into a separated PR for easy to track later?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure - see #46090

@kou kou 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

link_with: [arrow_test_lib],
)

if needs_tests

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.

Ah, I see. We use the executable for integration test too.

Comment thread cpp/meson.options Outdated
type: 'boolean',
description: 'Build the Arrow IPC extensions',
value: false,
value: true,

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.

Ah, OK. Could you split this off into a separated PR for easy to track later?

@WillAyd
WillAyd merged commit 278fa14 into apache:main Apr 10, 2025
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 278fa14.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 6 possible false positives for unstable benchmarks that are known to sometimes produce them.

zanmato1984 pushed a commit to zanmato1984/arrow that referenced this pull request Apr 15, 2025
apache#45797)

### Rationale for this change

This continues to add features to the Meson build configuration

### What changes are included in this PR?

The integration directory has been added

### Are these changes tested?

Yes

### Are there any user-facing changes?

No
* GitHub Issue: apache#45796

Authored-by: Will Ayd <william.ayd@icloud.com>
Signed-off-by: Will Ayd <william.ayd@icloud.com>
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