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

Use of undeclared module polars_arrow #130

Open
sclamons opened this issue Feb 25, 2025 · 1 comment
Open

Use of undeclared module polars_arrow #130

sclamons opened this issue Feb 25, 2025 · 1 comment

Comments

@sclamons
Copy link

Building a clean project with pyo3-polars=0.20.0 using the polars_expr macro results in an error like the following:

error[E0433]: failed to resolve: use of undeclared crate or module `polars_arrow`
  --> src/expressions.rs:10:1
   |
10 | #[polars_expr(output_type=UInt32Type)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `polars_arrow`
   |
   = note: this error originates in the attribute macro `polars_expr` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no variant or associated item named `UInt32Type` found for enum `DataType` in the current scope
  --> src/expressions.rs:10:27
   |
10 | #[polars_expr(output_type=UInt32Type)]
   |                           ^^^^^^^^^^ variant or associated item not found in `DataType`

Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `polars_seqtools` (lib) due to 2 previous errors

It looks like this commit changed how pyo3-polars-derive/src/lib.rs calls into arrow, but doesn't add the import required for that change to work.

@sclamons
Copy link
Author

A workaround is to add use polars_arrow; to the file where polars_expr is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant