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

Cannot compile polars-plan with range feature enabled #20955

Closed
2 tasks done
drhagen opened this issue Jan 28, 2025 · 1 comment · Fixed by #20963
Closed
2 tasks done

Cannot compile polars-plan with range feature enabled #20955

drhagen opened this issue Jan 28, 2025 · 1 comment · Fixed by #20963
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars

Comments

@drhagen
Copy link

drhagen commented Jan 28, 2025

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

[package]
name = "temp"
version = "0.1.0"
edition = "2021"

[dependencies]
polars-plan = { version = "0.46.0", features = ["range"] }

Log output

Updating crates.io index
     Locking 118 packages to latest compatible versions
   Compiling proc-macro2 v1.0.93
   Compiling unicode-ident v1.0.16
   Compiling version_check v0.9.5
   Compiling libc v0.2.169
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.4.0
   Compiling crossbeam-utils v0.8.21
   Compiling shlex v1.3.0
   Compiling serde v1.0.217
   Compiling libm v0.2.11
   Compiling byteorder v1.5.0
   Compiling siphasher v1.0.1
   Compiling rayon-core v1.12.1
   Compiling rand_core v0.6.4
   Compiling regex-syntax v0.8.5
   Compiling rustversion v1.0.19
   Compiling either v1.13.0
   Compiling allocator-api2 v0.2.21
   Compiling thiserror v2.0.11
   Compiling once_cell v1.20.2
   Compiling foldhash v0.1.4
   Compiling equivalent v1.0.1
   Compiling bitflags v2.8.0
   Compiling parking_lot_core v0.9.10
   Compiling itoa v1.0.14
   Compiling simdutf8 v0.1.5
   Compiling static_assertions v1.1.0
   Compiling cc v1.2.10
   Compiling rand v0.8.5
   Compiling ryu v1.0.19
   Compiling raw-cpuid v11.3.0
   Compiling phf_shared v0.11.3
   Compiling scopeguard v1.2.0
   Compiling smallvec v1.13.2
   Compiling heck v0.5.0
   Compiling streaming-iterator v0.1.9
   Compiling ethnum v1.5.0
   Compiling strength_reduce v0.2.4
   Compiling phf v0.11.3
   Compiling dyn-clone v1.0.17
   Compiling atoi_simd v0.16.0
   Compiling memchr v2.7.4
   Compiling ahash v0.8.11
   Compiling polars-utils v0.46.0
   Compiling polars-schema v0.46.0
   Compiling polars-arrow v0.46.0
   Compiling num-traits v0.2.19
   Compiling lock_api v0.4.12
   Compiling polars-compute v0.46.0
   Compiling fast-float2 v0.2.3
   Compiling polars-core v0.46.0
   Compiling xxhash-rust v0.8.15
   Compiling polars-ops v0.46.0
   Compiling polars-plan v0.46.0
   Compiling percent-encoding v2.3.1
   Compiling home v0.5.11
   Compiling glob v0.3.2
   Compiling phf_generator v0.11.3
   Compiling phf_codegen v0.11.3
   Compiling crossbeam-epoch v0.9.18
   Compiling aho-corasick v1.1.3
   Compiling quote v1.0.38
   Compiling syn v2.0.96
   Compiling crossbeam-deque v0.8.6
   Compiling getrandom v0.2.15
   Compiling memmap2 v0.9.5
   Compiling castaway v0.2.3
   Compiling regex-automata v0.4.9
   Compiling parking_lot v0.12.3
   Compiling psm v0.1.24
   Compiling stacker v0.1.17
   Compiling rayon v1.10.0
   Compiling chrono v0.4.39
   Compiling argminmax v0.6.2
   Compiling regex v1.11.1
   Compiling parse-zoneinfo v0.3.1
   Compiling chrono-tz-build v0.4.0
   Compiling chrono-tz v0.10.1
   Compiling zerocopy-derive v0.7.35
   Compiling serde_derive v1.0.217
   Compiling thiserror-impl v2.0.11
   Compiling bytemuck_derive v1.8.1
   Compiling strum_macros v0.26.4
   Compiling recursive-proc-macro-impl v0.1.1
   Compiling recursive v0.1.1
   Compiling zerocopy v0.7.35
   Compiling polars-error v0.46.0
   Compiling bytemuck v1.21.0
   Compiling ppv-lite86 v0.2.20
   Compiling rand_chacha v0.3.1
   Compiling rand_distr v0.4.3
   Compiling hashbrown v0.15.2
   Compiling compact_str v0.8.1
   Compiling bytes v1.9.0
   Compiling hashbrown v0.14.5
   Compiling indexmap v2.7.1
   Compiling polars-row v0.46.0
   Compiling polars-io v0.46.0
error[E0432]: unresolved import `polars_time`
 --> /home/dhagen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-plan-0.46.0/src/dsl/functions/range.rs:2:5
  |
2 | use polars_time::ClosedWindow;
  |     ^^^^^^^^^^^ use of undeclared crate or module `polars_time`
  |
help: there is a crate or module with a similar name
  |
2 | use polars_core::ClosedWindow;
  |     ~~~~~~~~~~~

For more information about this error, try `rustc --explain E0432`.
error: could not compile `polars-plan` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Issue description

There is an undeclared dependency of polars-plan on polars-time when the range feature is enabled. Any project that depends on polars-plan fails to build when the range feature is enabled. The Rust compiler narrows down the issue to this line. This can be worked around by enabling a bunch of time-related features (dtype-datetime, dtype-date, dtype-time, and dtype-duration)

Expected behavior

Any crate with any feature set should be compilable.

Installed versions

polars-plan = { version = "0.46.0", features = ["range"] }

@drhagen drhagen added bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars labels Jan 28, 2025
@ritchie46
Copy link
Member

I would accept fixes for this, but polars-plan is a private subcrate. It's inteded to use the main crate.

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.

2 participants