polars
polars copied to clipboard
Failure to Compile when "lazy" & "ipc" features are used
Checks
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of Polars.
Reproducible example
Using both the "lazy" and "ipc" features together results in a failure to compile. This is easily reproduced.
Just:
cargo new --bin compile-failure
cd compile-failure
cargo add polars --features=lazy,ipc
cargo run
==============
[package]
name = "test-polars"
version = "0.1.0"
edition = "2021"
[dependencies]
polars = { version = "0.39.2", features = ["lazy","ipc"] }
fn main() {
println!("hello... world?")
}
Log output
❯ POLARS_VERBOSE=1 cargo run
Compiling polars-plan v0.39.2
error[E0412]: cannot find type `CloudOptions` in this scope
--> /Users/esl/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-plan-0.39.2/src/logical_plan/builder.rs:244:31
|
244 | cloud_options: Option<CloudOptions>,
| ^^^^^^^^^^^^
|
::: /Users/esl/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-plan-0.39.2/src/dsl/options.rs:43:1
|
43 | pub struct JoinOptions {
| ---------------------- similarly named struct `JoinOptions` defined here
|
help: a struct with a similar name exists
|
244 | cloud_options: Option<JoinOptions>,
| ~~~~~~~~~~~
help: consider importing this struct
|
1 + use polars_io::cloud::CloudOptions;
|
error[E0425]: cannot find function `is_cloud_url` in this scope
--> /Users/esl/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-plan-0.39.2/src/logical_plan/functions/count.rs:131:20
|
131 | let is_cloud = is_cloud_url(paths.first().unwrap().as_path());
| ^^^^^^^^^^^^ not found in this scope
|
help: consider importing this function
|
1 + use polars_io::is_cloud_url;
|
error[E0425]: cannot find function `prepare_schema` in this scope
--> /Users/esl/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-plan-0.39.2/src/logical_plan/builder.rs:280:17
|
280 | prepare_schema(metadata.schema.as_ref().into(), row_index.as_ref()),
| ^^^^^^^^^^^^^^ not found in this scope
Some errors have detailed explanations: E0412, E0425.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `polars-plan` (lib) due to 3 previous errors
Issue description
No compilation with both "lazy" && "ipc" features enabled. (either one alone does not seem to cause issue)
Expected behavior
Compilation. ;)
Installed versions
-
cargo --version
- cargo 1.78.0 (54d8815d0 2024-03-26)
-
rustup --version
- rustup 1.27.1 (54dd3d00f 2024-04-24)
-
The currently active
rustc
version is-
rustc 1.78.0 (9b00956e5 2024-04-29)
-
-
Polars:
- 0.39.2
I can't test this here but have you done a rustup update
+ cargo clean
? This fixes most compilation issues.
I'm running into this (I tried update and clean). It also happens with features = ["lazy", "ipc-streaming"]
. The issue goes away if you add the parquet feature.
git bisect reveals the troublesome commit to be bbaf341064718fabb535202959f627e7d4add0ff