polars
polars copied to clipboard
Polars compilation fails after adding `extract_jsonpath`
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
[package]
name = "polar_test"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
polars = { version = "0.36.2", features = ["lazy", "extract_jsonpath"] }
Log output
13:08 $ cargo run
Compiling simdutf8 v0.1.4
Compiling serde v1.0.195
Compiling serde_derive v1.0.195
Compiling lexical-util v0.8.5
Compiling polars-arrow v0.36.2
Compiling serde_json v1.0.111
Compiling hashbrown v0.13.2
Compiling ref-cast v1.0.22
Compiling ref-cast-impl v1.0.22
Compiling float-cmp v0.9.0
Compiling polars-core v0.36.2
Compiling polars-error v0.36.2
Compiling polars-utils v0.36.2
Compiling polars-ops v0.36.2
Compiling fallible-streaming-iterator v0.1.9
Compiling log v0.4.20
Compiling lexical-write-integer v0.8.5
Compiling lexical-parse-integer v0.8.6
Compiling polars-plan v0.36.2
Compiling lexical-parse-float v0.8.5
Compiling lexical-write-float v0.8.5
Compiling lexical-core v0.8.5
Compiling polars-lazy v0.36.2
Compiling polars v0.36.2
Compiling polars-compute v0.36.2
Compiling polars-row v0.36.2
Compiling halfbrown v0.2.4
Compiling value-trait v0.8.1
Compiling simd-json v0.13.8
Compiling jsonpath_lib v0.3.0
Compiling polars-json v0.36.2
error[E0432]: unresolved import `jsonpath_lib::PathCompiled`
--> /Users/kartheek/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polars-ops-0.36.2/src/chunked_array/strings/json_path.rs:4:5
|
4 | use jsonpath_lib::PathCompiled;
| ^^^^^^^^^^^^^^------------
| | |
| | help: a similar name exists in the module: `Compiled`
| no `PathCompiled` in the root
For more information about this error, try `rustc --explain E0432`.
error: could not compile `polars-ops` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
Building [======================> ] 155/162: polars-core
Issue description
Unable to compile when "extract_jsonpath" feature is added. PyPolars and nodes-polars use same features, and yet they compile ?
Expected behavior
compilation succeeds
Installed versions
13:23 $ rustc --version rustc 1.77.0-nightly (d6d7a9386 2023-12-22)
This is not supported in Rust. We have a patched version on the python side.
As a workaround, can I use this ?
[patch.crates-io]
jsonpath_lib = { version = "0.3", optional = true, git = "https://github.com/ritchie46/jsonpath", branch = "improve_compiled" }
Yes