Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to Compile when "lazy" & "ipc" features are used #16212

Closed
2 tasks done
ethanmsl opened this issue May 14, 2024 · 2 comments · Fixed by #16284
Closed
2 tasks done

Failure to Compile when "lazy" & "ipc" features are used #16212

ethanmsl opened this issue May 14, 2024 · 2 comments · Fixed by #16284
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars

Comments

@ethanmsl
Copy link

ethanmsl commented May 14, 2024

Checks

  • I have checked that this issue has not already been reported.
  • 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
@ethanmsl ethanmsl added bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars labels May 14, 2024
@mcrumiller
Copy link
Contributor

I can't test this here but have you done a rustup update + cargo clean? This fixes most compilation issues.

@NickCondron
Copy link
Contributor

NickCondron commented May 17, 2024

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 bbaf341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants