scylladb / scylladb/cpp-rs-driver
Remove `testing_unimplemented.cpp` in favour of `integration.rs`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26
- Forks
- 19
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 7
Description
testing_unimplemented.cpp is used ONLY for C++ integration tests (/tests/src/integration).
integration.rs is used to provide stubs for:
- Rust integration tests,
- C examples,
- C++ integration tests, as proved by the code excerpt below.
if(CASS_BUILD_INTEGRATION_TESTS OR CASS_BUILD_EXAMPLES)
set(CMAKE_Rust_FLAGS "${CMAKE_Rust_FLAGS} --cfg cpp_integration_testing")
endif()
Note that function sets in both files should have empty intersection.
So the current rule of thumb is to put stubs in integration.rs if they're useful to anything other than C++ integration tests, else leave it in testing_unimplemented.cpp.
Originally posted by @wprzytula in https://github.com/scylladb/cpp-rs-driver/pull/398#discussion_r2611903366
The idea of @Lorak-mmk is to remove testing_unimplemented.cpp altogether and have everything in testing.rs.
One immediately problem with this is that current implementations of functions in testing_unimplemented.cpp throw C++ exceptions, which Rust implementations in testing.rs obviously couldn't do.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare testing_unimplemented.cpp, integration.rs, and testing.rs, starting with the CMake condition and /tests/src/integration usage described in the issue. Determine how the existing C++ exception behavior can be preserved before consolidating the stubs. Done means testing_unimplemented.cpp is removed without breaking Rust, C, or C++ integration tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, rust
- Domain
- build-system, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100