xanderbailey commented on code in PR #3107:
URL: https://github.com/apache/iceberg-rust/pull/3107#discussion_r4130895021
##########
crates/iceberg/src/test_utils/mod.rs:
##########
@@ -19,6 +19,9 @@
//! This module is pub just for internal testing.
//! It is subject to change and is not intended to be used by external users.
+#[cfg(test)]
+pub(crate) mod scan;
Review Comment:
I had a go at this but it falls down for anything that returns `iceberg`
types. The `#[cfg(test)]` mods inside `src/` get compiled as a separate crate
instance from the one `iceberg_test_utils` links against, so you end up with
two `iceberg`s in the graph:
```
expected `runtime::Runtime`, found `iceberg::runtime::Runtime`
note: there are multiple different versions of crate `iceberg` in the
dependency graph
108 | pub struct Runtime {
| ^^^^^^^^^^^^^^^^^^ this is the expected type
108 | pub struct Runtime {
| ------------------ this is the found type
```
So `TableTestFixture` and friends can't move while they're used from in-src
unit tests - that would mean relocating those tests to `crates/iceberg/tests/`
and rewriting them against the public API only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]