Would really appreciate help with this. Same crate is used but rust cannot cope with this crate being used from two different places:
Cargo.toml
[dependencies]
bigquery-storage = { version = "0.1.2"}#this uses arrow v 3
arrow = "3" #here I'm declaring that I also want to use that crate
error[E0308]: mismatched types
--> src/main.rs:155:37
|
155 | tx.send(batch).unwrap();
| ----- ^^^^^^^^^^^^^ expected arrow::record_batch::RecordBatch, found a different arrow::record_batch::RecordBatch
| |
| arguments to this function are incorrect
|
= note: arrow::record_batch::RecordBatch and arrow::record_batch::RecordBatch have similar names, but are actually distinct types
note: arrow::record_batch::RecordBatch is defined in crate arrow
--> /home/user/.cargo/registry/src/arrow-3.0.0/src/record_batch.rs:40:1
|
40 | pub struct RecordBatch {
| ^^^^^^^^^^^^^^^^^^^^^^
note: arrow::record_batch::RecordBatch is defined in crate arrow
--> /home/user/.cargo/registry/src/arrow-3.0.0/src/record_batch.rs:40:1
|
40 | pub struct RecordBatch {
| ^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate arrow are being used?
The compiler is saying they are different crates, and yet the paths are identical:
note: arrow::record_batch::RecordBatch is defined in crate arrow
--> /home/user/.cargo/registry/src/arrow-3.0.0/src/record_batch.rs:40:1
|
40 | pub struct RecordBatch {
| ^^^^^^^^^^^^^^^^^^^^^^
note: arrow::record_batch::RecordBatch is defined in crate arrow
--> /home/user/.cargo/registry/src/arrow-3.0.0/src/record_batch.rs:40:1
|
40 | pub struct RecordBatch {
| ^^^^^^^^^^^^^^^^^^^^^^
Which indicates that either there is some kind of data corruption or, more likely, the same source code is being compiled twice in different context, somehow. But mistakes of that sort are not common in published libraries. Strange.