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

refactor: Separate implementation from interface for nanoarrow_testing component #561

Merged
merged 17 commits into from
Aug 2, 2024

Conversation

paleolimbot
Copy link
Member

@paleolimbot paleolimbot commented Jul 17, 2024

This PR implements nanoarrow_testing as a target instead of a (massive) header-only C++ implementation. This was suggested multiple times by multiple reviewers and makes it possible to add more testing utilities without further bloating a massive implementation/source mishmash. It also makes it more clear how to actually use the testing utilities because the header file is easier to skim (and doxygen no longer chokes on the header, which had previously resulted in these utilities not making it into the documentation builld!). Another advantage of this is removing nlohmann/json.hpp from the public header (i.e., a build-time only dependency).

The general pattern of testing/testint.cc is:

namespace writer_internal {
namespace {
// Implementations of functions that don't need the state of the TestingJsonWriter
}
}

// TestingJsonWriter implementations

namespace writer_internal {
namespace {
// Implementations of functions that don't need the state of the TestingJsonReader
}
}

// TestingJsonReader implementations

@paleolimbot paleolimbot marked this pull request as ready for review July 18, 2024 18:18
Copy link
Member

@bkietz bkietz left a comment

Choose a reason for hiding this comment

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

LGTM; straightforward extraction of a testing module.

@paleolimbot paleolimbot merged commit f74d57c into apache:main Aug 2, 2024
34 checks passed
@paleolimbot paleolimbot deleted the testing-runtime-lib branch August 5, 2024 12:31
paleolimbot added a commit that referenced this pull request Aug 5, 2024
After #561 , the
nanoarrow_testing library is no longer header-only and requires linking!
@paleolimbot paleolimbot added this to the nanoarrow 0.6.0 milestone Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants