ritchie46 opened a new issue #529:
URL: https://github.com/apache/arrow-rs/issues/529


   **Describe the bug**
   Creating a new project with this `Cargo.toml` fails to compile:
   
   ```
   [package]
   name = "foo"
   version = "0.1.0"
   edition = "2018"
   
   # See more keys and their definitions at 
https://doc.rust-lang.org/cargo/reference/manifest.html
   
   [dependencies]
   arrow = {git = "https://github.com/apache/arrow-rs";, rev = 
"80a57be3215ed7210971a501b10664cadfd59bea", default-features=false}
   ``` 
   
   Output:
   
   ```
   error[E0432]: unresolved import `rand::prelude::StdRng`
     --> 
/home/ritchie46/.cargo/git/checkouts/arrow-rs-3b86e19e889d5acc/80a57be/arrow/src/util/bench_util.rs:27:5
      |
   27 |     prelude::StdRng,
      |     ^^^^^^^^^^^^^^^ no `StdRng` in `prelude`
   
   error[E0432]: unresolved import `rand::rngs::StdRng`
     --> 
/home/ritchie46/.cargo/git/checkouts/arrow-rs-3b86e19e889d5acc/80a57be/arrow/src/util/test_util.rs:20:12
      |
   20 | use rand::{rngs::StdRng, Rng, SeedableRng};
      |            ^^^^^^^^^^^^ no `StdRng` in `rngs`
   
   error[E0308]: mismatched types
      --> 
/home/ritchie46/.cargo/git/checkouts/arrow-rs-3b86e19e889d5acc/80a57be/arrow/src/util/bench_util.rs:102:35
       |
   94  | pub fn create_string_array<Offset: StringOffsetSizeTrait>(
       |                            ------ this type parameter
   ...
   102 |             if rng.gen::<f32>() < null_density {
       |                                   ^^^^^^^^^^^^ expected type parameter 
`Offset`, found `f32`
       |
       = note: expected type parameter `Offset`
                            found type `f32`
   
   error[E0308]: mismatched types
      --> 
/home/ritchie46/.cargo/git/checkouts/arrow-rs-3b86e19e889d5acc/80a57be/arrow/src/util/bench_util.rs:123:35
       |
   114 | pub fn create_binary_array<Offset: BinaryOffsetSizeTrait>(
       |                            ------ this type parameter
   ...
   123 |             if rng.gen::<f32>() < null_density {
       |                                   ^^^^^^^^^^^^ expected type parameter 
`Offset`, found `f32`
       |
       = note: expected type parameter `Offset`
                            found type `f32`
   
   error: aborting due to 4 previous errors
   
   Some errors have detailed explanations: E0308, E0432.
   For more information about an error, try `rustc --explain E0308`.
   error: could not compile `arrow`
   ```
   
   
   I think this is introduced in 80a57be3215ed7210971a501b10664cadfd59bea.
   
   There are quite often feature tag related bugs that could be prevented if 
we'd run [cargo hack](https://github.com/taiki-e/cargo-hack) in CI. 
   
   Would you be willing to accept a PR that adds those checks? @alamb 
@jorgecarleitao @Dandandan @jhorstmann @nevi-me 
   


-- 
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]


Reply via email to